remagicaDocs home
API referenceLibrary

Update a label

PATCH
/library/labels/{labelId}

Needs a key withlibrary:write

Renames a label or changes its colour.

Requires scope library:write.

Authorization

apiKey
headerx-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.

Path Parameters

labelId*string
Length1 <= length <= 128

Request Body

application/json
  1. body
color?string

The label's colour.

Value in"gray""red""orange""yellow""green""teal""blue""purple""pink"
name?string
Length1 <= length <= 40

Response Body

The label.

application/json
  1. response

One of the workspace's asset labels.

color*string

The label's colour.

Value in"gray""red""orange""yellow""green""teal""blue""purple""pink"
id*string
Length1 <= length <= 128
name*string
itemCount*integer

How many assets (not deleted) have it.

Example Request
curl -X PATCH 'https://api.remagica.com/api/v1/library/labels/e5b488e2-5b3d-4f60-8e2a-1d9c6b4f7e05' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "color": "gray",  "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",  "name": "Autumn campaign",  "itemCount": 1}