Get a ticket with its whole thread
GET
/products/{productId}/tickets/{id}
const url = 'https://api.motenya.app/v1/products/example/tickets/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.motenya.app/v1/products/example/tickets/example \ --header 'Authorization: Bearer <token>'Requires tickets:read.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”productId
required
string
id
required
string
Responses
Section titled “Responses”Success
Media typeapplication/json
object
ticket
required
object
id
required
string
productId
required
string
number
required
integer
subject
required
string | null
status
required
string
priority
required
string
source
required
string
channelId
required
string | null
requester
required
object
id
required
string
email
required
string
name
required
string | null
contactId
required
The CRM contact; null for a lead.
string | null
storeIds
required
Array<string>
assigneeUserId
required
string | null
tags
required
Array<string>
mergedIntoTicketId
required
string | null
createdAt
required
string
updatedAt
required
string
lastActivityAt
required
string
key
additional properties
messages
required
Array<object>
REPLY adds sendState and sendError; EVENT adds change, merge and automatedReason.
object
id
required
string
kind
required
string
fromAddress
required
string | null
fromName
required
string | null
authorUserId
required
The teammate, or apikey:<id> for a key.
string | null
subject
required
string | null
bodyText
required
string | null
bodyHtml
required
string | null
attachments
required
Array<object>
object
id
required
string
filename
required
string | null
contentType
required
string
size
required
integer
key
additional properties
createdAt
required
string
key
additional properties
previousTicket
required
object
id
required
string
number
required
integer
subject
required
string | null
mergedInto
required
object
id
required
string
number
required
integer
subject
required
string | null
Example
{ "ticket": { "status": "OPEN", "priority": "LOW", "source": "EMAIL" }, "messages": [ { "kind": "CUSTOMER" } ]}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing, invalid, revoked or expired API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string
Example
{ "error": { "code": "SLUG_TAKEN" }}Missing scope, API turned off, published article without publish scope, or account suspended
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string
Example
{ "error": { "code": "SLUG_TAKEN" }}Not found, or outside the knowledge bases this key may use
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string
Example
{ "error": { "code": "SLUG_TAKEN" }}Slug or translation already exists
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string
Example
{ "error": { "code": "SLUG_TAKEN" }}Rejected by validation (e.g. unknown language or category)
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string
Example
{ "error": { "code": "SLUG_TAKEN" }}Rate limited; see Retry-After
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string
Example
{ "error": { "code": "SLUG_TAKEN" }}Internal error