Fire a trigger rule now

posthttps://api.expiryedge.com/v1/triggerCollectionRuleNow
editor or admin60/minAny method
Request
curl -X POST 'https://api.expiryedge.com/v1/triggerCollectionRuleNow?id=trg_2Vb8' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY"
Response
{
  "message": "Sent to 1 recipient(s)",
  "created": 1,
  "emailsSent": 1,
  "requestIds": [
    "req_9WkT"
  ],
  "linkedExpiry": {
    "id": "exp_4Tq9sLm2",
    "name": "Northwind Dental - State Dental License"
  }
}

Sends the rule's template to its recipients immediately (same checks and plan limit as createCollectionRequests) and marks it triggered. Rules that already fired return 400 until edited. Note the camelCase response fields. The handler does not check the HTTP method.

Query parameters

  • idstring
    Rule id (or id in the body).

Returns

200
Sent.
  • messagestringrequired
  • createdintegerrequired
  • emailsSentintegerrequired
  • requestIdsarray of stringrequired
  • linkedExpiryobject | null

Errors

400
Rule deleted or already fired, or the send failed (for example plan limit, no valid recipients, archived template).
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.