# Change a task's status

```http
PUT https://secure.yoprint.com/v2/api/store/{team_slug}/v2/work_pipeline/{hash_id}/status
```

- API version: v2
- Operation ID: `v2_public_job_work_pipeline_change_status`
- Section: Production › [Tasks](https://developer.yoprint.com/reference/tasks.md)
- Web page: https://developer.yoprint.com/reference/tasks/v2-job-work-pipeline-change-status/
- Authentication: `Authorization: Bearer YOUR_API_KEY`

Moves a task to another status of its task preset. Returns the task with `previous_status_id` and `previous_status`.

Completing every task doesn't change the job's status: change it with Change a job's status.

## Permission

Any member of the team.

## Business rules

- The status must belong to the task's preset: otherwise 422 `invalid_status_selection` ("Selected status is not part of task preset").

## Side effects

- Sends the `work_pipeline.status_changed` webhook when the status really changed, and records the status history and `status_last_change_date` (and `status_completion_date` for a Completed status).

## Path parameters

- `team_slug` (string, required): Your team slug, shown as Team ID next to your API key in Profile. Example `your-team`.
- `hash_id` (string, required): The task's hash id. Hash ids only: a unique key or a document number gives 404. Example `hpioY1gDBQZdbI`.

## Request body

Content type `application/json`, required.

Fields:

- `status_id` (string, required): A status of the task's preset (from List task statuses).
- `notify_customer` (boolean | null, optional): Accepted and ignored.

### Example request

```bash
curl -X PUT 'https://secure.yoprint.com/v2/api/store/your-team/v2/work_pipeline/hpioY1gDBQZdbI/status' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'X-Yoprint-Decimal-Format: exact-v1' \
  -H 'Content-Type: application/json' \
  -d '{
    "status_id": "hTFITko5Q0R83y"
  }'
```

## Response

`200` Successful response.

Fields:

- `data` (object, required): The task after the change, with the status it had before.
  - `assigned_users` (array of objects, optional): Who is assigned.
    - Each item:
      - `avatar_url` (string | null, optional)
      - `id` (string, optional): The user.
      - `name` (string, optional)
  - `created_at` (string (date-time), optional)
  - `due_date` (string (date-time) | null, optional): Task due date. ISO 8601 with offset, or null.
  - `id` (string, optional): The task.
  - `job_id` (string, optional): The job.
  - `job_is_rush` (boolean | integer | null, optional)
  - `job_item_count` (number | null, optional)
  - `job_name` (string | null, optional)
  - `job_scoped_id` (string, optional): The job number with its prefix.
  - `job_status_id` (string | null, optional): The job's current status.
  - `name` (string, optional)
  - `note` (string | null, optional)
  - `order_id` (string, optional): The order.
  - `order_name` (string | null, optional)
  - `order_scoped_id` (string | null, optional): The order number.
  - `pipeline_id` (string, optional): The task preset it comes from.
  - `position` (integer, optional): Order among tasks; lower comes first. 0 when unset.
  - `previous_status` (object, optional): A status: label, kind and place in the list.
    - `color` (string | null, optional): Hex color.
    - `customer_label` (string, optional)
    - `id` (string, optional): The status.
    - `label` (string, optional)
    - `pipeline_id` (string, optional): Only on the statuses of a task preset (`role` `pipeline`): the task preset. Absent on other statuses.
    - `position` (integer, optional): Its place in the team's list: sort by it to find the next status.
    - `role` (string, optional): Which list it belongs to: `job` for job statuses, `pipeline` for the statuses of a task preset. One of: `"order"`, `"quote"`, `"job"`, `"purchase_order"`, `"shipment"`, `"customer_message"`, `"pipeline"`.
    - `trashed` (boolean, optional): The status was deleted.
    - `type` (string, optional): The kind of status: `start` (Pending), `pre_production` and `in_progress` (In Progress), `end` (Completed). One of: `"start"`, `"pre_production"`, `"in_progress"`, `"end"`.
  - `previous_status_id` (string | null, optional): The status before this call.
  - `sales_order` (object, optional): A summary of the job's order.
    - `created_by` (string | null, optional): Who created the order.
    - `cust_due_date` (string (date-time) | null, optional): Order customer due (in-hand) date. ISO 8601 with offset, or null.
    - `customer_id` (string | null, optional): The customer.
    - `customer_name` (string | null, optional)
    - `due_date` (string (date-time) | null, optional): Order production due date. ISO 8601 with offset, or null.
    - `external_type` (string | null, optional): `shopify` when the order came from Shopify, else null.
    - `is_quote` (boolean, optional)
    - `issue_date` (string (date-time) | null, optional): Order issue date. ISO 8601 with offset, or null.
    - `object_type` (string | null, optional): `sales_order` or `quote`.
    - `ship_due_date` (string (date-time) | null, optional): Order ship-by date. ISO 8601 with offset, or null.
    - `shopify_deleted_externally` (boolean, optional)
    - `shopify_deleted_externally_at` (string (date-time) | null, optional): When it was deleted in Shopify. ISO 8601 with offset, or null.
    - `start_date` (string (date-time) | null, optional): Order production start. ISO 8601 with offset, or null.
    - `status_id` (string | null, optional): The order status.
  - `start_date` (string (date-time) | null, optional): Task start. ISO 8601 with offset, or null.
  - `status` (object, optional): A status: label, kind and place in the list. Same fields as `data.previous_status` above.
  - `status_completion_date` (string (date-time) | null, optional): When it reached a Completed status. ISO 8601 with offset, or null.
  - `status_id` (string, optional): The task's status (a status of its task preset).
  - `status_last_change_date` (string (date-time) | null, optional): When the status last changed. ISO 8601 with offset, or null.
  - `updated_at` (string (date-time), optional)
- `status` (integer, required)
- `success` (boolean, required)

Example response:

```json
{
  "data": {
    "assigned_users": [
      {
        "avatar_url": null,
        "id": "4mdDkMg3dgQOa3",
        "name": "Alex Rivera"
      }
    ],
    "created_at": "2026-11-03T15:00:00+00:00",
    "due_date": "2026-11-05T17:00:00+00:00",
    "id": "hpioY1gDBQZdbI",
    "job_id": "WaGvtaWsx7Kcn4",
    "job_is_rush": 1,
    "job_item_count": 48,
    "job_name": "Front print",
    "job_scoped_id": "JOB-2419",
    "job_status_id": "scaWHQnPLtqMPT",
    "name": "Burn screens",
    "note": null,
    "order_id": "sFbALVSYD55eXe",
    "order_name": "Team shirts",
    "order_scoped_id": "SO1001",
    "pipeline_id": "SE3SfXjt6dPfnH",
    "position": 1,
    "previous_status": {
      "color": "#9e9e9e",
      "customer_label": "Pending",
      "id": "P32Ic61q2HqUCD",
      "label": "To do",
      "pipeline_id": "SE3SfXjt6dPfnH",
      "position": 1,
      "role": "pipeline",
      "trashed": false,
      "type": "start"
    },
    "previous_status_id": "P32Ic61q2HqUCD",
    "sales_order": {
      "customer_id": "ifAHmADekGZ6id",
      "customer_name": "Northwind Apparel",
      "is_quote": false,
      "object_type": "sales_order",
      "status_id": "wgbOT87gGZvhgy"
    },
    "start_date": "2026-11-04T09:00:00+00:00",
    "status": {
      "color": "#2196f3",
      "customer_label": "In Progress",
      "id": "hTFITko5Q0R83y",
      "label": "Burning",
      "pipeline_id": "SE3SfXjt6dPfnH",
      "position": 2,
      "role": "pipeline",
      "trashed": false,
      "type": "in_progress"
    },
    "status_completion_date": null,
    "status_id": "hTFITko5Q0R83y",
    "status_last_change_date": "2026-11-03T15:05:00+00:00",
    "updated_at": "2026-11-03T15:05:00+00:00"
  },
  "status": 200,
  "success": true
}
```

## Errors

- `401` The API key is missing or wrong (`unauthenticated`).
- `403` You are not allowed to do this. `api_access_not_in_plan`: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only `{"message": "Insufficient Permission"}`. Other refusals use the error envelope, with `unauthorized` or `user_is_not_authorized`.
- `404` Not found. `page_not_found`: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. `code: null`, with a message that starts "No query results for": there is no record with that id.
  - When: The task or the status isn't your team's. Fix: Check the ids.
- `422` The request was refused and changed nothing. `validation_failed` lists what to fix in `error.fields`; other codes name a business rule, explained in `error.message`. A few checks answer with only `{"message": "..."}`. An operation that calls another service (a payment provider, a carrier, an accounting app) can answer `connect_timeout` ("Please retry again") when that service does not answer in time: the change may or may not have happened there, so read the record back before you retry.
  - When: The status is from another preset (`invalid_status_selection`), or `status_id` is missing. Fix: Use a status of the task's preset.

## Related

- [List the task statuses of a task preset](https://developer.yoprint.com/reference/statuses/v1-status-list-pipeline.md): `GET /v1/api/store/{team_slug}/setting/status/pipeline/{hash_id}`
- [Change a job's status](https://developer.yoprint.com/reference/jobs/v2-job-change-status.md): `PUT /v2/api/store/{team_slug}/v2/job/{hash_id}/status`
