younifyd
Menu

Create Folder

Create a Folder

POST/folders‎

Use it in a workflow

  1. Add a step and choose the Directus connector.
  2. Pick the Create Folder action (under Folders).
  3. Fill in the fields below, then reference the result from later steps as {{createFolder.response.data}}.

Request

Query parameters

fieldsarray<string>

Control what fields are being returned in the object.

metastring

What metadata to return in the response.

Request body

Enter the body as JSON in the step's Body field.

namestringrequired

Name of the folder.

parentinteger

Unique identifier of the parent folder. This allows for nested folders.

json
{
  "name": "Amsterdam",
  "parent": 0
}

Response

Returns 200 with an object. Read it in later steps with {{createFolder.response.data.<field>}}.

dataobject
idstring (uuid)

Unique identifier for the folder.

namestring

Name of the folder.

parentstring

Unique identifier of the parent folder. This allows for nested folders.

json
{
  "data": {
    "id": "0cf0e03d-4364-45df-b77b-ca61f61869d2",
    "name": "New York",
    "parent": "{\n  \"data\": {\n    \"id\": \"fc02d733-95b8-4e27-bd4b-08a32cbe4e66\",\n    \"name\": \"Test\",\n    \"parent\": null\n  }\n}\n"
  }
}

Need more? See the Directus guide for connection setup and behaviour shared by every action.

Was this page helpful?
Create Folder — Directus — Documentation