Delete a contact by contact key
DELETE
/api/v3/contacts/keyed/{contactKey}
const url = 'https://api.tryletterhead.com/api/v3/contacts/keyed/example';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"api":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.tryletterhead.com/api/v3/contacts/keyed/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "api": true }'Same as Delete a contact (DELETE /api/v3/contacts/{email}), with the contact addressed by its contactKey instead of its email address. This cannot be undone.
This is a company-level (v3) write. Authenticate with a company API key as a Bearer token.
Authorizations
Section titled βAuthorizations βParameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters β contactKey
required
string
The contactβs opaque 64-character hex key (from a prior responseβs contactKey field).
Request Body required
Section titled βRequest Body required β Media type application/json
object
api
required
Required. Set to true to authenticate with an API key.
boolean
Example
{ "api": true}Responses
Section titled β Responses βContact deleted.
Media type application/json
object
items
Array
message
string
total
integer
Example
{ "items": [], "message": "Contact deleted.", "total": 0}Still can’t find what you need? Contact support.