Skip to content

Area: Developers

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.

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.

Send your shop’s Secret Key as a bearer token, from your server only:

authorization: Bearer $RELEVA_SECRET_KEY

Find the key under Settings › Shop & Integration; see Find your Access Token and Secret Key. Authentication failures answer 400, not 401 (see Errors).

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 email
curl -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 id
curl -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 %2B
curl -X DELETE 'https://releva.ai/api/v0/profiles?phoneNumber=%2B15555550199' \
-H "authorization: Bearer $RELEVA_SECRET_KEY" \
-H 'content-type: application/json'

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 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.
  • One profileId, one email and one phoneNumber per request.
  • Rate limits: none on this endpoint.