POST /api/v1/profile/delete/

Delete profile

Erases a profile's personal data and cancels its scheduled emails. Use it to fulfil a right-to-erasure request.

Identify the profile by any combination of external_profile_id, customer_user_id, and email — Adapty Mail resolves the profile the same way it does on save.

Erasure is final. A later Save profile request carrying the same identifiers doesn't recreate the profile.

Repeat a deletion by external_profile_id or customer_user_id and it succeeds again without changing anything. Repeat one that carried only email and it returns 404: erasure clears the stored address, so an email has nothing left to match.

Request body

Identifiers for the profile to erase. Send at least one of external_profile_id, customer_user_id, or email.

external_profile_idstring

The identifier you sent when saving the profile.

customer_user_idstring

The user's identifier in your own system.

emailstring

The email address on the profile.

Responses

Profile deleted. The response has no body.

No identifier was provided.

Schema

Standard error response. Every failure returns a 4XX status with this shape.

errorsarray of object
messagestring

Human-readable description of the error.

error_codestring

Machine-readable error identifier.

status_codeinteger

HTTP status code for this error.

field_namestring

The request field that caused the error, or null if the error isn't field-specific.

Example
{
  "errors": [
    {
      "message": "At least one of external_profile_id, customer_user_id or email must be provided",
      "error_code": "missing_identifier",
      "status_code": 400,
      "field_name": null
    }
  ]
}

Missing or invalid secret API key.

Schema

Standard error response. Every failure returns a 4XX status with this shape.

errorsarray of object
messagestring

Human-readable description of the error.

error_codestring

Machine-readable error identifier.

status_codeinteger

HTTP status code for this error.

field_namestring

The request field that caused the error, or null if the error isn't field-specific.

Example
{
  "errors": [
    {
      "message": "Secret key doesn't exist",
      "error_code": "secret_key_does_not_exist_error",
      "status_code": 403,
      "field_name": null
    }
  ]
}

No profile matches the identifiers you sent.

Schema

Standard error response. Every failure returns a 4XX status with this shape.

errorsarray of object
messagestring

Human-readable description of the error.

error_codestring

Machine-readable error identifier.

status_codeinteger

HTTP status code for this error.

field_namestring

The request field that caused the error, or null if the error isn't field-specific.

Example
{
  "errors": [
    {
      "message": "Profile not found",
      "error_code": "profile_not_found_error",
      "status_code": 404,
      "field_name": null
    }
  ]
}