Send a collection request

posthttps://api.expiryedge.com/v1/createCollectionRequests
editor or admin60/minIdempotency-KeyJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/createCollectionRequests' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "templateId": "tpl_W9onboard",
  "contactIds": [
    "c_8Hk2pQ"
  ],
  "expiryId": "exp_4Tq9sLm2",
  "expiresAt": "2026-10-31T23:59:59.000Z",
  "name": "Q4 insurance refresh",
  "dueDate": "2026-10-15",
  "reminders": [
    {
      "amount": 3,
      "time_unit": "day",
      "time": "09:00"
    }
  ]
}'
Antwort
{
  "message": "1 request(s) created, 1 email(s) sent",
  "created": 1,
  "emails_sent": 1,
  "request_ids": [
    "req_9WkT"
  ],
  "linked_expiry": {
    "id": "exp_4Tq9sLm2",
    "name": "Northwind Dental - State Dental License"
  }
}

Creates one request per recipient (contacts plus members of groupId, deduplicated; max 200 per send), emails each a unique link and schedules reminders (the org default sequence unless reminders is given). Contacts without an email are skipped. Counts against the collection_requests plan limit. The handler does not check the HTTP method.

Header

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

Body-Parameter

application/json
  • templateIdstringerforderlich
    An active template or an unsent request_draft.
  • contactIdsarray of string
  • groupIdstring
    Contact group id; all contacts in the group are added.
  • expiryIdstring | null
    Optional expiry to link the requests to.
  • passwordstring | null
    Optional password the recipient must enter to open the link.
    min length: 4
  • expiresAtstring | null
    When the link stops working. No expiry when omitted.
    format: date-time
  • namestring | null
    Label for this send.
    max length: 200
  • dueDatestring | null
    Informational "please submit by" date shown to the recipient.
    format: date-time
  • remindersarray of objects
    Override the reminder schedule (counted from the send time). [] means no reminders.
    max items: 20

Rückgabe

201
Requests created.
  • messagestringerforderlich
  • createdintegererforderlich
  • emails_sentintegererforderlich
    Emails accepted by the provider; failures are only reflected in this count.
  • request_idsarray of stringerforderlich
  • linked_expiryobject | null

Fehler

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Your role does not allow this, the record belongs to another organization (Access denied), or the plan limit is reached (body adds current, limit, remaining).
404
The record does not exist or is not in your organization.
409
A request with the same Idempotency-Key is still being processed. Retry after Retry-After seconds.
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.