PUT /wiki/rest/api/content/{id}/state

Sets the content state of the content specified and creates a new version (publishes the content without changing the body) of the content with the new state.

You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id will be used. If the name and color passed in already exist under the current user's existing custom states, the existing state will be reused. If custom states are disabled in the space of the content (which can be determined by getting the content state space settings of the content's space) then this set will fail.

You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is required in the body of this request.

Permissions required: Permission to edit the content.

Servers

Path parameters

Name Type Required Description
id String Yes

The Id of the content whose content state is to be set.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
status String Yes

Status of content onto which state will be placed. If draft, then draft state will change. If current, state will be placed onto a new version of the content with same body as previous version.

Possible values:

  • "current"
  • "draft"

Request body fields

Name Type Required Description
id Integer No

id of state. This can be 0,1, or 2 if you wish to specify a default space state.

name String No

Name of content state. Maximum 20 characters.

color String No

Color of state. Must be in 6 digit hex form (#FFFFFF). The default colors offered in the UI are: #ff7452 (red), #2684ff (blue), #ffc400 (yellow), #57d9a3 (green), and #8777d9 (purple)

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.