Create a folder

posthttps://api.expiryedge.com/v1/createFolder
editor or admin60/minIdempotency-KeyAny method
Request
curl -X POST 'https://api.expiryedge.com/v1/createFolder' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "State Board",
  "parent_folder_id": "fld_2Kp9"
}'
Response
{
  "success": true,
  "message": "Folder created successfully",
  "folder": {
    "id": "fld_8Tz4",
    "name": "State Board",
    "parent_folder_id": "fld_2Kp9",
    "folder_path": "/Licenses/State Board",
    "user_id": "u_71bXq",
    "organization_id": "org_northwind",
    "is_deleted": false,
    "expiry_count": 0,
    "created_at": "2026-09-27T14:06:00.000Z",
    "updated_at": "2026-09-27T14:06:00.000Z"
  }
}

name (max 255 characters) must be unique among non-deleted siblings (409). Omit parent_folder_id for a root folder. A legacy nested body {name: {name, parent_folder_id}} is also accepted.

Headers

  • Idempotency-Keystring
    Optional client-generated key (1-255 characters of letters, digits, - _ : .).
    pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body parameters

application/json
  • namestringrequired
    max length: 255
  • parent_folder_idstring | null
    Parent folder id in your organization; null or omitted for root.

Returns

201
Folder created.
  • successbooleanrequired
  • messagestringrequired
  • folderobjectrequired
    A folder for organizing expiries. Folders nest via parent_folder_id.

Errors

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Authenticated, but your role or organization does not allow this action.
404
The record does not exist or is not in your organization.
409
A folder with this name already exists in this location.; or a request with the same Idempotency-Key is still being processed (code IDEMPOTENCY_IN_PROGRESS).
422
The Idempotency-Key was already used with a different request body.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
Unexpected server error. Retry later; quote requestId to support.