Create an expiry
Previewpost
https://api.expiryedge.com/v2/expirieseditor or admin60/minIdempotency-Key
Request
curl -X POST 'https://api.expiryedge.com/v2/expiries' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Northwind Dental - State Dental License",
"type": "License",
"expiry_date": "2026-10-15",
"priority": "High",
"contacts": [
"c_8Hk2pQ"
]
}'Response
{
"id": "exp_4Tq9sLm2",
"name": "Northwind Dental - State Dental License",
"type": "License",
"expiry_date": "2026-10-15",
"start_date": "2025-10-15",
"priority": "High",
"state": "todo",
"notes": "Renew with the State Board of Dentistry at least 30 days ahead.",
"team_id": "0",
"contacts": [
"c_8Hk2pQ"
],
"assigned_to": "u_71bXq",
"is_done": false,
"is_archive": false,
"is_public": false,
"is_recurring": false,
"organization_id": "org_northwind",
"user_id": "u_71bXq",
"share_token": "5c0e7a52-3f7e-4b3e-9a2e-1d2f0b6c9e11",
"created_at": "2026-09-27T14:05:00.000Z",
"updated_at": "2026-09-27T14:05:00.000Z"
}Same rules as v1 createExpiry (plan limit, referenced contacts/users/folders must be in your organization).
Returns 201 with the created expiry and a Location header.
Idempotency-KeystringOptional client-generated key (1-255 characters of letters, digits,- _ : .).pattern: ^[A-Za-z0-9_\-:.]{1,255}$
namestringrequiredDisplay name.expiry_datestringrequiredpattern: ^\d{4}-\d{2}-\d{2}$typestringExpiry type name (see getExpiryTypesWithStats).expiry_timezonestringIANA timezone forexpiry_datewhen it carries a time.start_datestring | nullstart_timezonestringprioritystringAllowedLowMediumHighstatestringWorkflow state; defaults totodo.Allowedtodoinprogressonholdinreviewcompletednotesstringurlstringdocument_typestringtagsarray of stringteam_idstringTeam id, or'0'for no team.folder_idstring | nullassigned_tostring | nullUser id of the assignee (must be in your organization).assigned_bystringcontactsarray of stringContact ids that receive reminders.directory_entry_idsarray of stringis_publicbooleanEnables the public share link (viewExpiry).share_passwordstringOptional password for the share link. Never returned.valuenumber | nullpenalty_amountnumber | nullcurrencystring | nullISO 4217 code, uppercase.custom_columnsobjectchecklist_itemsarray of objectstemplate_idstring | nulltemplate_namestring | nulltemplate_fieldsarray of objects | nulltemplate_dataobject | nullfileUrlsarray of stringfileNamesarray of stringis_recurringbooleanrecurrence_typestring | nullAlloweddayweekmonthyearrecurrence_intervalinteger | nullrecurrence_countinteger | nullrecurrence_end_datestring | nullrecurrence_modestringDefaults torenew_as_copy.Allowedrenew_as_copyrenew_sameauto_renewbooleanauto_renew_vendorstring | nullescalation_enabledbooleanAlways false on create unless explicitly true.escalation_contactsarray of stringescalation_notification_daysarray of integerDays before expiry at which escalation fires (0-365).
201
Created.
namestringDisplay name.typestringExpiry type name (see getExpiryTypesWithStats).expiry_datestringCalendar dateYYYY-MM-DDin the organization's timezone.expiry_timezonestringIANA timezone forexpiry_datewhen it carries a time.start_datestring | nullstart_timezonestringprioritystringAllowedLowMediumHighstatestringWorkflow state; defaults totodo.Allowedtodoinprogressonholdinreviewcompletednotesstringurlstringdocument_typestringtagsarray of stringteam_idstringTeam id, or'0'for no team.folder_idstring | nullassigned_tostring | nullUser id of the assignee (must be in your organization).assigned_bystringcontactsarray of stringContact ids that receive reminders.directory_entry_idsarray of stringis_publicbooleanEnables the public share link (viewExpiry).share_passwordstringOptional password for the share link. Never returned.valuenumber | nullpenalty_amountnumber | nullcurrencystring | nullISO 4217 code, uppercase.custom_columnsobjectchecklist_itemsarray of objectstemplate_idstring | nulltemplate_namestring | nulltemplate_fieldsarray of objects | nulltemplate_dataobject | nullfileUrlsarray of stringfileNamesarray of stringis_recurringbooleanrecurrence_typestring | nullAlloweddayweekmonthyearrecurrence_intervalinteger | nullrecurrence_countinteger | nullrecurrence_end_datestring | nullrecurrence_modestringDefaults torenew_as_copy.Allowedrenew_as_copyrenew_sameauto_renewbooleanauto_renew_vendorstring | nullescalation_enabledbooleanAlways false on create unless explicitly true.escalation_contactsarray of stringescalation_notification_daysarray of integerDays before expiry at which escalation fires (0-365).idstringread-onlyorganization_idstringread-onlyuser_idstringread-onlyCreator's user id.share_tokenstringread-onlyis_donebooleancompleted_atstring | nullformat: date-timeis_archivebooleanArchived flag (the canonical field name).occurrence_numberintegerread-onlyis_auto_createdbooleanread-onlyrecurrence_created_from_idstring | nullread-onlyrenewal_historyarray of objectsread-onlyescalation_notification_sent_daysarray of integerread-onlyescalation_all_sentbooleanread-onlycreated_atstringUTC timestamp, ISO 8601. Every v1 response uses this form, never a raw Firestore Timestamp ({_seconds, _nanoseconds}).format: date-timeupdated_atstringUTC timestamp, ISO 8601. Every v1 response uses this form, never a raw Firestore Timestamp ({_seconds, _nanoseconds}).format: date-timehas_share_passwordbooleanread-only
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. |
