Delete a segment
DELETE
/api/v3/contacts/segments/{segmentId}
const url = 'https://api.tryletterhead.com/api/v3/contacts/segments/1?api=true';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
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/segments/1?api=true' \ --header 'Authorization: Bearer <token>'Deletes a company-level contact segment and clears its channel assignments.
This is a company-level (v3) write. Authenticate with a company API key as a Bearer token.
Response
200 OK with an empty items payload on success. An unknown ID (or one owned by another company) returns 404.
Authorizations
Section titled βAuthorizations βParameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters β segmentId
required
integer
The segmentβs identifier. This is the numeric id returned by List segments β not a UUID.
Query Parameters
Section titled βQuery Parameters β api
required
boolean
Required. Set to true.
Responses
Section titled β Responses βSuccessful response
Still can’t find what you need? Contact support.