Send a Document Collection request

Vorschau
posthttps://api.expiryedge.com/v2/collection-requests
editor or admin60/minIdempotency-Key
Anfrage
curl -X POST 'https://api.expiryedge.com/v2/collection-requests' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "template_id": "tpl_W9x2",
  "contact_ids": [
    "c_8Hk2pQ"
  ],
  "expiry_id": "exp_4Tq9sLm2",
  "name": "W-9 for 2026",
  "due_date": "2026-10-31"
}'
Antwort
{
  "data": [
    {
      "id": "req_3Hs8",
      "organization_id": "org_northwind",
      "name": "W-9 for 2026",
      "template_id": "tpl_W9x2",
      "template_name": "W-9",
      "contact_id": "c_8Hk2pQ",
      "contact_name": "Priya Shah",
      "contact_email": "priya.shah@northwinddental.example",
      "expiry_id": "exp_4Tq9sLm2",
      "status": "pending",
      "has_password": false,
      "archived": false,
      "paused": false,
      "sent_at": "2026-09-27T14:30:00.000Z",
      "resend_count": 0,
      "created_at": "2026-09-27T14:30:00.000Z",
      "updated_at": "2026-09-27T14:30:00.000Z"
    }
  ]
}

Creates one request per recipient (contact_ids and/or every member of group_id; contacts without an email are skipped; max 200) and emails each a fill link. Counts toward the monthly request limit (403 PLAN_LIMIT_REACHED). Returns 201 { data }; Location is the request when one was created, else /v2/collection-requests.

Header

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

Body-Parameter

application/json
  • template_idstringerforderlich
  • contact_idsarray of string
    max items: 200
  • group_idstring | null
  • expiry_idstring | null
  • passwordstring | null
    min length: 4
  • expires_atstring | null
    The link stops working after this.
    format: date-time
  • namestring | null
    max length: 200
  • due_datestring | null
    "Please submit by" date (ISO 8601).
  • remindersarray of objects
    Reminder schedule override (after the send date); default the organization's reminder settings.
    max items: 20

Rückgabe

201
Sent.
  • dataarray of objects

Fehler

400
Invalid parameters or body (VALIDATION_FAILED; details names the fields).
401
Missing, invalid or expired token (UNAUTHORIZED).
403
FORBIDDEN (role / no organization) or PLAN_LIMIT_REACHED (details: current, limit, remaining).
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.