Skip to main content

List Contacts

Add or remove contacts from a contact list. Contacts can belong to multiple lists simultaneously.

Add Contacts to List

Add one or more contacts to a list. Contacts already in the list are skipped.

Endpoint

POST /lists/:id/contacts

Returns: 200 OK

Headers

HeaderValueRequired
AuthorizationBearer <your-api-key>Yes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeDescription
idstringThe list ID

Body Parameters

ParameterTypeRequiredDescription
contact_idsstring[]YesArray of contact IDs to add. Min: 1.

Response

{
"message": "Contacts added to list",
"processed": 3,
"skipped": 1
}
FieldTypeDescription
processednumberNumber of contacts newly added to the list
skippednumberNumber of contacts that were already in the list (skipped)

Examples

curl -X POST "https://api.arsel.sa/v1/lists/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a/contacts" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"contact_ids": [
"01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b",
"01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c",
"01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6d"
]
}'

Remove Contacts from List

Remove one or more contacts from a list. The contacts themselves are not deleted — only the list association is removed.

Endpoint

DELETE /lists/:id/contacts

Returns: 200 OK

Body Parameters

ParameterTypeRequiredDescription
contact_idsstring[]YesArray of contact IDs to remove. Min: 1.

Response

{
"message": "Contacts removed from list",
"processed": 2,
"skipped": 0
}

Examples

curl -X DELETE "https://api.arsel.sa/v1/lists/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a/contacts" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"contact_ids": [
"01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b",
"01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6c"
]
}'