• Quick Start
  • Send Survey
  • Get Contact
  • Remove Contact
  • Delete Contact (GDPR)
  • Get Unsubscribed
  • Get Responses
  • Get NPS
  • Sent Statistics
  • Historical Stats
  • Deactivate All
  • Bulk Add with CSV
  • Inapp Surveys
  • Bulk Add/Send

Change Log

  • Changes

Delete personal data of a contact (GDPR)

This will remove all personal data of a person and add the contact to the blocklist. They cannot be added to AskNicely or surveyed again.
Use this API endpoint for automated GDPR delete requests.

API Endpoint

Make a POST request to https://DEMO.asknice.ly/api/v1/privacy/remove

You can use either JSON request along with setting 'Content-Type: application/json' in request header or CURL request without any additional settings.

JSON Request

Argument Example Required Description
contacts
{
    "contacts" : [
        { "email": "john@asknice.ly" },
        { "email": "john@example.com" }
    ]
}
            
Required

This argument should be posted as a JSON object, which has a 'contacts' property, and its value is a JSON array.

Each array element is another JSON object with an 'email' property and its value

skipnotify 1 Optional

Default is 0. If the parameter is not passed, notify the primary user of AskNicely about removing this contact.

Example JSON request (POST)

    curl --location --request POST 'https://DEMO.asknice.ly/api/v1/privacy/remove' \
        --header 'X-apikey: ' \
        --header 'Content-Type: application/json' \
        --data-raw '{
            "skipnotify": 1,
            "contacts": [
                {
                    "email": "john@asknice.ly"
                },
                {
                    "email": "john@example.com"
                }
            ]
        }'
    

Response

    200 OK

    {
        "success": true,
        "msg": "contact removed"
    }
    

CURL Request

Argument Example Required Description
email someone@example.com Required email of the contact you need to delete
skipnotify 1 Optional Default is 0. If the parameter is not passed, notify the primary user of AskNicely about removing this contact.

Example CURL request (POST)

curl --data "email=someone@example.com" --header "X-apikey: " \
https://DEMO.asknice.ly/api/v1/privacy/remove

Response

200 OK

{
    "success": true,
    "msg": "contact removed"
}