> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeplo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GET Ticket Messages

> Manage messages within support tickets.

## Get ticket with messages

`GET /api/tickets/:id`

Returns the ticket details with all messages.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

```bash cURL theme={null}
curl https://zeplo.ai/api/tickets/1 \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "id": 1,
    "subject": "Cannot connect WhatsApp channel",
    "status": "open",
    "messages": [
      {
        "id": 1,
        "ticketId": 1,
        "userId": 5,
        "userName": "John Doe",
        "message": "I'm getting an error when trying to add my channel.",
        "isInternal": false,
        "createdAt": "2026-01-15T10:00:00Z"
      },
      {
        "id": 2,
        "ticketId": 1,
        "userId": 2,
        "userName": "Support Agent",
        "message": "Could you share the exact error message?",
        "isInternal": false,
        "createdAt": "2026-01-15T10:05:00Z"
      }
    ]
  }
}
```

***

## Add message to ticket

`POST /api/tickets/:id/messages`

### Body parameters

**message** `string` *required*

Message content.

**isInternal** `boolean`

Internal note (not visible to user).

**attachments** `array`

File attachments.

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/tickets/1/messages \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{ "message": "I fixed it! Thank you for the help." }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.