Skip to content

Search the documentation by title, section, or page text.

Delete a Profile

DELETE https://api.botsi.com/v2/profiles/{profileId}

This route accepts the secret key only

Send $BOTSI_SECRET_KEY as the bare value of the Authorization header, with no Bearer prefix, the same as the other secret-key V2 routes. The public key is rejected with 401, even though Create a Profile, Get a Profile, and Update a Profile accept it. Call this from your server, never from the app. See Authentication.

Path parameters#

ParameterTypeRequiredDescription
profileIdstringRequiredBotsi profile ID from Create a Profile

There is no request body. Deleting by appUserId isn't supported on this route.

# Authorization: $BOTSI_SECRET_KEY
curl -X DELETE "https://api.botsi.com/v2/profiles/fff3c120-0ca8-480f-9b19-3955a5428e39" \
  -H "Authorization: $BOTSI_SECRET_KEY"

What this deletes#

Deleted:

  • the Profile
  • the records Botsi keeps for that Profile: its Access Levels (entitlements), custom attributes, segment membership, attribution data, and integration identifiers (AppsFlyer/Amplitude ids)

After the Profile is deleted#

GET, PATCH, and DELETE on that profileId return 404.

Calling Create a Profile again with the same appUserId creates a new Profile with a new profileId.

Response#

The Profile was deleted.

{ "ok": true }

Errors#

CodeMessageCause
401No valid API key provided.The Authorization header is missing, holds an unknown key, or holds the app's public key. code is unauthorized
404No profile found by id: fff3c120-0ca8-480f-9b19-3955a5428e39No Profile with that ID belongs to your app. A Profile owned by another app returns the same response. A repeated DELETE returns the same response. code is not_found
409The profile is still referenced by other records and was not deleted.Rare. Another record still references the Profile. Nothing was deleted. Retry later or contact support. code is conflict

A public key returns 401:

{ "error": "No valid API key provided.", "code": "unauthorized" }