Library Posts State Api Service

Set or clear the workflow state of several library posts in one request.

Best-effort: ids that do not resolve to a live post of the brand come back in 'failures' and do not stop the rest of the selection from moving. Every post that actually changes state records it in its activity history; one already in the target state is returned as succeeded without an entry. At most 500 ids per request.

put/v2/scheduler/library/posts/state

Request

  • Base URL: https://app.metricool.com/api
  • URL: https://app.metricool.com/api/v2/scheduler/library/posts/state
  • Auth: none declared

Request body

postIdsinteger[] required

Ids of the library posts to move. Must not be empty; duplicates are collapsed.

stateIdinteger

Workflow state id to set on every post; null (or omitted) to move them to 'Sin asignar'.

Example request

{
  "stateId": 123
}

Response

Request processed. Partial success lives here too: 'succeeded' and 'failures' coexist in the same 200 response.

metadataobject

Example response

{
  "data": {
    "succeeded": [
      {
        "notes": [
          {
            "mentions": [
              {
                "userId": 12345,
                "agencyId": 37,
                "agencyUserId": 156
              }
            ],
            "mentionId": "a:37:156"
          }
        ],
        "assignee": {
          "userId": 12345,
          "agencyId": 42,
          "agencyUserId": 7
        },
        "state": {
          "id": 123
        }
      }
    ],
    "failures": [
      {
        "postId": 8802
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 6 revisions of this API.