Delete a profile
DELETE https://releva.ai/api/v0/profiles deletes a customer profile. The profile, every profile merged into it and its anonymous ids are deleted together.
When to use it
Section titled “When to use it”GDPR gives users the right to be forgotten. Call it from your server to respect that right in an automated way, or to remove test profiles. To keep a copy for the person first, run Export a profile’s data before you delete.
Authentication
Section titled “Authentication”Send your shop’s Secret Key as a bearer token, from your server only:
authorization: Bearer $RELEVA_SECRET_KEYFind the key under Settings › Shop & Integration; see Find your Access Token and Secret Key. Authentication failures answer 400, not 401 (see Errors).
Request
Section titled “Request”DELETE /api/v0/profiles with one or more of these query parameters. Each one you send is deleted.
| Parameter | Notes |
|---|---|
profileId |
Your customer id. |
email |
A valid email address. |
phoneNumber |
International form only: + and digits. Send + as %2B. National numbers are rejected. |
# By emailcurl -X DELETE 'https://releva.ai/api/v0/profiles?email=maria@example.com' \ -H "authorization: Bearer $RELEVA_SECRET_KEY" \ -H 'content-type: application/json'
# By your customer idcurl -X DELETE 'https://releva.ai/api/v0/profiles?profileId=DEMO-1001' \ -H "authorization: Bearer $RELEVA_SECRET_KEY" \ -H 'content-type: application/json'
# By phone number: send + as %2Bcurl -X DELETE 'https://releva.ai/api/v0/profiles?phoneNumber=%2B15555550199' \ -H "authorization: Bearer $RELEVA_SECRET_KEY" \ -H 'content-type: application/json'Response
Section titled “Response”202 Accepted with the body {}. The call also answers 202 when nothing matched, and when you send no parameter at all. To confirm the deletion, call Get a profile: it answers 404.
Errors
Section titled “Errors”Errors have one shape, { "message": "..." }.
| Status | When | Message |
|---|---|---|
400 |
No authorization header |
Authorization header is missing. |
400 |
The header is not Bearer <token> |
Authorization header is malformed. It should look like `Bearer <string>`. |
400 |
The token is not a UUID | Authorization header contains an invalid Bearer token. |
400 |
No shop has this key | Domain with the provided secret key cannot be found. |
400 |
Bad email | The 'email' field must be a valid e-mail. |
400 |
National phone number, for example 0888 |
phoneNumber must be a valid telephone number starting with + and international code, e.g. +1. Got 0888 instead. |
400 |
Unknown parameter, for example foo |
The object '' contains forbidden keys: 'foo'. |
402 |
The shop is disabled | Domain is disabled. Please reach out to support@releva.ai to enable it. |
500 |
Unexpected error | An internal error occurred. Retry later. |
Limits
Section titled “Limits”- One
profileId, oneemailand onephoneNumberper request. - Rate limits: none on this endpoint.