Skip to content

Toggle one emoji reaction on a ticket message

POST
/tickets/{id}/messages/{messageId}/reactions
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/tickets/example/messages/example/reactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "emoji": "example" }'

Adds the caller’s emoji reaction to a ticket message, or takes it back when they already reacted with that same emoji. Returns whether the caller now reacts with it and the message’s reactions afterwards, grouped by emoji. Requires the tickets.manage permission.

id
required

Ticket id.

string
>= 1 characters

Ticket id.

messageId
required

Message id.

string
>= 1 characters

Message id.

Media typeapplication/json
object
emoji
required

Exactly one emoji, e.g. 👍. Reacting twice with it takes it back.

string
>= 1 characters <= 32 characters

Example generated

{
"emoji": "example"
}

The message’s reactions after the toggle.

Media typeapplication/json
object
data
required

A ticket message’s reactions after toggling one emoji for the caller.

object
reacted
required

Whether the caller now reacts with this emoji.

boolean
reactions
required

The message’s reactions afterwards, grouped by emoji.

Array<object>
object
count
required
integer
>= -9007199254740991 <= 9007199254740991
emoji
required
string
memberIds
required

Members who reacted with this emoji.

Array<string>
names
required

Names of those members, same order.

Array<string>

Example generated

{
"data": {
"reacted": true,
"reactions": [
{
"count": 1,
"emoji": "example",
"memberIds": [
"example"
],
"names": [
"example"
]
}
]
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

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

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"
}
}

Invalid input.

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.