Create an expiry

posthttps://api.expiryedge.com/v1/createExpiry
editor or admin60/minIdempotency-KeyJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/createExpiry' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "Contoso Legal - Professional Liability Insurance",
  "type": "Insurance",
  "expiry_date": "2026-10-15",
  "start_date": "2025-10-15",
  "priority": "High",
  "state": "todo",
  "notes": "Broker renewal packet due 30 days before expiry.",
  "team_id": "0",
  "contacts": [
    "c_8Hk2pQ"
  ],
  "assigned_to": "u_71bXq",
  "is_recurring": true,
  "recurrence_type": "year",
  "recurrence_interval": 1,
  "recurrence_mode": "renew_as_copy"
}'
Antwort
{
  "message": "Expiry created successfully",
  "id": "exp_4Tq9sLm2"
}

Counts against the plan's expiry limit (403 with current / limit / remaining when reached). A share token is generated for every record; is_public defaults to false and escalation_enabled to false.

Header

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

Body-Parameter

application/json
  • namestring
    Display name.
  • typestring
    Expiry type name (see getExpiryTypesWithStats).
  • expiry_datestring
    Calendar date YYYY-MM-DD in the organization's timezone.
  • expiry_timezonestring
    IANA timezone for expiry_date when it carries a time.
  • start_datestring | null
  • start_timezonestring
  • prioritystring
    ErlaubtLowMediumHigh
  • statestring
    Workflow state; defaults to todo.
    Erlaubttodoinprogressonholdinreviewcompleted
  • notesstring
  • urlstring
  • document_typestring
  • tagsarray of string
  • team_idstring
    Team id, or '0' for no team.
  • folder_idstring | null
  • assigned_tostring | null
    User id of the assignee (must be in your organization).
  • assigned_bystring
  • contactsarray of string
    Contact ids that receive reminders.
  • directory_entry_idsarray of string
  • is_publicboolean
    Enables the public share link (viewExpiry).
  • share_passwordstring
    Optional password for the share link. Never returned.
  • valuenumber | null
  • penalty_amountnumber | null
  • currencystring | null
    ISO 4217 code, uppercase.
  • custom_columnsobject
  • checklist_itemsarray of objects
  • template_idstring | null
  • template_namestring | null
  • template_fieldsarray of objects | null
  • template_dataobject | null
  • fileUrlsarray of string
  • fileNamesarray of string
  • is_recurringboolean
  • recurrence_typestring | null
    Erlaubtdayweekmonthyear
  • recurrence_intervalinteger | null
  • recurrence_countinteger | null
  • recurrence_end_datestring | null
  • recurrence_modestring
    Defaults to renew_as_copy.
    Erlaubtrenew_as_copyrenew_same
  • auto_renewboolean
  • auto_renew_vendorstring | null
  • escalation_enabledboolean
    Always false on create unless explicitly true.
  • escalation_contactsarray of string
  • escalation_notification_daysarray of integer
    Days before expiry at which escalation fires (0-365).

Rückgabe

201
Created.
  • messagestringerforderlich
  • idstringerforderlich
    The new expiry's id.

Fehler

400
Invalid input, a referenced record outside your organization (code: VALIDATION_FAILED, details lists the fields), or an invalid recurring configuration (details is an array of messages).
401
Missing, expired or invalid bearer token.
403
Role is viewer, or the plan's expiry limit is reached.
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.