Skip to content
V2 (Legacy) API ReferenceGet started

Leave a group chat

POST/v3/chats/{chatId}/leave

Removes your phone number from a group chat. Once you leave, you will no longer receive messages from the group and all interaction endpoints (send message, typing, mark read, etc.) will return 409.

A participant.removed webhook will fire once the leave has been processed.

Supported

  • iMessage group chats with 4 or more active participants (including yourself)

Not supported

  • DM (1-on-1) chats — use the chat directly to continue the conversation
Path ParametersExpand Collapse
chatId: string
formatuuid
ReturnsExpand Collapse
message: optional string
status: optional string
trace_id: optional string

Leave a group chat

curl https://api.linqapp.com/api/partner/v3/chats/$CHAT_ID/leave \
    -X POST \
    -H "Authorization: Bearer $LINQ_API_V3_API_KEY"
{
  "message": "Leave group chat queued",
  "status": "accepted",
  "trace_id": "trace_id"
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found"
  },
  "success": false
}
{
  "error": {
    "status": 409,
    "code": 2013,
    "message": "This chat is unavailable"
  }
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}
Returns Examples
{
  "message": "Leave group chat queued",
  "status": "accepted",
  "trace_id": "trace_id"
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found"
  },
  "success": false
}
{
  "error": {
    "status": 409,
    "code": 2013,
    "message": "This chat is unavailable"
  }
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}