Remove contacts from a list
DELETE
/workspaces/{workspaceId}/lists/{listId}/contacts
This endpoint will remove one or more contacts from the specified list.
Parametri di percorso
workspaceId
string
The unique identifier of the workspace.
listId
string
The ID of a list.
Payload della richiesta
contacts
array of string
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.
identifiers
array of object
The list of identifiers to resolve to contacts and add to the list. Can be empty or null if contacts are provided. Maximum combined count of contacts and identifiers is 100, validated by the API.
Mostra parametri secondari
identifiers.key
string
obbligatorio
The identifier key (e.g., "emailaddress", "phonenumber").
identifiers.value
string
obbligatorio
The identifier value (e.g., "user@example.com", "+31612345678").
Payload della risposta
itemsProcessed
integer
obbligatorio
The number of contacts that were processed.
Esempio di codice
curl -X DELETE 'https://api.bird.com/workspaces/{workspaceId}/lists/{listId}/contacts' \
-H 'Authorization: AccessKey YOUR_ACCESS_KEY'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": "test@example.com" },
{ "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.
Esempio di codice
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"]
}'Esempio di codice
{
"itemsProcessed": 1
}Remove contacts from a list using Contact Identifiers
In this example, we are removing contacts from a list given contact identifiers
Esempio di codice
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": "test@example.com" },
{ "key": "phonenumber", "value": "+31600000000" }
]
}'Esempio di codice
{
"itemsProcessed": 1
}