Add People Target List People
Add up to 100 contacts to a people target list.
Requires the people_target_lists:write scope; target_lists:write covers company target lists only. With an API client's token, works on lists created by an API client and on lists shared with your organisation at write. With a user's token, the user needs editor access, as in Handshaik.
A person on a people list is a contact at one of their companies. Send each contact's contact_id from /v1/contacts, with the company_id to add them for. You can leave company_id out when the contact has exactly one company, past roles included.
Every person sent gets a result, in the order sent: added, already_in_list, not_found or ambiguous_company. Adding someone who is already on the list changes nothing, so a sync can retry safely, and someone removed from the list can be added again. People are recorded as added by your API client or the signed-in user, with no assignee.
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 written on any of them.
curl -X POST "https://api.handshaik.com/v1/people-target-lists/3fa85f64-5717-4562-b3fc-2c963f66afa6/people" \
-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
peoplePeopleTargetListPersonAddRequest[]requiredBetween 1 and 100 people to add
Response
Successful Response
resultsPeopleTargetListPersonAddResultPublic[]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": "added"
}
]
}