Send a collection request
post
https://api.expiryedge.com/v1/createCollectionRequestseditor or admin60/minIdempotency-KeyAny method
Request
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"
}
]
}'Response
{
"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.
Idempotency-KeystringOptional client-generated key (1-255 characters of letters, digits,- _ : .).pattern: ^[A-Za-z0-9_\-:.]{1,255}$
templateIdstringrequiredAnactivetemplate or an unsentrequest_draft.contactIdsarray of stringgroupIdstringContact group id; all contacts in the group are added.expiryIdstring | nullOptional expiry to link the requests to.passwordstring | nullOptional password the recipient must enter to open the link.min length: 4expiresAtstring | nullWhen the link stops working. No expiry when omitted.format: date-timenamestring | nullLabel for this send.max length: 200dueDatestring | nullInformational "please submit by" date shown to the recipient.format: date-timeremindersarray of objectsOverride the reminder schedule (counted from the send time).[]means no reminders.max items: 20
201
Requests created.
messagestringrequiredcreatedintegerrequiredemails_sentintegerrequiredEmails accepted by the provider; failures are only reflected in this count.request_idsarray of stringrequiredlinked_expiryobject | null
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. |
