Remove People Target List People
Remove up to 100 contacts from a people target list.
Requires the people_target_lists:write scope; target_lists:write covers company target lists only. Works on the same lists as adding people, with the same access for a user's token.
Send each contact's contact_id, with the company_id they are on the list for. You can leave company_id out unless the contact is on the list for more than one company.
Every person sent gets a result, in the order sent: removed, not_in_list, not_found or ambiguous_company. Removing someone who is not on the list changes nothing, so a sync can retry safely. The contact itself is not deleted, and can be added back later.
Errors: 403 missing people_target_lists:write, or a user with only viewer access ยท 404 the list does not exist, belongs to another organisation, or is hidden from the caller or, for an API client, not open to API edits (indistinguishable) ยท 422 fewer than 1 or more than 100 people, an unknown field, or a malformed id. Nothing is removed on any of them.
curl -X POST "https://api.handshaik.com/v1/people-target-lists/3fa85f64-5717-4562-b3fc-2c963f66afa6/people/remove" \
-H "Authorization: Bearer $HANDSHAIK_PUBLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"people": [
{
"contact_id": "00000000-0000-4000-8000-000000000000",
"company_id": "00000000-0000-4000-8000-000000000000"
}
]
}'Authorization
AuthorizationstringheaderrequiredOAuth2 client_credentials (M2M). Request a token with the
audienceset tohttps://api.handshaik.com.Handshaik's own first-party apps, such as the Chrome extension, instead sign a Handshaik user in with the authorization code flow and PKCE, with the same
audience. Such a token acts as that user, within their organisation. Partner integrations use client_credentials.
Parameters
people_target_list_idstring<uuid>pathrequiredThe people target list's
id, as returned byGET /v1/people-target-lists
Body
peoplePeopleTargetListPersonRemoveRequest[]requiredBetween 1 and 100 people to remove
Response
Successful Response
resultsPeopleTargetListPersonRemoveResultPublic[]requiredOne result per person sent, in the order sent. A person named twice has a result each time
{
"results": [
{
"contact_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"company_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "removed"
}
]
}