Add reminders to an expiry

posthttps://api.expiryedge.com/v1/createExpiryReminders
editor or admin60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/createExpiryReminders' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "expiry_id": "exp_4Tq9sLm2",
  "expiry_date": "2026-10-15",
  "org_timezone": "America/Chicago",
  "reminders": [
    {
      "amount": 30,
      "time_unit": "day",
      "period": "before",
      "time": "09:00",
      "email": true,
      "sms": false,
      "whatsapp": false
    },
    {
      "amount": 1,
      "time_unit": "week",
      "period": "before",
      "time": "09:00"
    }
  ]
}'
Antwort
{
  "message": "Expiry reminders created successfully",
  "count": 1,
  "reminders": [
    {
      "id": "rem_5Jd8wQ",
      "expiry_id": "exp_4Tq9sLm2",
      "organization_id": "org_northwind",
      "user_id": "u_71bXq",
      "amount": 30,
      "time_unit": "day",
      "period": "before",
      "time": "09:00",
      "timezone": "America/Chicago",
      "reminder_date": "2026-09-15T00:00:00.000Z",
      "scheduled_at": "2026-09-15T14:00:00.000Z",
      "email_enabled": true,
      "sms_enabled": false,
      "whatsapp_enabled": false,
      "status": "pending",
      "sent_at": null,
      "error_message": null,
      "created_at": "2026-09-27T14:05:00.000Z",
      "updated_at": "2026-09-27T14:05:00.000Z"
    }
  ]
}

Appends new reminder records (does not replace existing ones - use updateExpiryReminders for that); max 20 per call. Not idempotent: a retry creates duplicates. Email, SMS and WhatsApp default to enabled unless set to false.

Body-Parameter

application/json
  • expiry_idstringerforderlich
  • expiry_datestringerforderlich
    Calendar date YYYY-MM-DD in the organization's timezone.
  • remindersarray of objectserforderlich
    max items: 20
  • org_timezonestring
    IANA timezone for reminder times. Falls back to the first reminder's timezone, then UTC.

Rückgabe

201
Reminders created.
  • messagestringerforderlich
  • remindersarray of objectserforderlich
  • countintegererforderlich

Fehler

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Authenticated, but your role or organization does not allow this action.
404
The record does not exist or is not in your organization.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.