Skip to content

Get a ticket with its conversation

GET
/tickets/{id}
Code sample: Shell / cURL
curl --request GET \
--url https://example.com/api/v1/tickets/example \
--header 'Authorization: Bearer <token>'

Returns one helpdesk ticket: its fields, the client it belongs to, the member who opened it, assignees, tags, integration metadata and every message oldest first with its attachments and, for a team caller, whether its email to the client was sent, delivered, bounced or failed (emailDelivery) and, on a ticket opened by text, whether it was texted and the text delivered (smsDelivery). The id may also be the short code people quote (e.g. 9W03V9). Internal notes are included only for a caller holding tickets.manage. Requires the tickets.view permission; without tickets.view_all only tickets the caller can reach are found.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

The ticket.

Media typeapplication/json
object
data
required

One helpdesk ticket with its whole conversation.

object
assignees
required
Array<object>
object
memberId
required
string
memberName
required
string
client
required

Client the ticket belongs to.

Any of:
object
id
required
string
name
required
string
clientNotificationsEnabled
required

False when the client no longer receives emails about this ticket.

boolean
closedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
code
required

Short code people quote to name the ticket, e.g. 9W03V9.

string | null
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
createdByClient
required

Client that filed the ticket from the portal.

Any of:
object
id
required
string
name
required
string
firstRespondedAt
required

When the first agent reply was posted. Null until an agent replies.

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
id
required
string
internalNote
required

Staff-only note on the ticket.

string | null
lastMessageAt
required

When the last client-facing message landed. Null on a ticket with none.

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
leadEmail
required

Captured sender email for a lead ticket (no client match). Null once matched.

string | null
leadName
required

Captured sender name for a lead ticket (no client match). Null once matched.

string | null
messages
required

The conversation, oldest first.

Array<object>
object
attachments
required
Array<object>
object
fileName
required
string
fileSize
required
integer
>= -9007199254740991 <= 9007199254740991
fileUrl
required

Link that opens the file; a signed link stays valid for one hour.

string
id
required
string
mimeType
required
string
author
required
string
body
required

Stored message body (HTML or plain text).

string
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
emailDelivery
required

The latest email this message went out in to the client: PENDING, SENT, FAILED, DELAYED, DELIVERED, BOUNCED or COMPLAINED, or SKIPPED when it was deliberately not sent. Null when nothing was recorded, and always null for a caller who is not on the team.

Any of:
object
at
required

When the email reached its current status.

string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
reason
required

Why it failed or bounced, or for SKIPPED why it was not sent: client_emails_off, client_notifications_off, awaiting_invitation, no_recipient, sent_directly, template_disabled, channel_thread, channel_thread_failed or sent_by_text.

string | null
recipient
required

Addresses it went to, comma-separated.

string | null
status
required
string
Allowed values: SKIPPED PENDING SENT FAILED DELAYED DELIVERED BOUNCED COMPLAINED
externalSenderLabel
required

Real “Name ” of an inbound-email sender, or the phone of a text, attributed to the system account.

string | null
id
required
string
isInternal
required

A staff-only note. Included only for a caller holding tickets.manage.

boolean
sentByText
required

Texted to the requester instead of emailed (POST /tickets/{id}/texts, or Text (SMS) in the composer).

boolean
smsDelivery
required

The latest text a team reply went out in, to the ticket’s phone (smsNumber), or for a message sent by text to the requester’s phone: PENDING, SENT, DELIVERED, UNDELIVERED or FAILED, or SKIPPED when it was deliberately not texted. Null when nothing was recorded, and always null for a caller who is not on the team.

Any of:
object
accepted
required

The provider took the text (it has a message id), so a delivery report may still move it.

boolean
at
required

When the text reached its current status.

string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
errorCode
required

Telnyx’s error code for a refused or undelivered text.

string | null
reason
required

For SKIPPED why it was not texted: module_off, not_connected, texting_off, incoming_off, replies_off, opted_out, too_old, nothing_to_text or invalid_number. For FAILED or UNDELIVERED why: credentials, token_unreadable (the saved API key cannot be read), recipient, sender, region, registration (the number is not registered for business texting), opted_out, rejected, unavailable, rate_limited, internal_error when Chelsea could not send it and Telnyx was never called, or unconfirmed when Telnyx never answered and the text may have gone out. For PENDING why the last try was put off.

string | null
recipient
required

The phone texted, E.164.

string
status
required
string
Allowed values: PENDING SENT DELIVERED UNDELIVERED FAILED SKIPPED
metadata
required

Key/value pairs written by external systems (see PUT /tickets/{id}/metadata).

Array<object>
object
key
required
string
type
required

How the value is validated and displayed: text, paragraph, number, date, url or checkbox.

string
Allowed values: text paragraph number date url checkbox
value
required
string
number
required

Workspace-scoped sequential ticket number.

integer
>= -9007199254740991 <= 9007199254740991
order
required

The order this ticket is linked to, when set.

Any of:
object
id
required
string
name
required
string
priority
required
string
Allowed values: NONE LOW MEDIUM HIGH URGENT
ratedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
rating
required

The client’s 1-5 rating, given once the ticket closed. Null until rated.

Any of:
integer
>= 1 <= 5
ratingComment
required
string | null
requester
required

Member who opened the ticket; the workspace’s system account for one opened by email, or by a text from a number no contact has (see smsNumber).

object
email
required
string
memberId
required
string
name
required
string
smsNumber
required

E.164 phone of a ticket opened by an incoming text, or the requester’s phone once the team texted them from the ticket: its texts land on this ticket while it is open. Who asked when no contact has that number.

string | null
source
required

Where the ticket originated from: the client portal, inbound email, the REST API/MCP surface, an in-app agent, or an incoming text (SMS).

string
Allowed values: PORTAL EMAIL API AGENT SMS SLACK
status
required
Any of:

A workspace-defined helpdesk ticket status.

object
category
required

SLA-relevant grouping. WAITING_ON_CLIENT pauses the SLA clock (see the SLA settings); every other category runs it.

string
Allowed values: OPEN IN_PROGRESS WAITING_ON_CLIENT RESOLVED
color
required
string
id
required
string
isTerminal
required

Entering this status closes the ticket (sets closedAt).

boolean
name
required
string
subject
required
string
tags
required

Ticket tags from the workspace’s ticket tag catalog.

Array<object>
object
id
required
string
name
required
string
waitingSince
required

Since when the client has been waiting on the team: their first message after the last agent reply. Null when nobody is waiting.

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
workTaskCount
required

How many internal work tasks are linked to the ticket (see POST /tickets/{id}/promote).

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"data": {
"messages": [
{
"emailDelivery": {
"status": "SKIPPED"
},
"smsDelivery": {
"status": "PENDING"
}
}
],
"metadata": [
{
"type": "text"
}
],
"priority": "NONE",
"source": "PORTAL",
"status": {
"category": "OPEN"
}
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.