Skip to main content
POST
Create Folder
Uploads create folders on demand, so you usually don’t need this endpoint. Reach for it when you want to set accessControlType or defaultExpirySeconds on a folder before anything is uploaded into it.

One folder, or a whole chain

Pass name to create a single folder, optionally under a parent (parentId or parentPath):
Or pass path to create every missing segment in one call and get the leaf back:
path is always relative to the project root, so it can’t be combined with parentId or parentPath. Segments already present are reused, never duplicated — the call is safe to repeat.

Access control

accessControlType and defaultExpirySeconds apply to the last segment. Any intermediate folders created along the way inherit from their parent, so building invoices/2024/q1 under a Private invoices never produces a public folder in between. See Folders & Access Control.

Naming

Names are normalized to slugs — lowercased, with disallowed characters stripped and separators collapsed. Marketing Assets becomes marketing-assets, and creating it twice returns the same folder rather than a duplicate. The original text is kept as the folder’s display name. See Folders & Paths.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Name of a single folder to create. Mutually exclusive with path.

Example:

"Marketing Assets"

path
string

Slug path to create, relative to the project root. Creates every missing segment and returns the leaf. Cannot be combined with parentId/parentPath, which would make the destination ambiguous.

Example:

"2024/q1/launch"

parentId
string<uuid>

UUID of the parent folder to create name under. Mutually exclusive with parentPath.

Example:

"78b52933-5541-4e90-8c15-39a84a412da8"

parentPath
string

Path of an existing parent folder to create name under. Must already exist. Mutually exclusive with parentId.

Example:

"avatars/2024"

accessControlType
enum<string>
default:public
Available options:
public,
private,
signed
Example:

"signed"

defaultExpirySeconds
integer

Default URL expiration in seconds for assets uploaded into signed folders.

Example:

3600

Response

Folder created

path
string

Slug path of the created folder from the project root.

Example:

"2024/q1/launch"

id
string
name
string