POST
/
customers
/
delete
curl --request POST \
  --url https://api.laudspeaker.com/customers/delete \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "primary_key": "<string>"
}'
{
  "primary_key":"test@example.com"
}

The delete endpoint is designed to allow Laudspeaker users the programmatic ability to delete existing customers.

The delete endpoint looks up and deletes a customer document using the supplied primary_key, returning the deleted customer information. If the customer does not exist, an error is returned.

In order to use this endpoint, a primary key must have first been selected via the Laudspeaker UI.

Authentication

Authorization
string
required

Header for authenticating with Laudspeaker. Starts with Api-Key followed by the API key, for example Api-Key M4jxXt6diYz1Dds1YmhHe93KGPAUi24PlXgaiRXi.

Body

primary_key
string
required

This field specifies the primary key value used to uniquely identify users.

Response

{
  "primary_key":"test@example.com"
}
primary_key
string
required

The primary key of the customer object that was deleted.

Example

Deleting a customer

curl --request POST \
  --url https://api.laudspeaker.com/customers/delete \
  --header 'Authorization: Api-Key M4jxXt6diYz1Dds1YmhHe93KGPAUi24PlXgaiRXi' \
  --header 'Content-Type: application/json' \
  --data '{
  "primary_key": "test@example.com"
}'