Create a media folder
POST
/public/v1/media/folders
const url = 'https://api.loomta.com/public/v1/media/folders';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Launch assets"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.loomta.com/public/v1/media/folders \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Launch assets" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
Example
{ "name": "Launch assets"}Responses
Section titled “Responses”The created folder.
Media typeapplication/json
object
id
string format: uuid
organizationId
string format: uuid
name
string
createdAt
string format: date-time
updatedAt
string format: date-time
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "organizationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "createdAt": "2026-04-15T12:00:00Z", "updatedAt": "2026-04-15T12:00:00Z"}The request body failed validation.
Media typeapplication/json
object
code
required
A stable, machine-readable error code to branch on.
string
message
required
A human-readable description.
string
details
Optional structured detail (for example Zod validation issues).
Example
{ "code": "invalid_request", "message": "The request payload is invalid.", "details": [ { "path": [ "slideCount" ], "message": "Number must be greater than or equal to 3" } ]}The API key is missing or invalid.
Media typeapplication/json
object
code
required
A stable, machine-readable error code to branch on.
string
message
required
A human-readable description.
string
details
Optional structured detail (for example Zod validation issues).
Examples
{ "code": "missing_api_key", "message": "A Bearer API key is required."}{ "code": "invalid_api_key", "message": "The API key is invalid."}