Skip to navigation

Create Folder

View as Markdown

Create Folder

Creates a new folder for the authenticated user.
You can optionally create the folder inside another folder using parent_id.

Method: POST
URL: {{base_url}}/folders


Authentication

This endpoint requires authentication.

Use a Bearer token in the Authorization header:

Authorization: Bearer {{access_token}}

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer {{access_token}}

Required Variables

VariableRequiredDescription
base_urlYesBase API URL
access_tokenYesAuthentication access token

Body (raw JSON)

Send the request body as raw JSON.

FieldTypeRequiredDescription
namestringYesName of the new folder
parent_idintegerNoID of the parent folder

Example request body:

{
"name": "Campaign Photos",
"parent_id": 10
}

Notes:

  • If parent_id is null or omitted, the folder will be created at the root level.
  • If parent_id is provided, the folder will be created inside that folder.

Sample Request

curl --request POST "{{base_url}}/folders" \
--header "Authorization: Bearer {{access_token}}" \
--header "Content-Type: application/json" \
--data '{
"name": "Campaign Photos",
"parent_id": 10
}'

Sample Success Response

A successful request typically returns HTTP 200 OK.

{
"success": true,
"message": "Folder created successfully",
"data": {
"user_id": 43028,
"name": "Campaign Photos",
"parent_id": 10,
"is_system": false,
"updated_at": "2026-03-10T06:25:32.000000Z",
"created_at": "2026-03-10T06:25:32.000000Z",
"id": 11
}
}

Response Fields

FieldTypeDescription
idintegerUnique folder ID
user_idintegerOwner user ID
namestringFolder name
parent_idinteger/nullParent folder ID
is_systembooleanIndicates if the folder is a system folder
created_atdatetimeFolder creation timestamp
updated_atdatetimeLast update timestamp

Common Errors

  • 400 Bad Request

    • Missing name
    • Invalid parent_id
  • 401 Unauthorized / 403 Forbidden

    • Missing or invalid Authorization header
    • Expired {{access_token}}
  • 404 Not Found

    • Provided parent_id does not exist

Notes

  • Folder names do not need to be unique, but it’s recommended for better organization.
  • Useful for creating nested folder structures.
  • The folder will belong to the authenticated user automatically.

Request

This endpoint expects an object.
namestringRequired
parent_idintegerRequired

Response

Created
dataobject
messagestring
successboolean