[Go to site: main page, start]

REST APIGET

Labels

List the labels of your AdaptlyPost workspace and put them on posts through the API, for example one label per brand.

GEThttps://post.adaptlypost.com/post/api/v1/labels

List the labels of the workspace, sorted by name. Labels are created in the AdaptlyPost app.

API Key (Bearer token)
Permission:posts.readRoles and permissions

Usage

Labels group posts inside AdaptlyPost, for example one label per brand. Pass label IDs in labelIds when you create or update a post, or as the labelIds filter of List Posts. Every post in a response carries its labels as { id, name, color }. Labels are created, renamed and deleted in the AdaptlyPost app, not through the API.

A post takes up to 10 labels. An ID that is not a label of the workspace, such as one from another workspace or one that does not exist, returns 400 with a message that points to GET /labels.

Labels are never sent to a social platform. Every platform and content type takes them the same way.

Set the labels of a post

PUThttps://post.adaptlypost.com/post/api/v1/social-posts/:id/labels

Replace every label of a post in any status, published posts included.

API Key (Bearer token)
Permission:posts.draftRoles and permissions

Send { "labelIds": [...] } with up to 10 label IDs from GET /labels. The list replaces every label of the post, and an empty list removes them all. The response is the post as Get Post returns it, with its new labels.

Update Post changes labels only on drafts, scheduled posts and posts that failed on every platform. This endpoint works on every status. Labels never reach a platform, so changing them on a published post changes nothing there. An ID that is not a label of the workspace, or more than 10 IDs, returns 400. A post that does not exist or belongs to another workspace returns 404.

Label fields

FieldDescription
idPass it in labelIds on Create Post and Update Post, or in the labelIds filter of List Posts
nameThe label name
colorThe label color as a hex code, such as #3B82F6
Example
1curl --request GET \2  --url https://post.adaptlypost.com/post/api/v1/labels \3  --header 'Authorization: Bearer <api-key>'

3 lines