Skip to main content
POST
Create, rename or delete a media library folder

Authorizations

Authorization
string
header
required

Supabase JWT — Authorization: Bearer <token>.

Body

application/json
action
enum<string>
required

create an empty folder, rename one with every file in it, or delete an empty one.

Available options:
create,
rename,
delete
Example:

"create"

folder
string
required

The folder to create, rename or delete.

Example:

"Crew life"

merchant_id
string<uuid>

Optional company. Admins and sub-merchant operators only; other callers always use their token's company.

Example:

"28106cba-1c27-4e53-b149-32113e5e8e31"

to
string

The new name. Required to rename.

Example:

"Life on board"

Response

Done.

folder
string
required

The folder as it is now: the new name after a rename.

moved
integer

Rename only: files moved to the new folder.

drafts_updated
integer

Rename only: page drafts moved to the new addresses. Published pages keep the old ones until they are published again.

warnings
string[]

Rename only: things worth telling the person. The folder was renamed.