API Reference

Messages

Overview

Messages belong to tickets. Each message has a type indicating its direction: inbound (from the contact), outbound (reply to the contact), or note (internal, visible only to your team). The API provides endpoints for viewing messages on a ticket and for creating replies, forwards, and internal notes.

List Messages

Messages are included in the single ticket response. Fetch a ticket to retrieve all of its messages.

GET /api/tickets/{id}

The messages array in the response contains all messages on the ticket, ordered chronologically. See the Tickets documentation for the full response structure.

Reply to a Ticket

Send a reply to the contact on a ticket.

POST /api/tickets/{id}/reply

Request Body

Field Type Required Description
body string Yes HTML body of the reply
to_recipients array No Email addresses for the To field
cc_recipients array No Email addresses for CC
bcc_recipients array No Email addresses for BCC

Example Request

curl -X POST https://app.therethere.com/api/tickets/42/reply \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "<p>Thanks for reaching out. I have reset your password.</p>",
    "to_recipients": ["john@customer.com"]
  }'

Example Response (201 Created)

{
    "message": {
        "id": 102,
        "ulid": "01HX9G4M3R...",
        "type": "outbound",
        "body_html": "<p>Thanks for reaching out. I have reset your password.</p>",
        "sender": {
            "id": 5,
            "type": "user",
            "name": "Jane Smith",
            "email": "jane@example.com",
            "avatar_url": null
        },
        "attachments": [],
        "is_forward": false,
        "created_at": "2025-06-02T15:00:00+00:00"
    }
}

Forward a Ticket

Forward a ticket (or a specific message) to an external recipient.

POST /api/tickets/{id}/forward

Request Body

Field Type Required Description
body string Yes HTML body of the forwarded message
to_recipients array Yes At least one email address
cc_recipients array No Email addresses for CC
bcc_recipients array No Email addresses for BCC
forwarded_from_message_id integer No ID of the original message being forwarded

Example Request

curl -X POST https://app.therethere.com/api/tickets/42/forward \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "body": "<p>Please see the customer issue below.</p>", "to_recipients": ["escalation@example.com"] }'

The response format matches the reply endpoint, with is_forward set to true.

Add an Internal Note

Create an internal note on a ticket. Notes are only visible to workspace members and are never sent to the contact.

POST /api/tickets/{id}/note

Request Body

Field Type Required Description
body string Yes HTML body of the note

Example Request

curl -X POST https://app.therethere.com/api/tickets/42/note \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "body": "<p>Customer confirmed the issue is resolved.</p>" }'

The response format matches the reply endpoint, with type set to "note".