remagicaDocs home
API referenceSprites

Pick a master

POST
/sprites/characters/{characterId}/masters/pick

Needs a key withsprites:write

Makes a candidate the character's master: a new version of its Library item. Its approved takes go back to review, having been checked against the old master, and its colour skins are rendered again from it. Picking the same candidate again returns the version it made.

Requires scope sprites: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

characterId*string
Length1 <= length <= 128

Request Body

application/json
  1. body
candidateId*string
Length1 <= length <= 128

Response Body

The master version.

application/json
  1. response
n*integer

The version's number.

versionId*string
Length1 <= length <= 128
Example Request
curl -X POST 'https://api.remagica.com/api/v1/sprites/characters/8a1d5e3f-2b4c-4d6e-9f07-1a2b3c4d5e6f/masters/pick' \  -H 'Content-Type: application/json' \  -d '{  "candidateId": "cc6fa3d4-5b3d-4f60-8e2a-1d9c6b4f7e05"}'
Example Response
{  "n": 1,  "versionId": "772c657e-5b3d-4f60-8e2a-1d9c6b4f7e05"}