---
title: "Rename and recolor a workflow state."
method: PUT
path: "/v2/scheduler/library/states/{stateId}"
tags: ["Library Posts State Api Service"]
---

# Rename and recolor a workflow state.

`PUT /v2/scheduler/library/states/{stateId}`

## Request

- Base URL: `https://app.metricool.com/api`
- URL: `https://app.metricool.com/api/v2/scheduler/library/states/{stateId}`
- Auth: none declared

## Path parameters

- `stateId` integer, required

## Request body

- SaveLibraryPostStateRequest: Body to create or modify a library workflow state.
  - `name` string, required: Display name of the state (1-20 characters).
  - `color` string, required: Color of the state in #RRGGBB hex format.

## Response `200`

State updated.

- JsonOkResponseLibraryPostStateDto
  - `metadata` object
  - `page` JsonPaging
    - `next` string
  - `data` LibraryPostStateDto: A workflow state of a library post.
    - `id` integer: State id.
    - `name` string: Display name of the state.
    - `color` string: Color of the state.
    - `position` integer: Ordering position of the state within the brand's workflow (ascending).

## Other responses

- `400`: Invalid name or color.
- `403`: User not authorized on the brand.
- `404`: State not found for this brand.
- `409`: Name already in use by another state.

---

[API](https://skmtc.dev/metricool/apis/metricool-api.md) · [All operations](https://skmtc.dev/metricool/apis/metricool-api/llms.txt) · [OpenAPI document](https://skmtc.dev/metricool/apis/metricool-api/revisions/aea9d9a8415a?raw)
