API referenceLibrary
Create a label
POST
Needs a key withlibrary:write
Adds an asset label to the workspace (names are unique, any case).
Requires scope library:write.
apiKeyheader
x-api-key<token>An API key of your workspace (rmg_…), created in the web app. It acts for that workspace, not for a person, and keeps working when its creator leaves.
application/json- body
color?stringThe label's colour.
Default
"gray"Value in
"gray""red""orange""yellow""green""teal""blue""purple""pink"name*stringLength
1 <= length <= 40The label.
application/json- response
One of the workspace's asset labels.
color*stringThe label's colour.
Value in
"gray""red""orange""yellow""green""teal""blue""purple""pink"id*stringLength
1 <= length <= 128name*stringitemCount*integerHow many assets (not deleted) have it.
curl -X POST 'https://api.remagica.com/api/v1/library/labels' \ -H 'Content-Type: application/json' \ -d '{ "name": "Approved"}'Example Response
{ "color": "gray", "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05", "name": "Autumn campaign", "itemCount": 1}