---
title: "Get Task States of Task Type"
slug: "gettaskstatesoftasktype"
updated: 2026-04-15T06:35:25Z
published: 2026-04-15T06:35:25Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.12dsynergy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Task States of Task Type

This tutorial demonstrates how to get the task states of the task types via the RESTful API.

The commands are provided in curl and can be run from the command prompt when the 12d Synergy Server is running (or in a batch script)

> [!NOTE]
> Additional API documentation
> 
> To get a list of most of the API requests available, with the 12d Synergy server running, browse [http://synergy.myserver.com/api-docs/ui/index](http://localhost:8080/api-docs/ui/index).
> 
> (Replace [synergy.myserver.com](http://synergy.myserver.com/) with the external server address and update the port numbers if necessary.)

### 1.1. Getting the Personal Access Token to access API

The tutorial for getting the PAT is here: [Generate PAT in Web client](/v1/docs/webclientgenerateapersonalaccesstokenpatinwebclientdoc).

### 1.2. Getting the Task Type ID from the List of Task Types

To get the task type ID, you can follow the steps here: [Get Task Types](/v1/docs/gettasktypesdoc)

### 1.3. Get a specific task type state

This request is in the API Documentation under Tasks marked 'Get task states of a task type'.

Once you have the value for task_type_id, include it as a query parameter.

**Sample Request**

```SampleRequest
curl --location 'http://localhost:8080/api/v1/tasks/getTaskStates?task_type_id={task-type-id-here}' \

--header 'Authorization: Bearer <your-token-here>' \

--header 'Content-Type: application/json' \
```

Below is a sample response when getting the task states for a specific task type. Click ![](https://cdn.document360.io/36833d89-59e3-46a5-b491-e9aa1b524a85/Images/Documentation/expand.png) in the line below to see the code.

****Sample Response****

```SampleResponse
[

    {

        "is_closure": 0,

        "id": {

            "_id": 1,

            "_server_id": 1,

            "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",

            "IDString": "1_1"

        },

        "name": "Not Started",

        "sort_order": 1,

        "attributes": [],

        "completion_percentage": null

    },

    {

        "is_closure": 0,

        "id": {

            "_id": 2,

            "_server_id": 1,

            "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",

            "IDString": "2_1"

        },

        "name": "In Progress",

        "sort_order": 2,

        "attributes": [],

        "completion_percentage": null

    },

    {

        "is_closure": 1,

        "id": {

            "_id": 3,

            "_server_id": 1,

            "_server_guid": "b993c729-bf98-490c-989d-5621e3b48139",

            "IDString": "3_1"

        },

        "name": "Closed",

        "sort_order": 3,

        "attributes": [],

        "completion_percentage": null

    }

]
```
