Folders
Create a new folder
OpenAPI specificationPOST
/api/v1/foldersAuthentication
x-api-key
Request
curl --globoff --request POST \
--url 'https://api.example.com/api/v1/folders' \
--header 'x-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "<name>"
}'Replace credential and <field> placeholders with your own values. URL placeholders appear as %3Cfield%3E. Review the example values before sending your request.
Replace https://api.example.com with the API server URL.
Use the sample JSON body as your starting point, and enter values that match the endpoint's schema.
Request body schema or example
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Folder name"
},
"parentFolderId": {
"type": "string",
"description": "Parent folder ID"
},
"description": {
"type": "string",
"description": "Folder description"
},
"metadata": {
"type": "object",
"description": "Additional metadata"
}
},
"required": [
"name"
]
}Responses
201Folder created successfully
{
"type": "object",
"properties": {
"_id": {
"type": "string",
"description": "Folder ID"
},
"name": {
"type": "string",
"description": "Folder name"
},
"organizationId": {
"type": "string",
"description": "Organization ID"
},
"parentFolderId": {
"type": "string",
"description": "Parent folder ID",
"nullable": true
},
"description": {
"type": "string",
"description": "Folder description"
},
"status": {
"type": "string",
"description": "Folder status",
"enum": [
"active",
"deleted"
]
},
"metadata": {
"description": "Folder metadata",
"allOf": [
{
"type": "object",
"properties": {
"color": {
"type": "string",
"description": "Folder color"
},
"icon": {
"type": "string",
"description": "Folder icon"
},
"materialCount": {
"type": "number",
"description": "Number of materials in folder"
},
"totalSize": {
"type": "number",
"description": "Total size of materials in folder"
},
"lastActivity": {
"format": "date-time",
"type": "string",
"description": "Last activity date"
}
}
}
]
},
"createdAt": {
"format": "date-time",
"type": "string",
"description": "Creation date"
},
"updatedAt": {
"format": "date-time",
"type": "string",
"description": "Last update date"
}
},
"required": [
"_id",
"name",
"organizationId",
"status",
"createdAt",
"updatedAt"
]
}