Category

How to Retrieve Status IDs for Tickets Using API (Individually & Collectively)

Updated:

In BoldDesk, each ticket status (for example: Open, In Progress, Resolved, Closed) is internally identified using a Status ID.
These Status IDs are required when you:

  • Create tickets via API
  • Update ticket status programmatically
  • Build integrations or automations
  • Sync ticket data with third‑party systems

This article explains how to retrieve Status IDs using the BoldDesk REST API, both:

  • Individually (specific status)
  • Collectively (all available statuses)

Prerequisites

Before proceeding, ensure you have:

  • An active BoldDesk account
  • API access enabled
  • A valid API Key / Access Token
  • Appropriate permissions to read ticket configuration data

Retrieve All Ticket Status IDs (Collective Method)

Use Case

Use this method when you need to:

  • List all available ticket statuses
  • Map status names to IDs for automation rules
  • Initialize integrations or configuration setup

API Endpoint

GET https://{yourdomain}/api/v1/ticket_collections/statuses

Sample API Response

{
  "result": [
    {
      "id": 1,
      "name": "Open",
      "colorCode": "#dffcd8",
      "statusCategory": {
        "id": 1,
        "name": "Pending"
      },
      "fieldOptionId": null
    },
    {
      "id": 2,
      "name": "Closed",
      "colorCode": "#dffcd8",
      "statusCategory": {
        "id": 2,
        "name": "Closed"
      },
      "fieldOptionId": null
    }
  ]
}

Key Fields Explained

  • id → The Status ID used in API operations
  • name → Human‑readable status name
  • statusCategory → Logical grouping (e.g., Pending, Closed)
  • colorCode → UI display color

How to Use the Response

  • Store id values securely in your integration
  • Create a mapping between status names ↔ status IDs
  • Use these IDs when creating or updating tickets via API

Retrieve a Specific Status ID (Individual Method)

Use Case

Use this method when you:

  • Already have a Ticket ID
  • Need to identify the current status and corresponding Status ID of that ticket

API Endpoint (Retrieve by Ticket ID)

GET https://{yourdomain}/api/v1/tickets/{ticketId}

Example API Response (Trimmed to Relevant Fields)

{
  "id": 76,
  "title": "Easter Holiday Travel to Malaysia",
  "status": {
    "description": "Open",
    "textColor": "#000000",
    "backgroundColor": "#6004a8",
    "id": 2
  }
}

How to Identify the Status ID

  • The Status ID is located at:
    status.id
    
  • In this example, the ticket status is "Open" with:
    "id": 2
    

Best Practices

  • Always fetch statuses dynamically during initial setup
  • Avoid hard‑coding Status IDs
  • Re‑validate Status IDs after workflow or configuration changes
  • Cache Status IDs to improve performance
  • Handle missing or disabled statuses gracefully

Common Error Responses

Status Code Meaning Resolution
401 Unauthorized Check API token
403 Forbidden Verify user permissions
404 Not Found Status ID does not exist
429 Rate Limit Reduce request frequency

Frequently Asked Questions (FAQ)

1. Can Status IDs change over time?
No. Status IDs remain unchanged. You can only modify the status name.

2. Should I store Status IDs locally?
Yes, but cache them responsibly and re‑sync when workflows or configurations change.

3. Is there an API to get a status by name?
No direct endpoint exists. Use the collective fetch endpoint and map status names to IDs programmatically.

4. What happens if a Status ID becomes invalid?
API requests using invalid IDs will fail. Implement error handling and re‑fetch status lists.

Related Articles

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied
Access denied
Access denied

No articles or sections found
No articles or sections found