staqlydocs
REST APIAPI referenceMedia

Create a folder, at the top level or inside another

Create a folder, at the top level or inside another (media:write)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/media-folders

Names are unique among a folder's subfolders, ignoring case (409). Folders nest at most 10 deep.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Request Body

application/json
  1. body
name*string
Length1 <= length <= 80
parent_id?string

A folder id; empty or omitted for the top level

Response Body

Created

application/json
  1. response

A virtual folder of the media library

id*string
parent_id*string

The folder it sits in; empty at the top level

name*string
files*integer

Files directly in this folder (not in its subfolders)

created_at*string
Formatdate-time
curl -X POST 'https://staqly.example.com/v1/media-folders' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
{  "id": "string",  "parent_id": "string",  "name": "string",  "files": 0,  "created_at": "2019-08-24T14:15:22Z"}