Docs
API Reference

Job Statuses

Manage the configurable status values a job can move through

Job statuses define the workflow states a job moves through. Every organisation starts with four built-in statuses — Open, In Progress, Completed, and Closed (type: default) — and you can add your own custom statuses.

A job's status field is a free-form string that typically matches one of these status names. color is a packed ARGB32 integer used by the app.

Naming note

Job statuses are exposed under the /ticket-statuses collection. The Servicebay mobile and web apps use the term ticket status internally; both terms refer to the same resource. The endpoint paths below all begin with /ticket-statuses.

Defaults and in-use statuses are protected

Statuses created via the API are always type: custom. The four built-in (type: default) statuses cannot be deleted (400), and any status still used by a job cannot be deleted (409). The type field cannot be changed through an update.

Endpoints

  • GET/organisations/{orgId}/ticket-statuses — List statuses (ordered by index)
  • POST/organisations/{orgId}/ticket-statuses — Create a custom status
  • GET/organisations/{orgId}/ticket-statuses/{statusId} — Get status
  • PUT/organisations/{orgId}/ticket-statuses/{statusId} — Update status
  • DELETE/organisations/{orgId}/ticket-statuses/{statusId} — Delete status
GET
/organisations/{orgId}/ticket-statuses
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/organisations/string/ticket-statuses"
{  "success": true,  "data": {    "ticketStatuses": [      {        "id": "string",        "name": "string",        "color": 0,        "index": 0,        "type": "string"      }    ]  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

POST
/organisations/{orgId}/ticket-statuses
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/organisations/string/ticket-statuses" \  -H "Content-Type: application/json" \  -d '{    "name": "Awaiting Parts",    "color": 4283215696,    "index": 4  }'
{  "success": true,  "data": {    "id": "string",    "name": "string",    "color": 0,    "index": 0,    "type": "string"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

GET
/organisations/{orgId}/ticket-statuses/{statusId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

statusId*string

Job status ID

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organisations/string/ticket-statuses/string"
{  "success": true,  "data": {    "id": "string",    "name": "string",    "color": 0,    "index": 0,    "type": "string"  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
PUT
/organisations/{orgId}/ticket-statuses/{statusId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

statusId*string

Job status ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/organisations/string/ticket-statuses/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "success": true,  "data": {    "id": "string",    "name": "string",    "color": 0,    "index": 0,    "type": "string"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
DELETE
/organisations/{orgId}/ticket-statuses/{statusId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

statusId*string

Job status ID

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/organisations/string/ticket-statuses/string"
{  "success": true,  "data": {    "message": "Operation completed successfully"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

Machine-readable version: OpenAPI 3.1 spec.

On this page