Skip to main content
POST
/
v2
/
folders
Create Folder
curl --request POST \
  --url https://public.api.serval.com/v2/folders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "teamId": "<string>",
  "name": "<string>",
  "parentFolderId": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "teamId": "<string>",
    "name": "<string>",
    "parentFolderId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
teamId
string
required

The ID of the team.

name
string
required

The name of the folder.

itemType
enum<string>
required

The non-folder item type this folder can contain. Required — folders are scoped per type, and FOLDER_ITEM_TYPE_UNSPECIFIED and FOLDER_ITEM_TYPE_FOLDER are rejected.

Available options:
FOLDER_ITEM_TYPE_UNSPECIFIED,
FOLDER_ITEM_TYPE_FOLDER,
FOLDER_ITEM_TYPE_WORKFLOW,
FOLDER_ITEM_TYPE_GUIDANCE
parentFolderId
string | null

Optional parent folder. Unset creates the folder at the root. The parent must be of the same item_type.

Response

Success

data
data · object

The created folder.