Skip to main content
Auth. HMAC v1 or bearer token — see Authentication. Status. Live · Idempotent: No (leaving twice yields 1006 once the chat is no longer a group from your line’s perspective).
Leaves an iMessage group chat from the line pinned to this chat. The group must have at least 4 participants before leaving so 3 remain afterward. No body required.

Request

POST /api/v1/chats/{id}/leave
curl -X POST https://console.trychert.com/api/v1/chats/ch_01H.../leave \
  -H "x-chert-tenant: $TENANT" \
  -H "x-chert-signature: v1,$TS,$SIG"

Response

{
  "chat_id": "ch_01H...",
  "status": "left"
}

Path parameters

id
string
required
Chat identifier (ch_…).

Response fields

chat_id
string
The chat that was left.
status
string
Always "left" on success.

Errors

CodeHTTPWhen
1002400Group would have fewer than 3 members after leaving.
1006400Chat is a direct message.
2002404Chat not found.
4001502Delivery failed.
4099501Group is missing its chat key or has no pinned line.
See the full error code reference.

See also