> For the complete documentation index, see [llms.txt](https://annotationdocs.telusinternational.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://annotationdocs.telusinternational.com/basic-operations/create-a-job.md).

# Create a job

A JOB

<mark style="color:green;">`POST`</mark> `https://api.playment.io/v1/projects/:project_id/jobs`

This endpoint allows you to create a job

#### Path Parameters

| Name        | Type   | Description                                           |
| ----------- | ------ | ----------------------------------------------------- |
| project\_id | string | ID of the project in which you want to create the job |

#### Headers

| Name      | Type   | Description                |
| --------- | ------ | -------------------------- |
| x-api-key | string | API key for authentication |

#### Request Body

| Name           | Type   | Description                                                                                                                                                                                                                                                                                                            |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| batch\_id      | string | <p>A batch is a way to organize multiple jobs under one <code>batch\_id</code>.  You can create new batches from the dashboard or by using the batch creation API.<br><br>If <code>batch\_id</code> is left empty or the key is not present, the job is created in the <code>Default batch</code> in your project.</p> |
| work\_flow\_id | string | The ID of the workflow inside which you want to create the job                                                                                                                                                                                                                                                         |
| data           | object | The `data` object contains all the information and attachments required to label a job. The `data` object is defined below                                                                                                                                                                                             |
| reference\_id  | string | Your unique identifier for the job. We suggest you use a UUID or incremental counter such that each job has a unique reference\_id                                                                                                                                                                                     |

{% tabs %}
{% tab title="200 Job successfully created" %}

```javascript
{
  "data": {
    "job_id": "3f3e8675-ca69-46d7-aa34-96f90fcbb732",
    "reference_id": "001",
    "work_flow_id": "2aae1234-acac-1234-eeff-12a22a237bbc"
  },
  "success": true
}
```

{% endtab %}

{% tab title="400 " %}

```javascript
{
    "error": {
        "code": "FS_0003",
        "message": "Invalid data passed",
        "errors": [
            {
                "validation_code": "MANDATORY_FIELD_EMPTY",
                "meta_data": {
                    "fields": [
                        "sensor_data"
                    ]
                }
            }
        ]
    },
    "success": false
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
After creating the job, please store the `job_id` received in the response. You'll use this `job_id` to get the annotations later.
{% endhint %}

## Body Parameters

### Project ID

After opening a project, You can find the `project_id` in the information tooltip or URL.

![](/files/-MSbZdk6WTq-M6QFEwDc)

### Workflow ID

![](/files/-MUCbvB53uYhRW1hj5Ak)

### Batch ID

In the Batches section of a project, You can find the `batch_id` in the batch information tooltip.

![](/files/-MSbZa7gkDjcsDdCroEY)

### Payload

The payload data structure varies depending on the type of task

#### Image Annotation & Image Segmentation

{% code title="" %}

```javascript
{  
   "reference_id":"001",
   "data":{
     "image_url":"https://s3.aws.com/600x400/000/fff.jpg"
   },
   "work_flow_id":"2aae1234-acac-1234-eeff-12a22a237bbc"
}
```

{% endcode %}

#### Video Annotation

{% code title="" %}

```javascript
{  
   "reference_id":"001",
   "data":{
     "video_data": {
      "frames": [
        {
          "frame_id": "frame001",
          "src": "https://dummyimage.com/600x400/000/fff.jpg"
        },
        {
          "frame_id": "frame002",
          "src": "https://dummyimage.com/600x400/000/fff.jpg"
        },
        {
          "frame_id": "frame003",
          "src": "https://dummyimage.com/600x400/000/fff.jpg"
        },
        {
          "frame_id": "frame004",
          "src": "https://dummyimage.com/600x400/000/fff.jpg"
        },
        {
          "frame_id": "frame005",
          "src": "https://dummyimage.com/600x400/000/fff.jpg"
        }
      ]
    }
   },
   "work_flow_id":"2aae1234-acac-1234-eeff-12a22a237bbc"
}
```

{% endcode %}

## Attachment Access

The attachments you pass in the job creation requests ultimately need to be made available to the annotators who make the annotations in GT Studio. Depending on the type of workforce and whether you agree to give TELUS International access to your data, there are a couple of methods through which you can provide access to these attachments:

| Workforce Type                     | TELUS International can access? | Method                                                    |
| ---------------------------------- | ------------------------------- | --------------------------------------------------------- |
| Managed by TELUS International     | Yes                             | [Secure Access](/secure-attachment-access/attachments.md) |
| Not managed by TELUS International | Yes                             | [Secure Access](/secure-attachment-access/attachments.md) |
| Not managed by TELUS International | No                              | [Hybrid Cloud](/secure-attachment-access/hybrid-cloud.md) |

<figure><img src="/files/BOHfQwkcW8htcD77IbNS" alt=""><figcaption></figcaption></figure>

## Errors

For details on possible errors, please follow this link:

{% content-ref url="/pages/-MSbaltTt1M5dhW-ykLN" %}
[Error Codes](/error-codes/error-codes.md)
{% endcontent-ref %}
