Tickets

Manage your tickets using our API.

Access and modify organization's Tickets.

Authorization

All requests must be authenticated and authorized by adding a special Header to each request containing the Organization Key. See how to get your API Keys which must be entered in the Authorization field.

ValueKey
Organization KeyAuthorization

Get all open tickets

This endpoint returns all open tickets.

GET https://hub.xyte.io/core/v1/organization/tickets

Headers

NameTypeDescription
AuthorizationstringAPI_KEY

Response

[
  {
    "id": "b9a53d31...",
    "title": "Ticket title",
    "description": "Ticket description",
    "status": "open",
    "created_at": "2023-07-05T11:37:26Z",
    "device_id": "a3983ff2...",
    "user_name": "Demo User",
    "user_email": "[email protected]"
  }
]

Get information on a specific ticket

GET https://hub.xyte.io/core/v1/organization/tickets/{ticket_id}

Return detailed information on a Ticket.

Path Parameters

NameTypeDescription
ticket_id*stringUnique ID of a ticket

Headers

NameTypeDescription
Authorization*stringAPI_KEY

Response

{
  "id": "b9a53d31...",
  "title": "Ticket title ",
  "description": "Ticket description",
  "status": "resolved",
  "created_at": "2023-07-05T11:37:26Z",
  "device_id": "a3983ff2...",
  "user_name": "Demo User",
  "user_email": "[email protected]",
  "comments": [
    {
      "id": 1,
      "text": "Cannot open door",
      "created_at": "2023-08-14T06:22:42.310Z",
      "system": false,
      "user": "Demo User",
      "owner": "Xyte Lab",
      "owner_type": "organization"
    }
  ]
}

Update a ticket

This endpoint lets you update a ticket's status.

PUT https://hub.xyte.io/core/v1/organization/tickets/{ticket_id}

Path Parameters

NameTypeDescription
ticket_id*stringUnique ticket ID

Headers

NameTypeDescription
Authorization*stringAPI_KEY

Request Body

NameTypeDescription
titlestringNew ticket title
descriptionstringNew ticket description

Response

Detailed ticket information - see Get Ticket API

Mark a ticket as resolved

This endpoint lets you mark a ticket as resolved.

POST https://hub.xyte.io/core/v1/organization/tickets/{ticket_id}/resolved

Path Parameters

NameTypeDescription
ticket_id*stringUnique Ticket ID

Headers

NameTypeDescription
Authorization*stringAPI_KEY

Response

{
    "success": true
}
{
  "error": "Cannot move from resolved to resolved"
}

Add a comment to a ticket

This endpoint lets you add a comment to an existing Ticket.

POST https://hub.xyte.io/core/v1/organization/tickets/{ticket_id}/message

Path Parameters

NameTypeDescription
ticket_id*stringUnique Ticket ID

Headers

NameTypeDescription
Authorization*stringAPI_KEY

Request Body

NameTypeDescription
message*stringComment to add

Response

{
  "success": true
}

Error Handling

  • 401 Unauthorized: the api_key is not provided or is invalid.
  • 403 Forbidden: the user does not have permission to perform the requested action.
  • 422 Unprocessable Entity: a required parameter is missing or invalid.