Remove contacts from a list

Remove contacts from a list

delete

This endpoint will remove one or more contacts from the specified list.

Authorizations
AuthorizationstringRequired

An access token issued to a user.

Path parameters
workspaceIdstring · uuidRequired

Your workspace identifier.

Example: b4e02c85-c6d2-4b15-8885-e09671799c61
listIdstring · uuidRequired

The ID of a list.

Example: b4e02c85-c6d2-4b15-8885-e09671799c61
Body
contactsstring · uuid[] | nullableOptional

The list of contact ids to add to the list. Can be empty or null if identifiers are provided. Maximum combined count of contacts and identifiers is 100, validated by the API.

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
200

The contacts were removed successfully, and the number of contacts that were processed is returned. If it doesn't match the number of contacts provided, it means some of the contacts were not processed.

application/json
delete
/workspaces/{workspaceId}/lists/{listId}/contacts
DELETE /workspaces/{workspaceId}/lists/{listId}/contacts HTTP/1.1
Host: api.bird.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 99

{
  "contacts": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "identifiers": [
    {
      "key": "text",
      "value": "text"
    }
  ]
}
{
  "itemsProcessed": 100
}

Examples

Let's establish some of our data that will be used in the following examples:

  • Workspace ID: a1405560-c8d3-4b1a-877d-3f449ad95352

  • AccessKey: abcd

  • List ID: 123e4567-e89b-12d3-a456-426614174000

  • Contact ID: 12bd0e40-9361-4e32-8b26-99b4ab7eae09

  • Contact Identifier:

    "identifiers": [ { "key": "emailaddress", "value": "[email protected]" }, { "key": "phonenumber", "value": "+31600000000" } ]

Remove contacts from a list using Contact ID

In this example, we are removing contacts from a list given both IDs.

curl -X DELETE "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/lists/123e4567-e89b-12d3-a456-426614174000/contacts" \
-H "Content-Type: application/json" \
-H "Authorization: AccessKey abcd" \
-d '{
  "contacts": ["12bd0e40-9361-4e32-8b26-99b4ab7eae09"]
}'

Remove contacts from a list using Contact Identifiers

In this example, we are removing contacts from a list given contact identifiers

curl -X POST 'https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/lists/123e4567-e89b-12d3-a456-426614174000/contacts' \
  -H "Authorization: AccessKey abcd" \
  -H 'Content-Type: application/json' \
--data-raw '{
	"identifiers": [
		{ "key": "emailaddress", "value": "[email protected]" }, 
		{ "key": "phonenumber", "value": "+31600000000" }
	]
}'

Last updated

Was this helpful?