Skip to main content
POST
/
v1
/
folders
Create folder
curl --request POST \
  --url https://{instance}.omniapp.co/api/v1/folders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "parentFolderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "scope": "organization",
  "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "path": "<string>",
  "scope": "organization",
  "owner": {
    "id": "<string>",
    "name": "<string>"
  },
  "labels": [
    "<string>"
  ],
  "_count": {
    "documents": 123,
    "favorites": 123
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Body

application/json
name
string
required

Name of the folder.

parentFolderId
string<uuid>

ID of the parent folder. Use the List folders endpoint to retrieve folder IDs.

Maximum nesting depth is 7 levels. A 400 error is returned when the limit is reached.

scope
enum<string>
default:organization

Scope of the folder.

  • If no scope is provided and no parent folder exists, defaults to organization
  • If no scope is provided but a parent folder exists, inherits the parent folder's scope
  • Child folder scope must match the parent folder's scope
Available options:
organization,
restricted
userId
string<uuid>

ID of the folder owner. Use the List users or List embed users endpoints to retrieve user IDs.

Response

Folder created successfully

Represents a folder in Omni.

id
string<uuid>

Unique identifier for the folder.

name
string

Display name of the folder.

path
string

Full path to the folder.

scope
enum<string>

Visibility scope of the folder.

  • organization - Organization-wide access
  • restricted - Limited access
Available options:
organization,
restricted
owner
object

Information about the folder owner.

labels
string[]

List of labels associated with the folder. Only included when requested via the include parameter.

_count
object

Contains count information. Only included when requested via the include parameter.

createdAt
string<date-time>

Timestamp when the folder was created.

updatedAt
string<date-time>

Timestamp when the folder was last updated.