Skip to main content
POST
Create a folder
Creates an ACTIVE folder at the top level or under an active parent_folder_id.
  • Uniqueness and depth: Folder name is unique among siblings under the same parent (case-insensitive), external_id is unique across folders in the organization, and folders nest up to 8 levels deep (422 folder_too_deep).
  • Metadata: kind is an optional informational classification, and metadata stores key-value string labels. Neither affects program behavior.
For usage patterns and examples, see the Folders guide.

Authorizations

Authorization
string
header
default:sk_...
required

Send your API key as Authorization: Bearer <key>.

Headers

Idempotency-Key
string

Unique key (1-255 printable ASCII characters) to make retries safe. Repeating the same request with the same key within 24 hours replays the original response (Idempotent-Replayed: true).

Maximum string length: 255

Body

application/json

Folder details

Creates a folder.

name
string
required

Display name, unique among siblings under the same parent or at top level (case-insensitive).

Required string length: 1 - 255
Example:

"Coffee"

external_id
string

External identifier, unique per organization.

Maximum string length: 255
Example:

"brand-coffee"

kind
string

Level classification (e.g., brand, region); informational only.

Maximum string length: 64
Example:

"brand"

metadata
object

Key-value string labels (up to 50 keys; keys max 64 characters, values max 256).

Example:
parent_folder_id
string<uuid>

Active parent folder UUID (omit for a top-level folder; max depth 8).

Example:

"6a8c0e24-d3f5-4b79-9c1b-e5a7c9b1d335"

Response

Folder created

A folder that organizes programs and nested folders within an organization.

created_at
string<date-time>

When the folder was created.

Example:

"2027-01-15T10:30:00Z"

external_id
string

External identifier, unique per organization.

Example:

"brand-coffee"

id
string<uuid>

UUID passed as folder_id in paths and parent_folder_id on child folders.

Example:

"2c4e6a80-b1d3-4f57-8a92-c3e5a7b9d134"

kind
string

Level classification (e.g., brand, region); informational only.

Example:

"brand"

metadata
object

Key-value string labels attached to this folder.

name
string

Display name, unique among siblings under the same parent or at top level (case-insensitive).

Example:

"Coffee"

parent_folder_id
string<uuid>

Parent folder UUID (absent for top-level folders).

Example:

"6a8c0e24-d3f5-4b79-9c1b-e5a7c9b1d335"

status
enum<string>

Lifecycle status of the folder.

Available options:
ACTIVE,
ARCHIVED
Example:

"ACTIVE"

updated_at
string<date-time>

When the folder was last modified.

Example:

"2027-01-15T10:30:00Z"