Replace an expiry's reminder schedule

posthttps://api.expiryedge.com/v1/updateExpiryReminders
editor or admin60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/updateExpiryReminders' \
  -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": [
    {
      "firestore_id": "rem_5Jd8wQ",
      "amount": 14,
      "time_unit": "day",
      "period": "before",
      "time": "08:30",
      "email": true,
      "sms": false,
      "whatsapp": false
    }
  ]
}'
Antwort
{
  "message": "Expiry reminders updated successfully",
  "updated": 1,
  "created": 0,
  "deleted": 0,
  "reminders": [
    {
      "id": "rem_5Jd8wQ",
      "amount": 14,
      "time_unit": "day",
      "period": "before",
      "time": "08:30",
      "timezone": "America/Chicago",
      "scheduled_at": "2026-10-01T13:30:00.000Z",
      "status": "pending",
      "email_enabled": true,
      "sms_enabled": false,
      "whatsapp_enabled": false
    }
  ]
}

Upserts reminders (matched by firestore_id, else by amount+time_unit+period); max 20. Without deleted_reminder_ids, existing reminders not in the list are deleted; with it, only those ids are deleted. Reminders moved into the future are reset to pending.

Body-Parameter

application/json
  • expiry_idstringerforderlich
  • expiry_datestringerforderlich
    Calendar date YYYY-MM-DD in the organization's timezone.
  • remindersarray of objects
    max items: 20
  • deleted_reminder_idsarray of string
  • org_timezonestring

Rückgabe

200
Schedule updated.
  • messagestringerforderlich
  • updatedintegererforderlich
  • createdintegererforderlich
  • deletedintegererforderlich
  • remindersarray of objectserforderlich
    The upserted reminders (summary fields only).

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.