Create a folder

Vorschau
posthttps://api.expiryedge.com/v2/folders
editor or admin60/minIdempotency-Key
Anfrage
curl -X POST 'https://api.expiryedge.com/v2/folders' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "Dental",
  "parent_folder_id": "fld_2Lq8"
}'
Antwort
{
  "id": "fol_123",
  "name": "Example name",
  "parent_folder_id": "fol_123",
  "folder_path": "/Licenses/Dental",
  "organization_id": "org_123",
  "user_id": "use_123",
  "is_deleted": true,
  "created_at": "2026-09-27T14:05:00.000Z",
  "updated_at": "2026-09-27T14:05:00.000Z"
}

Names are unique per parent (409 CONFLICT). parent_folder_id must be a folder in your organization (400).

Header

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

Body-Parameter

application/json
  • namestringerforderlich
    max length: 255
  • parent_folder_idstring | null
    A folder in your organization; null = top level.

Rückgabe

201
Created.
  • idstring
  • namestring
  • parent_folder_idstring | null
  • folder_pathstring
  • organization_idstring
  • user_idstring
  • is_deletedboolean
    Always false in v2 (deleted folders are 404).
  • created_atstring
    UTC timestamp, ISO 8601. Every v1 response uses this form, never a raw Firestore Timestamp ({_seconds, _nanoseconds}).
    format: date-time
  • updated_atstring
    UTC timestamp, ISO 8601. Every v1 response uses this form, never a raw Firestore Timestamp ({_seconds, _nanoseconds}).
    format: date-time

Fehler

400
Invalid parameters or body (VALIDATION_FAILED; details names the fields).
401
Missing, invalid or expired token (UNAUTHORIZED).
403
Your role can't do this, or your account has no organization (FORBIDDEN).
405
Wrong HTTP method for this path; the Allow header lists the valid ones.
409
State or uniqueness conflict: EMAIL_EXISTS (contacts), GROUP_EXISTS (contact groups), CONFLICT (folder name taken), FOLDER_NOT_EMPTY, CLIENT_HAS_PROJECTS, TOO_MANY_ATTACHMENTS, INVALID_STATE (collection request cancel/resend), or IDEMPOTENCY_IN_PROGRESS (same Idempotency-Key still running; see Retry-After).
422
The Idempotency-Key was already used with a different body (IDEMPOTENCY_KEY_REUSED).
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.