Skip to main content

Delete profile with server-side API

Deletes an end user of your app in Adapty.

Calling this endpoint enables the deletion of a user's profile and all related data, rendering it inaccessible to the client. Any profile history linked to the deleted profile will be detached, and integration events previously sent to integrations will be deleted from the event feed.

Should another profile make a purchase from the device with the same Apple ID (or when the subscription is restored), the profile history will be reassigned to the new profile, and integration events will be reissued.

Please be aware that this endpoint does not support bulk deletion, therefore each request must be handled individually. For managing a substantial number of users, it is advisable to execute requests concurrently.

Method and endpoint

DELETE https://api.adapty.io/api/v2/server-side-api/profile/

Example request

curl --location --request DELETE 'https://api.adapty.io/api/v2/server-side-api/profile/' \
--header 'Authorization: Api-Key <YOUR_SECRET_API_KEY>' \
--header 'adapty-customer-user-id: <YOUR_CUSTOMER_USER_ID>' \
--header 'Content-Type: application/json' \
--data ''

Placeholders:

  • <YOUR_CUSTOMER_USER_ID>: The unique ID of the customer in your system.
  • <YOUR_SECRET_API_KEY>: Your secret API key for authorization.

Parameters

No parameters


Successful response: 204: No Content

204: No Content with an empty body is a successful response.


Errors

401: Unauthorized

The request failed due to missing or incorrect authorization. Check the Authorization page, paying close attention to the Authorization header.

The request also failed because the specified profile wasn’t found.

Body

ParameterTypeDescription
errorsObject
  • source: (string) Always non_field_errors.
  • errors: A description of the error.
error_codeStringShort error name. Always not_authenticated.
status_codeIntegerHTTP status. Always 401.

Response example

{
"errors": [
{
"source": "non_field_errors",
"errors": [
"Authentication credentials were not provided."
]
}
],
"error_code": "not_authenticated",
"status_code": 401
}

404: Not found

The request failed because the specified profile wasn’t found. Double-check the customer_user_id or profile_id for any typos.

Body
ParameterTypeDescription
errorsObject
  • source: (string) Always null.
  • errors: A description of the error.
error_codeStringShort error name. Always profile_does_not_exist.
status_codeIntegerHTTP status. Always 404.
Response example
{
"errors": [
{
"source": null,
"errors": [
"Profile not found"
]
}
],
"error_code": "profile_does_not_exist",
"status_code": 404
}

See also: