Delete a contact list

DELETE/api/v1/contact-lists/{contactList}/members/{contact}
Requires anorganization API keywith the scopecontacts:write

Parameters

NameInTypeDescription
contactListrequiredpathstringThe contact list identifier.
contactrequiredpathstringThe contact identifier.

Request

DELETE/api/v1/contact-lists/{contactList}/members/{contact}
curl -X DELETE 'https://app.mailyte.com/api/v1/contact-lists/01JBT8XQ2M9WYC3K4F6R7S8T9V/members/01JBT8XQ2M9WYC3K4F6R7S8T9V' \
  -H 'Authorization: Bearer mk_live_YOUR_API_KEY'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Success.

  • dataobject

    ONE shape for both directions — adding members and removing one answer the same five counters, with the irrelevant ones at zero — so a caller writing a "sync my list" routine never has to branch on which call it just made.

    • objectstringcontact_list_membership
    • list_idstring

      The list this happened to, echoed from the path so the response can be logged on its own.

    • addedinteger

      Newly attached. Re-adding an existing member is a no-op that still counts as added — the request "this contact is on this list" was satisfied either way. Zero on a removal.

    • removedinteger

      Detached. Removing somebody who was not a member is a no-op and counts 0. Zero on an add.

    • skippedinteger

      Ids that resolved to nothing in this organization. Both endpoints quietly ignore ids they cannot see — answering "no such contact" would confirm which ids exist in someone else's account — so without this counter a caller submitting 500 ids and having 40 ignored would have no way to know. It does not name them, for the same reason.

    • contact_countinteger

      The size of the list AFTER the change, so you never have to follow up with a GET. Counts every member whatever their state, exactly as `contact_list.contact_count` does.

Returned inside the standard envelope.

Errors

StatusWhen
401The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist.
403The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys.
404No such resource in this organization.
422The request was understood but the values were not acceptable.
429Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait.

Every status, with what causes it and what to do, is on the error reference.