Skip to content

GET   /tickets/{ticketId}

Get a ticket by ID

Retrieves a specific ticket by its ID. The user must have access to the account that owns the ticket.

Authentication Required

Authorization: Bearer {token}   header string

This header is required to access this endpoint

Required Parameters

x-account-id   header string

Account ID for the request

ticketId   path string

The unique ID of the ticket to retrieve

Try it out

Loading...

Output:

Responses

Description

Successful response

{
"id": 0,
"uniqueId": "string",
"accountId": "string",
"ticketNumber": "string",
"ticketTypeId": "string",
"subject": "string",
"description": "string",
"status": "string",
"priority": "string",
"category": "string",
"source": "string",
"requesterId": "string",
"requesterName": "string",
"requesterEmail": "string",
"requesterPhone": "string",
"requesterType": "string",
"assignedTo": "string",
"assignedTeamId": 0,
"merchantId": 0,
"merchantName": "string",
"leadId": 0,
"applicationId": "string",
"midId": 0,
"createdAt": "string",
"updatedAt": "string",
"resolvedAt": "string",
"closedAt": "string",
"lastResponseAt": "string",
"lastCustomerResponseAt": "string",
"slaStatus": "string",
"slaFirstResponseDue": "string",
"slaFirstResponseMet": false,
"slaResolutionDue": "string",
"slaResolutionMet": false,
"slaBreachedAt": "string",
"slaPausedAt": "string",
"slaTotalPausedTime": 0,
"responseCount": 0,
"internalNoteCount": 0,
"attachmentCount": 0,
"reopenCount": 0,
"escalationCount": 0,
"firstResponseTime": 0,
"resolutionTime": 0,
"customFields": {},
"tags": [
"string"
],
"metaData": {}
}

References

#/components/parameters/xAccountIdHeader

in: header
name: x-account-id
schema:
type: string
description: Account ID for the request
required: true
example: "2311"

#/components/schemas/Ticket

type: object
description: Ticket object representing a customer support ticket
properties:
id:
type: integer
description: Internal database ID
uniqueId:
type: string
description: Unique identifier for the ticket
accountId:
type: string
description: ID of the account that owns this ticket
ticketNumber:
type: string
description: Human-readable ticket number (e.g., TKT-12345)
ticketTypeId:
type: string
description: ID of the ticket type
subject:
type: string
description: Subject line of the ticket
description:
type: string
description: Detailed description of the ticket
status:
type: string
enum:
- open
- in_progress
- waiting_customer
- waiting_internal
- resolved
- closed
description: Current status of the ticket
priority:
type: string
enum:
- low
- medium
- high
- urgent
description: Priority level of the ticket
category:
type: string
enum:
- technical
- billing
- account
- compliance
- feature_request
- underwriting
- general_support
- general_forms
- retention
- activations
- fee_change_forms
- bank_submissions
description: Category of the ticket
source:
type: string
enum:
- email
- phone
- portal
- internal
- api
description: Source where the ticket was created
requesterId:
type: string
description: ID of the person/entity who requested the ticket
requesterName:
type: string
description: Name of the requester (auto-derived for non-external types)
requesterEmail:
type: string
description: Email of the requester (auto-derived for non-external types)
requesterPhone:
type: string
description: Phone number of the requester (auto-derived for non-external types)
requesterType:
type: string
enum:
- application
- lead
- user
- merchant
- merchant-internal
- mid
- external
description: >
Type of requester. For types other than 'external', name/email/phone are
automatically derived from the related entity. For 'external', these
fields must be provided in the request.
assignedTo:
type: string
description: User ID of the person assigned to this ticket
assignedTeamId:
type: integer
description: Team ID assigned to this ticket
merchantId:
type: integer
description: ID of the related merchant
merchantName:
type: string
description: Name of the related merchant
leadId:
type: integer
description: ID of the related lead
applicationId:
type: string
description: ID of the related application
midId:
type: integer
description: ID of the related MID
createdAt:
type: string
format: date-time
description: When the ticket was created
updatedAt:
type: string
format: date-time
description: When the ticket was last updated
resolvedAt:
type: string
format: date-time
description: When the ticket was resolved
closedAt:
type: string
format: date-time
description: When the ticket was closed
lastResponseAt:
type: string
format: date-time
description: When the last response was added
lastCustomerResponseAt:
type: string
format: date-time
description: When the last customer response was added
slaStatus:
type: string
enum:
- on_time
- at_risk
- breached
- paused
description: SLA status of the ticket
slaFirstResponseDue:
type: string
format: date-time
description: When the first response is due per SLA
slaFirstResponseMet:
type: boolean
description: Whether the first response SLA was met
slaResolutionDue:
type: string
format: date-time
description: When the resolution is due per SLA
slaResolutionMet:
type: boolean
description: Whether the resolution SLA was met
slaBreachedAt:
type: string
format: date-time
description: When the SLA was breached
slaPausedAt:
type: string
format: date-time
description: When the SLA was paused
slaTotalPausedTime:
type: integer
description: Total time SLA was paused (in minutes)
responseCount:
type: integer
description: Number of responses on this ticket
internalNoteCount:
type: integer
description: Number of internal notes on this ticket
attachmentCount:
type: integer
description: Number of attachments on this ticket
reopenCount:
type: integer
description: Number of times this ticket was reopened
escalationCount:
type: integer
description: Number of times this ticket was escalated
firstResponseTime:
type: integer
description: Time to first response (in minutes)
resolutionTime:
type: integer
description: Time to resolution (in minutes)
customFields:
type: object
description: Custom fields specific to the ticket type
tags:
type: array
items:
type: string
description: Tags associated with the ticket
metaData:
type: object
description: Additional metadata
required:
- id
- uniqueId
- accountId
- ticketNumber
- subject
- description
- status
- priority
- category
- source
- requesterId
- requesterName
- requesterEmail
- requesterType

Route Source Code

Check out the source code for this route entrypoint here: /tickets/[ticketId]/route.ts

Or the swagger.yaml spec this documentation was generated from: /tickets/swagger.yaml