Daybook DocsDaybook Docs
Browse

Create a rule

POST/v1/rules

Tell Daybook what to do when something happens: your rule, written once, applied to every account.

Used in Claim status2 use cases

Call this with AIA brief with this endpoint's request, response and auth, ready for a typed client in your language.

Body

  • namestringrequired
  • whenobjectrequired
    The trigger: an event type, or a condition on worklist items.
    Properties
    • eventstring
      An event type, such as denial.classified.
    • conditionstring
      A condition, such as days_since_submission >= 30 and status == "no_response".
    • filterobject
      Narrow it, such as {"cause": "missing_auth"}.
  • thenobjectrequired
    The action.
    Properties
    • actionstringrequired
      claim_status.check, call.start, portal_task.start, appeal.draft or notify.
    • paramsobject
      Fields for the action, as in its own endpoint.
Try itEdit the fields and copy the request. Nothing is sent from this page.
curl -X POST https://api.daybookhealthcare.com/v1/rules \
  -H "Authorization: Bearer $DAYBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "name": "Chase silent claims",
    "when": {
      "condition": "days_since_submission >= 30 and status == \"no_response\""
    },
    "then": {
      "action": "claim_status.check"
    }
  }'

Response

  • idstring
    Unique id, prefixed rule_.
  • activeboolean
curl -X POST https://api.daybookhealthcare.com/v1/rules \
  -H "Authorization: Bearer $DAYBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "name": "Chase silent claims",
    "when": {
      "condition": "days_since_submission >= 30 and status == \"no_response\""
    },
    "then": {
      "action": "claim_status.check"
    }
  }'
Response 200
{
  "id": "rule_01JBXJ1",
  "object": "rule",
  "name": "Chase silent claims",
  "active": true
}