Delete Target List
Permanently delete a target list.
Requires the target_lists:delete scope; target_lists:write alone is not enough. 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 owner access, as in Handshaik.
This is a hard delete and cannot be undone. The list, its companies, their assignees, its members and its access settings are removed, and the list disappears from Handshaik for everyone who could see it. The companies themselves, and any contacts and notes about them, are not deleted. Records of past CRM pushes and imports that came from the list keep its id.
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 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 without that detail did not come from this route, and proves nothing about the list. Nor does a 404 alone 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 target_lists:delete scope, or a user below owner ยท 404 a list that is unknown, already deleted, another organisation's, or hidden from the caller (one indistinguishable answer) ยท 422 a malformed target_list_id. Nothing is deleted on any of them.
curl -X DELETE "https://api.handshaik.com/v1/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
target_list_idstring<uuid>pathrequiredThe target list's
id, as returned byGET /v1/target-lists
Response
Successful Response
{
"type": "about:blank",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}