Delete People Target List
Delete a people target list.
Requires the people_target_lists:delete scope; people_target_lists:write alone is not enough, and target_lists:* covers company target lists only. With an API client's token, only a list created by an API client can be deleted; a list created in the Handshaik app returns 404, even one shared with the organisation at write. With a user's token, the user needs editor access, as in Handshaik.
The list disappears from Handshaik for everyone who could see it, and from this API. The contacts on it are not deleted. There is no response body.
A second DELETE of the same list returns 404, so a retry after a network timeout can report 404 for a delete that in fact succeeded. With an API client's token, for a list your organisation created over this API, treat that 404 as success when its detail is People target list not found: such a list stays deletable for as long as it exists, so this route answering 404 means it is gone. A 404 alone does not mean no list has that id, because a list created in the app or belonging to another organisation also returns 404. With a user's token, a 404 on the retry does not confirm the delete: the user may have lost access to the list in between.
Errors: 403 missing the people_target_lists:delete scope, or a user with only viewer access ยท 404 a list that is unknown, already deleted, another organisation's, or hidden from the caller (one indistinguishable answer) ยท 422 a malformed people_target_list_id. Nothing is deleted on any of them.
curl -X DELETE "https://api.handshaik.com/v1/people-target-lists/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "Authorization: Bearer $HANDSHAIK_PUBLIC_API_KEY"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
Response
Successful Response
{
"type": "about:blank",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}