Tickets
As the name suggests, tickets are a core part of klink.cloud — they allow you to track and manage customer issues and requests. On this page, we'll dive into the different ticket endpoints you can use to manage tickets programmatically. We'll look at how to query tickets and filter them by various attributes.
The Ticket Model
The ticket model contains all the information about your tickets, such as their status, priority, and associated contact.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the ticket.
- Name
ticketNumber
- Type
- number
- Description
The ticket reference number.
- Name
title
- Type
- string
- Description
The title or subject of the ticket.
- Name
description
- Type
- string
- Description
Detailed description of the ticket issue or request.
- Name
status
- Type
- string
- Description
Current status of the ticket (e.g., open, in progress, resolved, pending).
- Name
priority
- Type
- string
- Description
Priority level of the ticket (e.g., low, medium, high).
- Name
channel
- Type
- string
- Description
The channel through which the ticket was created (e.g., mail, line).
- Name
type
- Type
- string
- Description
The type of the ticket.
- Name
ticketType
- Type
- string
- Description
Classification of the ticket type.
- Name
contactId
- Type
- string
- Description
Unique identifier of the contact associated with this ticket.
- Name
creatorId
- Type
- string
- Description
Unique identifier of the user who created this ticket.
- Name
assigneeId
- Type
- string
- Description
Unique identifier of the agent assigned to handle this ticket.
- Name
reasonToAssign
- Type
- string
- Description
Reason for assigning the ticket to a specific agent.
- Name
contact
- Type
- object
- Description
The contact associated with this ticket, including details like name, address, and channel.
- Name
creator
- Type
- object
- Description
The user who created this ticket, including details like name and email.
- Name
tags
- Type
- array of objects
- Description
Associated tags with this ticket, each containing id, name, and other metadata.
- Name
categories
- Type
- array of objects
- Description
Categories assigned to this ticket.
- Name
assignee
- Type
- object
- Description
The agent assigned to handle this ticket, including details like name and email.
- Name
customFields
- Type
- array of objects
- Description
Custom fields associated with the ticket, each containing attribute information and values.
- Name
createdAt
- Type
- timestamp
- Description
Timestamp of when the ticket was created.
- Name
updatedAt
- Type
- timestamp
- Description
Timestamp of when the ticket was last updated.
- Name
deletedAt
- Type
- timestamp
- Description
Timestamp of when the ticket was deleted, or null if not deleted.
List all tickets
This endpoint allows you to retrieve a paginated list of all your tickets. By default, a maximum of ten tickets are shown per page.
Optional attributes
- Name
page
- Type
- number
- Description
Page number for pagination.
- Name
pageSize
- Type
- number
- Description
Number of tickets to return per page.
- Name
selectedDate
- Type
- string
- Description
Filter tickets by date range.
- Name
ticketNumber
- Type
- string
- Description
Filter tickets by ticket number.
- Name
keyword
- Type
- string
- Description
Search tickets by keyword.
- Name
title
- Type
- string
- Description
Filter tickets by title.
- Name
description
- Type
- string
- Description
Filter tickets by description.
- Name
status
- Type
- array of strings
- Description
Filter tickets by status.
- Name
priority
- Type
- array of strings
- Description
Filter tickets by priority level.
- Name
channel
- Type
- array of strings
- Description
Filter tickets by channel.
- Name
type
- Type
- array of strings
- Description
Filter tickets by type.
- Name
ticketType
- Type
- array of strings
- Description
Filter tickets by ticket type.
- Name
contact
- Type
- array of strings
- Description
Filter tickets by associated contact.
- Name
tags
- Type
- array of UUIDs
- Description
Filter tickets by associated tags.
- Name
categories
- Type
- array of UUIDs
- Description
Filter tickets by categories.
- Name
assignee
- Type
- array of UUIDs
- Description
Filter tickets by assigned agent.
- Name
customFields
- Type
- array of objects
- Description
Filter tickets by custom fields. Each object should contain attributeId, type, and value.
Request
curl -G https://api.klink.cloud/api/v1/tickets \
-H "Authorization: Bearer {token}" \
-d page=1 \
-d pageSize=10
Response
{
"total": number,
"page": number,
"pageSize": number,
"lastPage": number,
"data": [
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"title": "string",
"description": "string",
"type": "string",
"channel": "string",
"priority": "string",
"status": "string",
"contactId": "string",
"creatorId": "string",
"assigneeId": "string",
"reasonToAssign": "string",
"ticketNumber": number,
"assignee": {
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"name": "string",
"email": "string",
"address": null,
"phone": "string",
"notificationCount": null,
"provider": null,
"providerId": null,
"firstName": null,
"lastName": null
},
"contact": {
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"name": "string",
"address": "string",
"channel": "string",
"notes": "string",
"contactNumber": number,
"companyId": null,
"contactProfile": "string",
"socialProfileUrl": null
},
"creator": {
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"name": "string",
"email": "string",
"address": null,
"phone": "string",
"notificationCount": number,
"provider": null,
"providerId": null,
"firstName": null,
"lastName": null
},
"categories": [],
"tags": [
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"name": "string",
"position": number
}
],
"customFields": [
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"textValue": "string",
"booleanValue": null,
"numberValue": null,
"dateValue": null,
"entityId": "string",
"attributeId": "string",
"attribute": {
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"systemName": "string",
"displayName": "string",
"type": "string",
"position": number,
"isDefault": false,
"isArchived": false,
"isRequired": false,
"isUnique": false,
"groupId": "string"
},
"uploads": []
}
]
},
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"title": "string",
"description": "string",
"type": "string",
"channel": "string",
"priority": "string",
"status": "string",
"contactId": "string",
"creatorId": "string",
"assigneeId": "string",
"reasonToAssign": "string",
"ticketNumber": number
// ... additional fields omitted for brevity
}
]
}
Get tickets by contact ID
This endpoint allows you to retrieve a paginated list of all tickets associated with a specific contact. By default, a maximum of ten tickets are shown per page.
Required path parameters
- Name
id
- Type
- string
- Description
The unique identifier of the contact.
Optional query parameters
- Name
page
- Type
- number
- Description
Page number for pagination (default: 1).
- Name
pageSize
- Type
- number
- Description
Number of tickets to return per page (default: 10).
Request
curl -G https://api.klink.cloud/api/v1/tickets/contact/:id \
-H "Authorization: Bearer {token}" \
-d page=1 \
-d pageSize=10
Response
{
"total": number,
"page": number,
"pageSize": number,
"lastPage": number,
"data": [
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"title": "string",
"description": "string",
"type": "string",
"channel": "string",
"priority": "string",
"status": "string",
"contactId": "string",
"creatorId": "string",
"assigneeId": "string",
"reasonToAssign": "string",
"ticketNumber": number,
"assignee": {
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"name": "string",
"email": "string",
"address": null,
"phone": "string",
"notificationCount": null,
"provider": null,
"providerId": null,
"firstName": null,
"lastName": null
},
"contact": {
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"name": "string",
"address": "string",
"channel": "string",
"notes": "string",
"contactNumber": number,
"companyId": null,
"contactProfile": "string",
"socialProfileUrl": null
},
"creator": {
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"name": "string",
"email": "string",
"address": null,
"phone": "string",
"notificationCount": number,
"provider": null,
"providerId": null,
"firstName": null,
"lastName": null
},
"categories": [],
"tags": [
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"name": "string",
"position": number
}
],
"customFields": [
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"textValue": "string",
"booleanValue": null,
"numberValue": null,
"dateValue": null,
"entityId": "string",
"attributeId": "string",
"attribute": {
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"deletedAt": null,
"systemName": "string",
"displayName": "string",
"type": "string",
"position": number,
"isDefault": false,
"isArchived": false,
"isRequired": false,
"isUnique": false,
"groupId": "string"
},
"uploads": []
}
]
}
]
}