remagicaDocs home
API referenceLibrary

Create a folder

POST
/library/folders

Needs a key withlibrary:write

Adds a folder to the Team or your Private Library, optionally inside another folder of the same scope.

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.

Request Body

application/json
  1. body
kind?string

What it is, as the starting folders sort it: character, sprite (a Sprite Studio character), scene, item, style, sound_effect or other.

Default"other"
Value in"character""sprite""scene""item""style""sound_effect""other"
name*string
Length1 <= length <= 120
parentId?string
Length1 <= length <= 128
scope?string

team: every member of the workspace sees and uses it. private: only you (in this workspace). API keys act for the workspace, so they use team only.

Default"team"
Value in"private""team"

Response Body

The folder.

application/json
  1. response

A Library folder.

id*string
Length1 <= length <= 128
isDefault*boolean

One of the starting folders (can't be deleted).

itemCount*integer
kind*string

What it is, as the starting folders sort it: character, sprite (a Sprite Studio character), scene, item, style, sound_effect or other.

Value in"character""sprite""scene""item""style""sound_effect""other"
name*string
parentId*string|null
scope*string

team: every member of the workspace sees and uses it. private: only you (in this workspace). API keys act for the workspace, so they use team only.

Value in"private""team"
sort*integer
Example Request
curl -X POST 'https://api.remagica.com/api/v1/library/folders' \  -H 'Content-Type: application/json' \  -d '{  "name": "Autumn campaign"}'
Example Response
{  "id": "a5614527-5b3d-4f60-8e2a-1d9c6b4f7e05",  "isDefault": true,  "itemCount": 1,  "kind": "character",  "name": "Autumn campaign",  "parentId": "eb290249-5b3d-4f60-8e2a-1d9c6b4f7e05",  "scope": "private",  "sort": 1}