{
  "openapi": "3.1.0",
  "info": {
    "title": "Daybook API",
    "version": "v1",
    "description": "One API for the payer work around every claim: payer calls, portals, eligibility, claim status, remits, ERA and EFT enrollment, denials and appeals. Results arrive as signed webhooks."
  },
  "servers": [
    {
      "url": "https://api.daybookhealthcare.com/v1"
    }
  ],
  "externalDocs": {
    "url": "https://daybookhealthcare.com/docs/api-reference"
  },
  "security": [
    {
      "bearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A Daybook API key (https://daybookhealthcare.com/docs/authentication)."
      }
    }
  },
  "tags": [
    {
      "name": "Payer calls"
    },
    {
      "name": "Payer portals"
    },
    {
      "name": "Enrollment"
    },
    {
      "name": "Eligibility"
    },
    {
      "name": "Claim status"
    },
    {
      "name": "Remittance"
    },
    {
      "name": "Denials and appeals"
    },
    {
      "name": "Worklists and rules"
    },
    {
      "name": "Webhook endpoints"
    }
  ],
  "paths": {
    "/calls": {
      "post": {
        "operationId": "callsCreate",
        "summary": "Start a call",
        "description": "Place a call to a payer. Daybook works the phone tree, waits on hold, and returns a structured answer with the payer's reference number.\n\nThe whole flow, with examples, is on [Payer calls](https://daybookhealthcare.com/docs/workflows/payer-calls); read [Sandbox and payer calls](https://daybookhealthcare.com/docs/authentication#sandbox-and-payer-calls) before placing a call from a sandbox.",
        "tags": [
          "Payer calls"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/calls/create"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Start a call",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `call_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `call`."
                    },
                    "status": {
                      "type": "string",
                      "description": "Where the call is, in order: `queued`, `dialing`, `navigating` (the phone tree), `on_hold`, `with_rep`, then `completed`, `failed` or `canceled`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "call_type": {
                      "type": "string",
                      "description": "The call type you asked for."
                    },
                    "mode": {
                      "type": "string",
                      "description": "`autonomous` or `handoff`."
                    },
                    "hold_seconds": {
                      "type": "integer",
                      "description": "Time spent on hold so far."
                    },
                    "claim": {
                      "type": "object",
                      "description": "The claim, as ids only: `patient_control_number` as you sent it and `payer_claim_number`, yours or the rep's. `null` without a claim."
                    },
                    "handoff": {
                      "type": "object",
                      "description": "For a `handoff` call: your `phone` and `name`, and once a rep is on the line the `questions` and `rep_name`. `null` when autonomous."
                    },
                    "answer": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "What the rep said about the claim or member, normalized: for claim status, `paid`, `denied`, `pending`, `in_process` or `not_on_file`."
                        },
                        "reference_number": {
                          "type": "string",
                          "description": "The call reference the rep gave."
                        },
                        "rep_name": {
                          "type": "string",
                          "description": "The rep's name as given."
                        },
                        "next_step": {
                          "type": "string",
                          "description": "What to do next, in plain words."
                        },
                        "details": {
                          "type": "object",
                          "description": "Fields specific to the call type, such as `denial_reason`, `paid_amount_cents`, `check_number` or `auth_number`."
                        }
                      },
                      "description": "The structured answer. `null` until the call completes."
                    },
                    "ended_reason": {
                      "type": "string",
                      "description": "Why a call ended short of an answer: your cancel's reason, or Daybook's in plain words (line busy, nobody answered the ring, hold ceiling passed). `null` otherwise."
                    },
                    "transcript_url": {
                      "type": "string",
                      "description": "Signed link to the transcript. Expires after 1 hour. The same turns as [Read the transcript](https://daybookhealthcare.com/docs/api-reference/calls/transcript)."
                    },
                    "recording_url": {
                      "type": "string",
                      "description": "Signed link to the recording."
                    },
                    "repeat_of": {
                      "type": "string",
                      "description": "The first call of a repeating series, when a `schedule` placed this call. `null` otherwise."
                    },
                    "next_run_at": {
                      "type": "string",
                      "description": "When the next scheduled re-check runs, if the call repeats. `null` once the series stops."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Your keys, echoed back."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "call_01JBX8M4Q2T7",
                  "object": "call",
                  "status": "queued",
                  "payer": "bayline",
                  "call_type": "claim_status",
                  "mode": "autonomous",
                  "hold_seconds": 0,
                  "claim": {
                    "patient_control_number": "A-10442-1",
                    "payer_claim_number": null
                  },
                  "handoff": null,
                  "answer": null,
                  "ended_reason": null,
                  "transcript_url": null,
                  "recording_url": null,
                  "repeat_of": null,
                  "next_run_at": "2026-11-03T14:02:11Z",
                  "metadata": {
                    "account": "A-10442",
                    "ticket": "TCK-55821"
                  },
                  "created_at": "2026-10-29T14:02:11Z"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payer": {
                    "type": "string",
                    "description": "Daybook payer id, such as `bayline`, `keystone` or `meridian`."
                  },
                  "call_type": {
                    "type": "string",
                    "description": "`claim_status`, `eligibility`, `prior_auth`, `appeal_status`, `payment_trace` or `other`."
                  },
                  "mode": {
                    "type": "string",
                    "description": "`autonomous` (default for the five set call types) handles the call end to end. `handoff` rings the biller in `handoff` when a rep picks up and sends `call.handoff_ready`."
                  },
                  "claim": {
                    "type": "object",
                    "properties": {
                      "payer_claim_number": {
                        "type": "string",
                        "description": "The payer's claim number (ICN), when you have it."
                      },
                      "patient_control_number": {
                        "type": "string",
                        "description": "Your claim id as sent in CLM01."
                      },
                      "date_of_service": {
                        "type": "string",
                        "description": "First date of service, `YYYY-MM-DD`."
                      },
                      "billed_amount_cents": {
                        "type": "integer",
                        "description": "Total billed, in cents."
                      }
                    },
                    "required": [
                      "date_of_service"
                    ],
                    "description": "The claim the call is about. Required for `claim_status`, `appeal_status` and `payment_trace`."
                  },
                  "patient": {
                    "type": "object",
                    "properties": {
                      "first_name": {
                        "type": "string",
                        "description": ""
                      },
                      "last_name": {
                        "type": "string",
                        "description": ""
                      },
                      "date_of_birth": {
                        "type": "string",
                        "description": "`YYYY-MM-DD`."
                      },
                      "member_id": {
                        "type": "string",
                        "description": "Member id on the insurance card."
                      }
                    },
                    "required": [
                      "first_name",
                      "last_name",
                      "date_of_birth",
                      "member_id"
                    ],
                    "description": "The member."
                  },
                  "provider": {
                    "type": "object",
                    "properties": {
                      "npi": {
                        "type": "string",
                        "description": "Billing or rendering NPI."
                      },
                      "tax_id": {
                        "type": "string",
                        "description": "Tax id, when the payer verifies by TIN."
                      }
                    },
                    "required": [
                      "npi"
                    ],
                    "description": "The provider the payer will verify."
                  },
                  "questions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Extra questions for the rep, asked after the standard ones for the call type."
                  },
                  "script": {
                    "type": "string",
                    "description": "Id of one of your call scripts ([Worklists and rules](https://daybookhealthcare.com/docs/worklists-and-rules)). Daybook follows it in place of the default for the call type."
                  },
                  "handoff": {
                    "type": "object",
                    "properties": {
                      "phone": {
                        "type": "string",
                        "description": "E.164 number Daybook bridges the rep to."
                      },
                      "name": {
                        "type": "string",
                        "description": "Biller name, for your logs."
                      }
                    },
                    "required": [
                      "phone"
                    ],
                    "description": "Who to ring in for `handoff` calls."
                  },
                  "schedule": {
                    "type": "object",
                    "properties": {
                      "repeat_every_days": {
                        "type": "integer",
                        "description": "Days between calls."
                      },
                      "until": {
                        "type": "string",
                        "description": "`status_changes` (default) or a date, `YYYY-MM-DD`."
                      }
                    },
                    "required": [
                      "repeat_every_days"
                    ],
                    "description": "Repeat the call until something changes."
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Up to 20 keys of your own: account, ticket, queue, work item. Echoed on the call and on every event about it, so your handler needs no lookup table. Ids only, never a patient's name, date of birth or member id."
                  }
                },
                "required": [
                  "payer",
                  "call_type",
                  "patient",
                  "provider"
                ]
              },
              "example": {
                "payer": "bayline",
                "call_type": "claim_status",
                "claim": {
                  "patient_control_number": "A-10442-1",
                  "date_of_service": "2026-09-14",
                  "billed_amount_cents": 48500
                },
                "patient": {
                  "first_name": "Jordan",
                  "last_name": "Sample",
                  "date_of_birth": "1980-01-01",
                  "member_id": "W000000001"
                },
                "provider": {
                  "npi": "1999999984"
                },
                "schedule": {
                  "repeat_every_days": 5
                },
                "metadata": {
                  "account": "A-10442",
                  "ticket": "TCK-55821"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "callsList",
        "summary": "List calls",
        "description": "List your payer calls, newest first, filtered by claim, status, payer, time window or your own metadata.\n\nThe list is how a queue reconciles: every call about one claim, every call still running, or the one call that carries your ticket id. In the Daybook app, the **Payer calls** page lists and searches calls by call id, claim id or reference number and filters them by what the payer answered, and the MCP tool `list_calls` lists them with an answer filter. See [Payer calls](https://daybookhealthcare.com/docs/workflows/payer-calls).",
        "tags": [
          "Payer calls"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/calls/list"
        },
        "parameters": [
          {
            "name": "claim",
            "in": "query",
            "required": false,
            "description": "Calls about one claim, by the `patient_control_number` you sent.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "One status, or several separated by commas. `queued,dialing,navigating,on_hold,with_rep` is every call still running.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payer",
            "in": "query",
            "required": false,
            "description": "Daybook payer id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "call_type",
            "in": "query",
            "required": false,
            "description": "`claim_status`, `eligibility`, `prior_auth`, `appeal_status`, `payment_trace` or `other`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metadata[key]",
            "in": "query",
            "required": false,
            "description": "Calls whose metadata `key` equals the value, such as `metadata[ticket]=TCK-55821`. One key per request.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_after",
            "in": "query",
            "required": false,
            "description": "RFC 3339. Calls created at or after this instant.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "required": false,
            "description": "RFC 3339. Calls created before this instant.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1 to 100. Default 20.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "description": "The last id of the page before, for the next page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List calls",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Call objects, as [Retrieve a call](https://daybookhealthcare.com/docs/api-reference/calls/get) returns them, newest first."
                    },
                    "has_more": {
                      "type": "boolean",
                      "description": "Whether another page follows. Pass the last id as `starting_after`."
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "call_01JBX8M4Q2T7",
                      "object": "call",
                      "status": "completed",
                      "payer": "bayline",
                      "call_type": "claim_status",
                      "mode": "autonomous",
                      "hold_seconds": 1412,
                      "claim": {
                        "patient_control_number": "A-10442-1",
                        "payer_claim_number": "BHP26288001144"
                      },
                      "handoff": null,
                      "answer": {
                        "status": "denied",
                        "reference_number": "BHP-4471-0092",
                        "rep_name": "Dana",
                        "next_step": "Submit a retro authorization, then request reprocessing.",
                        "details": {
                          "denial_reason": "CO-197 precertification absent"
                        }
                      },
                      "ended_reason": null,
                      "transcript_url": "https://files.daybookhealthcare.com/t/call_01JBX8M4Q2T7?sig=...",
                      "recording_url": null,
                      "repeat_of": null,
                      "next_run_at": null,
                      "metadata": {
                        "account": "A-10442",
                        "ticket": "TCK-55821",
                        "queue": "denials"
                      },
                      "created_at": "2026-10-29T14:02:11Z"
                    }
                  ],
                  "has_more": false
                }
              }
            }
          }
        }
      }
    },
    "/calls/{id}": {
      "get": {
        "operationId": "callsGet",
        "summary": "Retrieve a call",
        "description": "Fetch a call, its status as it moves, and, once it completes, its structured answer.\n\nPrefer `call.completed` over polling: it carries the same `answer` and your `metadata`. A finished call is also in **Payer calls** in the Daybook app with its transcript and captured fields, and the MCP tools `list_calls` and `get_call` read it; a completed call with a reference number also moves its claim to what the payer said. See [Payer calls](https://daybookhealthcare.com/docs/workflows/payer-calls).",
        "tags": [
          "Payer calls"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/calls/get"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The call id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve a call",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `call_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `call`."
                    },
                    "status": {
                      "type": "string",
                      "description": "Where the call is, in order: `queued`, `dialing`, `navigating` (the phone tree), `on_hold`, `with_rep`, then `completed`, `failed` or `canceled`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "call_type": {
                      "type": "string",
                      "description": "The call type you asked for."
                    },
                    "mode": {
                      "type": "string",
                      "description": "`autonomous` or `handoff`."
                    },
                    "hold_seconds": {
                      "type": "integer",
                      "description": "Time spent on hold so far."
                    },
                    "claim": {
                      "type": "object",
                      "description": "The claim, as ids only: `patient_control_number` as you sent it and `payer_claim_number`, yours or the rep's. `null` without a claim."
                    },
                    "handoff": {
                      "type": "object",
                      "description": "For a `handoff` call: your `phone` and `name`, and once a rep is on the line the `questions` and `rep_name`. `null` when autonomous."
                    },
                    "answer": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "What the rep said about the claim or member, normalized: for claim status, `paid`, `denied`, `pending`, `in_process` or `not_on_file`."
                        },
                        "reference_number": {
                          "type": "string",
                          "description": "The call reference the rep gave."
                        },
                        "rep_name": {
                          "type": "string",
                          "description": "The rep's name as given."
                        },
                        "next_step": {
                          "type": "string",
                          "description": "What to do next, in plain words."
                        },
                        "details": {
                          "type": "object",
                          "description": "Fields specific to the call type, such as `denial_reason`, `paid_amount_cents`, `check_number` or `auth_number`."
                        }
                      },
                      "description": "The structured answer. `null` until the call completes."
                    },
                    "ended_reason": {
                      "type": "string",
                      "description": "Why a call ended short of an answer: your cancel's reason, or Daybook's in plain words (line busy, nobody answered the ring, hold ceiling passed). `null` otherwise."
                    },
                    "transcript_url": {
                      "type": "string",
                      "description": "Signed link to the transcript. Expires after 1 hour. The same turns as [Read the transcript](https://daybookhealthcare.com/docs/api-reference/calls/transcript)."
                    },
                    "recording_url": {
                      "type": "string",
                      "description": "Signed link to the recording."
                    },
                    "repeat_of": {
                      "type": "string",
                      "description": "The first call of a repeating series, when a `schedule` placed this call. `null` otherwise."
                    },
                    "next_run_at": {
                      "type": "string",
                      "description": "When the next scheduled re-check runs, if the call repeats. `null` once the series stops."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Your keys, echoed back."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "call_01JBX8M4Q2T7",
                  "object": "call",
                  "status": "completed",
                  "payer": "bayline",
                  "call_type": "claim_status",
                  "mode": "autonomous",
                  "hold_seconds": 1412,
                  "claim": {
                    "patient_control_number": "A-10442-1",
                    "payer_claim_number": "BHP26288001144"
                  },
                  "handoff": null,
                  "answer": {
                    "status": "denied",
                    "reference_number": "BHP-4471-0092",
                    "rep_name": "Dana",
                    "next_step": "Submit a retro authorization, then request reprocessing.",
                    "details": {
                      "denial_reason": "CO-197 precertification absent",
                      "denied_on": "2026-10-02"
                    }
                  },
                  "ended_reason": null,
                  "transcript_url": "https://files.daybookhealthcare.com/t/call_01JBX8M4Q2T7?sig=...",
                  "recording_url": null,
                  "repeat_of": null,
                  "next_run_at": null,
                  "metadata": {
                    "account": "A-10442",
                    "ticket": "TCK-55821"
                  },
                  "created_at": "2026-10-29T14:02:11Z"
                }
              }
            }
          }
        }
      }
    },
    "/calls/{id}/cancel": {
      "post": {
        "operationId": "callsCancel",
        "summary": "Cancel a call",
        "description": "Stop a call: a queued or scheduled call never dials, a live call ends with the agent saying goodbye, and a repeating series places no more.\n\nCancel is how your queue closes the loop from its side: the claim paid on the 835 before the call went out, a person already called, the ticket was closed. The call answers with `status` `canceled` and your `reason` in `ended_reason`, and `call.canceled` goes to your endpoints. A call that has already ended answers `409 conflict`. In the Daybook app, **Hang up** on the **Live calls** page does the same for a call on the line, for the item's owner and the firm's leads. See [Payer calls](https://daybookhealthcare.com/docs/workflows/payer-calls).",
        "tags": [
          "Payer calls"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/calls/cancel"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The call id. For a repeating series, any call in it stops the series.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancel a call",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `call_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `call`."
                    },
                    "status": {
                      "type": "string",
                      "description": "Where the call is, in order: `queued`, `dialing`, `navigating` (the phone tree), `on_hold`, `with_rep`, then `completed`, `failed` or `canceled`."
                    },
                    "ended_reason": {
                      "type": "string",
                      "description": "Why the call ended short of an answer. For a cancel, the `reason` you sent."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Your keys, echoed back."
                    }
                  }
                },
                "example": {
                  "id": "call_01JBX8M4Q2T7",
                  "object": "call",
                  "status": "canceled",
                  "payer": "bayline",
                  "call_type": "claim_status",
                  "mode": "autonomous",
                  "hold_seconds": 0,
                  "claim": {
                    "patient_control_number": "A-10442-1",
                    "payer_claim_number": null
                  },
                  "handoff": null,
                  "answer": null,
                  "ended_reason": "Paid on the 835 of 2026-10-30",
                  "transcript_url": null,
                  "recording_url": null,
                  "repeat_of": null,
                  "next_run_at": null,
                  "metadata": {
                    "account": "A-10442",
                    "ticket": "TCK-55821"
                  },
                  "created_at": "2026-10-29T14:02:11Z"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "description": "Why, for the call's record and your logs. Up to 200 characters. Never spoken on the call."
                  }
                }
              },
              "example": {
                "reason": "Paid on the 835 of 2026-10-30"
              }
            }
          }
        }
      }
    },
    "/calls/{id}/instruct": {
      "post": {
        "operationId": "callsInstruct",
        "summary": "Tell the agent something",
        "description": "Send the agent a line while the call is live: a fact it should know or a question to add. It is never spoken aloud.\n\nA note to the agent from your tool while the call is up: a biller watching the ticket adds \"ask for the check number\", or your system learns mid-call that the member's plan changed. The line shows in the transcript as an operator note and the agent works it into the conversation. It takes a call from `dialing` to `with_rep`; a call that has ended answers `409 conflict`. **Tell the agent** in the Daybook app's **Live calls** does the same, for the item's owner and the firm's leads, up to 280 characters. See [Payer calls](https://daybookhealthcare.com/docs/workflows/payer-calls).",
        "tags": [
          "Payer calls"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/calls/instruct"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The call id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tell the agent something",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The call id."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `call`."
                    },
                    "status": {
                      "type": "string",
                      "description": "Where the call is now."
                    },
                    "instructions": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Every line sent to the agent on this call, oldest first: `text` and `at`."
                    }
                  }
                },
                "example": {
                  "id": "call_01JBX8M4Q2T7",
                  "object": "call",
                  "status": "with_rep",
                  "instructions": [
                    {
                      "text": "Ask for the check number and the date it was mailed.",
                      "at": "2026-10-29T14:28:03Z"
                    }
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "What the agent should know or ask. Up to 280 characters. Never said on the call as written."
                  }
                },
                "required": [
                  "text"
                ]
              },
              "example": {
                "text": "Ask for the check number and the date it was mailed."
              }
            }
          }
        }
      }
    },
    "/calls/{id}/transcript": {
      "get": {
        "operationId": "callsTranscript",
        "summary": "Read the transcript",
        "description": "What was said on a call, turn by turn, with who said it and when, and a link to the recording.\n\nThe transcript is the artifact a CRM keeps beside the answer: what the rep said, in the rep's words, with the phone tree, the hold and any note you sent the agent. The transcript is also on the call in the Daybook app, in **Live calls** as it happens and in **Payer calls** after, and the MCP tool `get_call` returns the turns. See [Payer calls](https://daybookhealthcare.com/docs/workflows/payer-calls).",
        "tags": [
          "Payer calls"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/calls/transcript"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The call id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Read the transcript",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "call": {
                      "type": "string",
                      "description": "The call id."
                    },
                    "status": {
                      "type": "string",
                      "description": "Where the call is. A transcript grows while the call runs."
                    },
                    "turns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at_ms": {
                            "type": "integer",
                            "description": "Milliseconds from the start of the call."
                          },
                          "speaker": {
                            "type": "string",
                            "description": "`agent`, `rep`, `phone_tree`, `person` (a biller who took the call over or was rung in), `operator` (a note sent to the agent, never said on the call) or `event` (a key pressed, the hold, the rep joining, a hang-up)."
                          },
                          "text": {
                            "type": "string",
                            "description": ""
                          }
                        }
                      },
                      "description": "In order."
                    },
                    "recording_url": {
                      "type": "string",
                      "description": "Signed link to the recording."
                    }
                  }
                },
                "example": {
                  "call": "call_01JBX8M4Q2T7",
                  "status": "completed",
                  "turns": [
                    {
                      "at_ms": 0,
                      "speaker": "event",
                      "text": "Dialing Bayline Health Plan, (800) 555-0142"
                    },
                    {
                      "at_ms": 4200,
                      "speaker": "phone_tree",
                      "text": "Thank you for calling Bayline provider services. For claims, press 2."
                    },
                    {
                      "at_ms": 6100,
                      "speaker": "event",
                      "text": "Pressed 2"
                    },
                    {
                      "at_ms": 61000,
                      "speaker": "event",
                      "text": "On hold"
                    },
                    {
                      "at_ms": 1473000,
                      "speaker": "rep",
                      "text": "Provider services, this is Dana."
                    },
                    {
                      "at_ms": 1476500,
                      "speaker": "agent",
                      "text": "Hi Dana, I am calling for Lantern Creek Family Medicine about claim A-10442-1, date of service September 14."
                    },
                    {
                      "at_ms": 1512000,
                      "speaker": "rep",
                      "text": "That claim denied on October 2, CO-197, no precertification on file."
                    },
                    {
                      "at_ms": 1515000,
                      "speaker": "operator",
                      "text": "Ask whether a retro authorization would be accepted."
                    },
                    {
                      "at_ms": 1530000,
                      "speaker": "agent",
                      "text": "Would a retro authorization be accepted, and may I have a reference number for this call?"
                    },
                    {
                      "at_ms": 1552000,
                      "speaker": "rep",
                      "text": "Yes, within 60 days of the denial. Reference BHP-4471-0092."
                    }
                  ],
                  "recording_url": null
                }
              }
            }
          }
        }
      }
    },
    "/portal-tasks": {
      "post": {
        "operationId": "portalTasksCreate",
        "summary": "Start a portal task",
        "description": "Have Daybook sign in to a payer portal, run a defined set of steps and read the result back.",
        "tags": [
          "Payer portals"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/portal-tasks/create"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Start a portal task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `ptask_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `portal_task`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`queued`, `running`, `approval_required`, `completed`, `failed` or `canceled`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "portal": {
                      "type": "string",
                      "description": "The portal used, such as `availity` or the payer's own site."
                    },
                    "task": {
                      "type": "string",
                      "description": "The task you asked for."
                    },
                    "pending_action": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "The change, in plain words."
                        },
                        "screenshot_url": {
                          "type": "string",
                          "description": "Signed link to the screen as it will be submitted."
                        }
                      },
                      "description": "What Daybook is about to change in the portal. Present while `approval_required`."
                    },
                    "result": {
                      "type": "object",
                      "description": "What Daybook read back. Shape depends on `task`. `null` until completed."
                    },
                    "evidence": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Signed links to the pages captured along the way."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Your keys, echoed back."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "ptask_01JBXA2W8K3N",
                  "object": "portal_task",
                  "status": "queued",
                  "payer": "keystone",
                  "portal": "availity",
                  "task": "remit_lookup",
                  "pending_action": null,
                  "result": null,
                  "evidence": [],
                  "metadata": {},
                  "created_at": "2026-10-29T15:10:40Z"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payer": {
                    "type": "string",
                    "description": "Daybook payer id."
                  },
                  "task": {
                    "type": "string",
                    "description": "`remit_lookup`, `claim_lookup`, `appeal_status`, `attachment_upload` or `overpayment_lookup`."
                  },
                  "portal": {
                    "type": "string",
                    "description": "Force a portal. By default Daybook picks the portal that answers the task for this payer."
                  },
                  "claim": {
                    "type": "object",
                    "properties": {
                      "payer_claim_number": {
                        "type": "string",
                        "description": "The payer's claim number (ICN), when you have it."
                      },
                      "patient_control_number": {
                        "type": "string",
                        "description": "Your claim id as sent in CLM01."
                      },
                      "date_of_service": {
                        "type": "string",
                        "description": "First date of service, `YYYY-MM-DD`."
                      },
                      "billed_amount_cents": {
                        "type": "integer",
                        "description": "Total billed, in cents."
                      }
                    },
                    "required": [
                      "date_of_service"
                    ],
                    "description": "The claim the task is about."
                  },
                  "provider": {
                    "type": "object",
                    "properties": {
                      "npi": {
                        "type": "string",
                        "description": "Billing or rendering NPI."
                      },
                      "tax_id": {
                        "type": "string",
                        "description": "Tax id, when the payer verifies by TIN."
                      }
                    },
                    "required": [
                      "npi"
                    ],
                    "description": "The provider whose portal account to use."
                  },
                  "attachment_url": {
                    "type": "string",
                    "description": "For `attachment_upload`: an HTTPS link Daybook fetches the file from."
                  },
                  "require_approval": {
                    "type": "boolean",
                    "description": "Hold any step that changes something in the portal until you approve it. Defaults to `true` for `attachment_upload`."
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Your keys, echoed back."
                  }
                },
                "required": [
                  "payer",
                  "task",
                  "provider"
                ]
              },
              "example": {
                "payer": "keystone",
                "task": "remit_lookup",
                "claim": {
                  "patient_control_number": "A-20817-1",
                  "date_of_service": "2026-09-30"
                },
                "provider": {
                  "npi": "1999999984",
                  "tax_id": "00-0000000"
                }
              }
            }
          }
        }
      }
    },
    "/portal-tasks/{id}": {
      "get": {
        "operationId": "portalTasksGet",
        "summary": "Retrieve a portal task",
        "description": "Fetch a portal task, its pending action and its result.",
        "tags": [
          "Payer portals"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/portal-tasks/get"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The portal task id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve a portal task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `ptask_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `portal_task`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`queued`, `running`, `approval_required`, `completed`, `failed` or `canceled`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "portal": {
                      "type": "string",
                      "description": "The portal used, such as `availity` or the payer's own site."
                    },
                    "task": {
                      "type": "string",
                      "description": "The task you asked for."
                    },
                    "pending_action": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "The change, in plain words."
                        },
                        "screenshot_url": {
                          "type": "string",
                          "description": "Signed link to the screen as it will be submitted."
                        }
                      },
                      "description": "What Daybook is about to change in the portal. Present while `approval_required`."
                    },
                    "result": {
                      "type": "object",
                      "description": "What Daybook read back. Shape depends on `task`. `null` until completed."
                    },
                    "evidence": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Signed links to the pages captured along the way."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Your keys, echoed back."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "ptask_01JBXA2W8K3N",
                  "object": "portal_task",
                  "status": "completed",
                  "payer": "keystone",
                  "portal": "availity",
                  "task": "remit_lookup",
                  "pending_action": null,
                  "result": {
                    "check_or_eft_number": "EFT00048213",
                    "payment_date": "2026-10-21",
                    "payment_amount_cents": 31200,
                    "era_url": "https://files.daybookhealthcare.com/r/ptask_01JBXA2W8K3N/835?sig=..."
                  },
                  "evidence": [
                    {
                      "label": "Remittance viewer",
                      "url": "https://files.daybookhealthcare.com/e/ptask_01JBXA2W8K3N/1?sig=..."
                    }
                  ],
                  "metadata": {},
                  "created_at": "2026-10-29T15:10:40Z"
                }
              }
            }
          }
        }
      }
    },
    "/portal-tasks/{id}/approve": {
      "post": {
        "operationId": "portalTasksApprove",
        "summary": "Approve a portal action",
        "description": "Let a held portal action go through, or reject it. Only valid while the task is `approval_required`.",
        "tags": [
          "Payer portals"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/portal-tasks/approve"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The portal task id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Approve a portal action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `ptask_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `portal_task`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`queued`, `running`, `approval_required`, `completed`, `failed` or `canceled`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "portal": {
                      "type": "string",
                      "description": "The portal used, such as `availity` or the payer's own site."
                    },
                    "task": {
                      "type": "string",
                      "description": "The task you asked for."
                    },
                    "pending_action": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string",
                          "description": "The change, in plain words."
                        },
                        "screenshot_url": {
                          "type": "string",
                          "description": "Signed link to the screen as it will be submitted."
                        }
                      },
                      "description": "What Daybook is about to change in the portal. Present while `approval_required`."
                    },
                    "result": {
                      "type": "object",
                      "description": "What Daybook read back. Shape depends on `task`. `null` until completed."
                    },
                    "evidence": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Signed links to the pages captured along the way."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Your keys, echoed back."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "ptask_01JBXA2W8K3N",
                  "object": "portal_task",
                  "status": "running",
                  "payer": "keystone",
                  "portal": "availity",
                  "task": "attachment_upload",
                  "pending_action": null,
                  "result": null,
                  "evidence": [
                    {
                      "label": "Remittance viewer",
                      "url": "https://files.daybookhealthcare.com/e/ptask_01JBXA2W8K3N/1?sig=..."
                    }
                  ],
                  "metadata": {},
                  "created_at": "2026-10-29T15:10:40Z"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "decision": {
                    "type": "string",
                    "description": "`approve` or `reject`."
                  },
                  "note": {
                    "type": "string",
                    "description": "Kept on the task's audit trail."
                  }
                },
                "required": [
                  "decision"
                ]
              },
              "example": {
                "decision": "approve",
                "note": "Checked the attachment, send it."
              }
            }
          }
        }
      }
    },
    "/enrollments": {
      "post": {
        "operationId": "enrollmentsCreate",
        "summary": "Submit an enrollment",
        "description": "Enroll a provider with a payer for electronic remits (ERA), electronic payments (EFT), or both.",
        "tags": [
          "Enrollment"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/enrollments/create"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Submit an enrollment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `enr_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `enrollment`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`submitted`, `pending_payer`, `action_required`, `approved` or `rejected`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "transactions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "`era`, `eft` or both."
                    },
                    "provider": {
                      "type": "object",
                      "description": "The enrolled provider."
                    },
                    "action_required": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "`signature`, `document`, `verification_letter` or `contact`."
                        },
                        "description": {
                          "type": "string",
                          "description": "What the payer asked for, in plain words."
                        },
                        "due_by": {
                          "type": "string",
                          "description": "The payer's deadline, when it gave one."
                        }
                      },
                      "description": "What the payer is waiting on. Present while `action_required`."
                    },
                    "approved_at": {
                      "type": "string",
                      "description": "When the payer confirmed the enrollment."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Your keys, echoed back."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "enr_01JBXC7F2D9R",
                  "object": "enrollment",
                  "status": "submitted",
                  "payer": "meridian",
                  "transactions": [
                    "era",
                    "eft"
                  ],
                  "provider": {
                    "npi": "1999999984",
                    "tax_id": "00-0000000",
                    "name": "Sample Family Dental"
                  },
                  "action_required": null,
                  "approved_at": null,
                  "metadata": {},
                  "created_at": "2026-10-20T13:00:00Z"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payer": {
                    "type": "string",
                    "description": "Daybook payer id."
                  },
                  "transactions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "`era`, `eft` or both."
                  },
                  "provider": {
                    "type": "object",
                    "properties": {
                      "npi": {
                        "type": "string",
                        "description": ""
                      },
                      "tax_id": {
                        "type": "string",
                        "description": ""
                      },
                      "name": {
                        "type": "string",
                        "description": "Legal name as the payer has it."
                      }
                    },
                    "required": [
                      "npi",
                      "tax_id",
                      "name"
                    ],
                    "description": "The provider to enroll."
                  },
                  "bank_account": {
                    "type": "object",
                    "properties": {
                      "routing_number": {
                        "type": "string",
                        "description": ""
                      },
                      "account_number": {
                        "type": "string",
                        "description": ""
                      },
                      "account_type": {
                        "type": "string",
                        "description": "`checking` or `savings`."
                      }
                    },
                    "required": [
                      "routing_number",
                      "account_number",
                      "account_type"
                    ],
                    "description": "Required for `eft`."
                  },
                  "contact": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": ""
                      },
                      "email": {
                        "type": "string",
                        "description": ""
                      },
                      "phone": {
                        "type": "string",
                        "description": ""
                      }
                    },
                    "required": [
                      "name",
                      "email"
                    ],
                    "description": "Who the payer contacts about the enrollment."
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Your keys, echoed back."
                  }
                },
                "required": [
                  "payer",
                  "transactions",
                  "provider",
                  "contact"
                ]
              },
              "example": {
                "payer": "meridian",
                "transactions": [
                  "era",
                  "eft"
                ],
                "provider": {
                  "npi": "1999999984",
                  "tax_id": "00-0000000",
                  "name": "Sample Family Dental"
                },
                "bank_account": {
                  "routing_number": "000000000",
                  "account_number": "000000000000",
                  "account_type": "checking"
                },
                "contact": {
                  "name": "Alex Biller",
                  "email": "billing@example.com"
                }
              }
            }
          }
        }
      }
    },
    "/enrollments/{id}": {
      "get": {
        "operationId": "enrollmentsGet",
        "summary": "Retrieve an enrollment",
        "description": "Fetch an enrollment and whatever the payer is waiting on.",
        "tags": [
          "Enrollment"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/enrollments/get"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The enrollment id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve an enrollment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `enr_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `enrollment`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`submitted`, `pending_payer`, `action_required`, `approved` or `rejected`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "transactions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "`era`, `eft` or both."
                    },
                    "provider": {
                      "type": "object",
                      "description": "The enrolled provider."
                    },
                    "action_required": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "`signature`, `document`, `verification_letter` or `contact`."
                        },
                        "description": {
                          "type": "string",
                          "description": "What the payer asked for, in plain words."
                        },
                        "due_by": {
                          "type": "string",
                          "description": "The payer's deadline, when it gave one."
                        }
                      },
                      "description": "What the payer is waiting on. Present while `action_required`."
                    },
                    "approved_at": {
                      "type": "string",
                      "description": "When the payer confirmed the enrollment."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Your keys, echoed back."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "enr_01JBXC7F2D9R",
                  "object": "enrollment",
                  "status": "action_required",
                  "payer": "meridian",
                  "transactions": [
                    "era",
                    "eft"
                  ],
                  "provider": {
                    "npi": "1999999984",
                    "tax_id": "00-0000000",
                    "name": "Sample Family Dental"
                  },
                  "action_required": {
                    "type": "verification_letter",
                    "description": "Upload a bank letter confirming the account for EFT.",
                    "due_by": "2026-11-12"
                  },
                  "approved_at": null,
                  "metadata": {},
                  "created_at": "2026-10-20T13:00:00Z"
                }
              }
            }
          }
        }
      }
    },
    "/eligibility/checks": {
      "post": {
        "operationId": "eligibilityCreateCheck",
        "summary": "Check eligibility",
        "description": "Run a real-time 270/271 eligibility and benefits check.\n\nSend up to 1,000 checks at once to `POST /v1/eligibility/checks/batch` with a `checks` array of the same objects. Batches return `pending` and each result arrives as an `eligibility.completed` event.",
        "tags": [
          "Eligibility"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/eligibility/create-check"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Check eligibility",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `elig_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `eligibility_check`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`complete`, `pending` (batches) or `failed`."
                    },
                    "coverage": {
                      "type": "object",
                      "properties": {
                        "active": {
                          "type": "boolean",
                          "description": "Whether coverage is active on the date of service."
                        },
                        "plan_name": {
                          "type": "string",
                          "description": ""
                        },
                        "group_number": {
                          "type": "string",
                          "description": ""
                        },
                        "coverage_start": {
                          "type": "string",
                          "description": ""
                        },
                        "coverage_end": {
                          "type": "string",
                          "description": ""
                        }
                      },
                      "description": "From the 271."
                    },
                    "benefits": {
                      "type": "object",
                      "properties": {
                        "deductible_remaining_cents": {
                          "type": "integer",
                          "description": ""
                        },
                        "out_of_pocket_remaining_cents": {
                          "type": "integer",
                          "description": ""
                        },
                        "copay_cents": {
                          "type": "integer",
                          "description": ""
                        },
                        "coinsurance_percent": {
                          "type": "integer",
                          "description": ""
                        }
                      },
                      "description": "Amounts in cents for the service types asked about."
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "AAA rejections from the payer, with code and plain-words reason."
                    },
                    "raw_271_url": {
                      "type": "string",
                      "description": "Signed link to the 271 as received."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "elig_01JBXD0P6Y1S",
                  "object": "eligibility_check",
                  "status": "complete",
                  "coverage": {
                    "active": true,
                    "plan_name": "Bayline Choice PPO",
                    "group_number": "000000",
                    "coverage_start": "2026-01-01",
                    "coverage_end": null
                  },
                  "benefits": {
                    "deductible_remaining_cents": 42000,
                    "out_of_pocket_remaining_cents": 310000,
                    "copay_cents": 3000,
                    "coinsurance_percent": 20
                  },
                  "errors": [],
                  "raw_271_url": "https://files.daybookhealthcare.com/x/elig_01JBXD0P6Y1S/271?sig=...",
                  "created_at": "2026-10-29T15:22:05Z"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payer": {
                    "type": "string",
                    "description": "Daybook payer id."
                  },
                  "provider": {
                    "type": "object",
                    "properties": {
                      "npi": {
                        "type": "string",
                        "description": "Billing or rendering NPI."
                      },
                      "tax_id": {
                        "type": "string",
                        "description": "Tax id, when the payer verifies by TIN."
                      }
                    },
                    "required": [
                      "npi"
                    ],
                    "description": ""
                  },
                  "patient": {
                    "type": "object",
                    "properties": {
                      "first_name": {
                        "type": "string",
                        "description": ""
                      },
                      "last_name": {
                        "type": "string",
                        "description": ""
                      },
                      "date_of_birth": {
                        "type": "string",
                        "description": "`YYYY-MM-DD`."
                      },
                      "member_id": {
                        "type": "string",
                        "description": "Member id on the insurance card."
                      }
                    },
                    "required": [
                      "first_name",
                      "last_name",
                      "date_of_birth",
                      "member_id"
                    ],
                    "description": ""
                  },
                  "date_of_service": {
                    "type": "string",
                    "description": "Defaults to today."
                  },
                  "service_type_codes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "X12 service type codes. Defaults to `[\"30\"]`."
                  }
                },
                "required": [
                  "payer",
                  "provider",
                  "patient"
                ]
              },
              "example": {
                "payer": "bayline",
                "provider": {
                  "npi": "1999999984"
                },
                "patient": {
                  "first_name": "Jordan",
                  "last_name": "Sample",
                  "date_of_birth": "1980-01-01",
                  "member_id": "W000000001"
                },
                "service_type_codes": [
                  "30"
                ]
              }
            }
          }
        }
      }
    },
    "/claim-status/checks": {
      "post": {
        "operationId": "claimStatusCreateCheck",
        "summary": "Check claim status",
        "description": "Run a real-time 276/277 claim status check.\n\nFor volume, send up to 1,000 checks to `POST /v1/claim-status/checks/batch`, or let a [rule](https://daybookhealthcare.com/docs/api-reference/rules/create) start them for you, such as every claim with no response in 30 days.",
        "tags": [
          "Claim status"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/claim-status/create-check"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Check claim status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `cs_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `claim_status_check`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`complete`, `pending` (batches) or `failed`."
                    },
                    "claim_status": {
                      "type": "object",
                      "properties": {
                        "category": {
                          "type": "string",
                          "description": "Normalized: `paid`, `denied`, `pending`, `in_process`, `returned` or `not_on_file`."
                        },
                        "category_code": {
                          "type": "string",
                          "description": "X12 claim status category code, such as `F1` or `A2`."
                        },
                        "status_code": {
                          "type": "string",
                          "description": "X12 claim status code."
                        },
                        "effective_date": {
                          "type": "string",
                          "description": ""
                        },
                        "paid_amount_cents": {
                          "type": "integer",
                          "description": ""
                        },
                        "check_or_eft_number": {
                          "type": "string",
                          "description": ""
                        },
                        "payer_claim_number": {
                          "type": "string",
                          "description": ""
                        }
                      },
                      "description": "From the 277."
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the status differs from the last check on this claim."
                    },
                    "raw_277_url": {
                      "type": "string",
                      "description": "Signed link to the 277 as received."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "cs_01JBXE4H9M2T",
                  "object": "claim_status_check",
                  "status": "complete",
                  "claim_status": {
                    "category": "paid",
                    "category_code": "F1",
                    "status_code": "65",
                    "effective_date": "2026-10-21",
                    "paid_amount_cents": 31200,
                    "check_or_eft_number": "EFT00048213",
                    "payer_claim_number": "2026294000123"
                  },
                  "changed": true,
                  "raw_277_url": "https://files.daybookhealthcare.com/x/cs_01JBXE4H9M2T/277?sig=...",
                  "created_at": "2026-10-29T15:30:00Z"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payer": {
                    "type": "string",
                    "description": "Daybook payer id."
                  },
                  "provider": {
                    "type": "object",
                    "properties": {
                      "npi": {
                        "type": "string",
                        "description": "Billing or rendering NPI."
                      },
                      "tax_id": {
                        "type": "string",
                        "description": "Tax id, when the payer verifies by TIN."
                      }
                    },
                    "required": [
                      "npi"
                    ],
                    "description": ""
                  },
                  "patient": {
                    "type": "object",
                    "properties": {
                      "first_name": {
                        "type": "string",
                        "description": ""
                      },
                      "last_name": {
                        "type": "string",
                        "description": ""
                      },
                      "date_of_birth": {
                        "type": "string",
                        "description": "`YYYY-MM-DD`."
                      },
                      "member_id": {
                        "type": "string",
                        "description": "Member id on the insurance card."
                      }
                    },
                    "required": [
                      "first_name",
                      "last_name",
                      "date_of_birth",
                      "member_id"
                    ],
                    "description": ""
                  },
                  "claim": {
                    "type": "object",
                    "properties": {
                      "payer_claim_number": {
                        "type": "string",
                        "description": "The payer's claim number (ICN), when you have it."
                      },
                      "patient_control_number": {
                        "type": "string",
                        "description": "Your claim id as sent in CLM01."
                      },
                      "date_of_service": {
                        "type": "string",
                        "description": "First date of service, `YYYY-MM-DD`."
                      },
                      "billed_amount_cents": {
                        "type": "integer",
                        "description": "Total billed, in cents."
                      }
                    },
                    "required": [
                      "date_of_service"
                    ],
                    "description": ""
                  }
                },
                "required": [
                  "payer",
                  "provider",
                  "patient",
                  "claim"
                ]
              },
              "example": {
                "payer": "keystone",
                "provider": {
                  "npi": "1999999984",
                  "tax_id": "00-0000000"
                },
                "patient": {
                  "first_name": "Jordan",
                  "last_name": "Sample",
                  "date_of_birth": "1980-01-01",
                  "member_id": "W000000001"
                },
                "claim": {
                  "patient_control_number": "A-20817-1",
                  "date_of_service": "2026-09-30",
                  "billed_amount_cents": 41000
                }
              }
            }
          }
        }
      }
    },
    "/remits": {
      "get": {
        "operationId": "remitsList",
        "summary": "List remits",
        "description": "List 835 remits, newest first.",
        "tags": [
          "Remittance"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/remits/list"
        },
        "parameters": [
          {
            "name": "payer",
            "in": "query",
            "required": false,
            "description": "Only this payer.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "received_after",
            "in": "query",
            "required": false,
            "description": "RFC 3339 timestamp.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "match",
            "in": "query",
            "required": false,
            "description": "`matched` or `unmatched`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1 to 100. Defaults to 25.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "required": false,
            "description": "Cursor: a remit id from the previous page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List remits",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Remit objects."
                    },
                    "has_more": {
                      "type": "boolean",
                      "description": ""
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "remit_01JBXF8B3C4V",
                      "object": "remit",
                      "payer": "keystone",
                      "check_or_eft_number": "EFT00048213",
                      "payment_amount_cents": 31200,
                      "payment_date": "2026-10-21",
                      "deposit": {
                        "id": "dep_01JBX9",
                        "amount_cents": 31200,
                        "posted_on": "2026-10-22"
                      },
                      "claims": [
                        {
                          "patient_control_number": "A-20817-1",
                          "billed_cents": 41000,
                          "allowed_cents": 34200,
                          "paid_cents": 31200,
                          "patient_responsibility_cents": 3000,
                          "adjustments": [
                            {
                              "group": "CO",
                              "carc": "45",
                              "amount_cents": 6800
                            },
                            {
                              "group": "PR",
                              "carc": "3",
                              "amount_cents": 3000
                            }
                          ],
                          "remark_codes": [],
                          "matched_claim": "A-20817-1",
                          "denial": null
                        }
                      ],
                      "posting": {
                        "status": "proposed",
                        "entries": [
                          {
                            "type": "payment",
                            "claim": "A-20817-1",
                            "amount_cents": 31200
                          },
                          {
                            "type": "adjustment",
                            "claim": "A-20817-1",
                            "code": "CO-45",
                            "amount_cents": 6800
                          },
                          {
                            "type": "transfer_to_patient",
                            "claim": "A-20817-1",
                            "amount_cents": 3000
                          }
                        ]
                      },
                      "raw_835_url": "https://files.daybookhealthcare.com/x/remit_01JBXF8B3C4V/835?sig=..."
                    }
                  ],
                  "has_more": false
                }
              }
            }
          }
        }
      }
    },
    "/remits/{id}": {
      "get": {
        "operationId": "remitsGet",
        "summary": "Retrieve a remit",
        "description": "Fetch a remit with its claim lines, deposit match and proposed posting.",
        "tags": [
          "Remittance"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/remits/get"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The remit id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve a remit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `remit_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `remit`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "check_or_eft_number": {
                      "type": "string",
                      "description": "TRN02 trace number."
                    },
                    "payment_amount_cents": {
                      "type": "integer",
                      "description": "BPR02 total payment."
                    },
                    "payment_date": {
                      "type": "string",
                      "description": ""
                    },
                    "deposit": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": ""
                        },
                        "amount_cents": {
                          "type": "integer",
                          "description": ""
                        },
                        "posted_on": {
                          "type": "string",
                          "description": ""
                        }
                      },
                      "description": "The bank deposit the payment matched, or `null`."
                    },
                    "claims": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "patient_control_number": {
                            "type": "string",
                            "description": ""
                          },
                          "billed_cents": {
                            "type": "integer",
                            "description": ""
                          },
                          "allowed_cents": {
                            "type": "integer",
                            "description": ""
                          },
                          "paid_cents": {
                            "type": "integer",
                            "description": ""
                          },
                          "patient_responsibility_cents": {
                            "type": "integer",
                            "description": ""
                          },
                          "adjustments": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Group code, CARC and amount for each CAS adjustment."
                          },
                          "remark_codes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "RARCs."
                          },
                          "matched_claim": {
                            "type": "string",
                            "description": "Your claim id, when matched."
                          },
                          "denial": {
                            "type": "string",
                            "description": "Denial id, when the line was denied. See [Retrieve a denial](https://daybookhealthcare.com/docs/api-reference/denials/get)."
                          }
                        }
                      },
                      "description": "One entry per CLP loop."
                    },
                    "posting": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "`proposed`, `approved` or `rejected`."
                        },
                        "entries": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          },
                          "description": "Payment, adjustment and transfer entries, ready for your PM system."
                        }
                      },
                      "description": "The proposed posting."
                    },
                    "raw_835_url": {
                      "type": "string",
                      "description": "Signed link to the 835 as received."
                    }
                  }
                },
                "example": {
                  "id": "remit_01JBXF8B3C4V",
                  "object": "remit",
                  "payer": "keystone",
                  "check_or_eft_number": "EFT00048213",
                  "payment_amount_cents": 31200,
                  "payment_date": "2026-10-21",
                  "deposit": {
                    "id": "dep_01JBX9",
                    "amount_cents": 31200,
                    "posted_on": "2026-10-22"
                  },
                  "claims": [
                    {
                      "patient_control_number": "A-20817-1",
                      "billed_cents": 41000,
                      "allowed_cents": 34200,
                      "paid_cents": 31200,
                      "patient_responsibility_cents": 3000,
                      "adjustments": [
                        {
                          "group": "CO",
                          "carc": "45",
                          "amount_cents": 6800
                        },
                        {
                          "group": "PR",
                          "carc": "3",
                          "amount_cents": 3000
                        }
                      ],
                      "remark_codes": [],
                      "matched_claim": "A-20817-1",
                      "denial": null
                    }
                  ],
                  "posting": {
                    "status": "proposed",
                    "entries": [
                      {
                        "type": "payment",
                        "claim": "A-20817-1",
                        "amount_cents": 31200
                      },
                      {
                        "type": "adjustment",
                        "claim": "A-20817-1",
                        "code": "CO-45",
                        "amount_cents": 6800
                      },
                      {
                        "type": "transfer_to_patient",
                        "claim": "A-20817-1",
                        "amount_cents": 3000
                      }
                    ]
                  },
                  "raw_835_url": "https://files.daybookhealthcare.com/x/remit_01JBXF8B3C4V/835?sig=..."
                }
              }
            }
          }
        }
      }
    },
    "/remits/{id}/posting/approve": {
      "post": {
        "operationId": "remitsApprovePosting",
        "summary": "Approve a posting",
        "description": "Approve or reject the proposed posting. Approval fires `posting.approved`, which is where your write-back picks it up.",
        "tags": [
          "Remittance"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/remits/approve-posting"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The remit id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Approve a posting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `remit_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `remit`."
                    },
                    "payer": {
                      "type": "string",
                      "description": "Daybook payer id."
                    },
                    "check_or_eft_number": {
                      "type": "string",
                      "description": "TRN02 trace number."
                    },
                    "payment_amount_cents": {
                      "type": "integer",
                      "description": "BPR02 total payment."
                    },
                    "payment_date": {
                      "type": "string",
                      "description": ""
                    },
                    "deposit": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": ""
                        },
                        "amount_cents": {
                          "type": "integer",
                          "description": ""
                        },
                        "posted_on": {
                          "type": "string",
                          "description": ""
                        }
                      },
                      "description": "The bank deposit the payment matched, or `null`."
                    },
                    "claims": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "patient_control_number": {
                            "type": "string",
                            "description": ""
                          },
                          "billed_cents": {
                            "type": "integer",
                            "description": ""
                          },
                          "allowed_cents": {
                            "type": "integer",
                            "description": ""
                          },
                          "paid_cents": {
                            "type": "integer",
                            "description": ""
                          },
                          "patient_responsibility_cents": {
                            "type": "integer",
                            "description": ""
                          },
                          "adjustments": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "Group code, CARC and amount for each CAS adjustment."
                          },
                          "remark_codes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "RARCs."
                          },
                          "matched_claim": {
                            "type": "string",
                            "description": "Your claim id, when matched."
                          },
                          "denial": {
                            "type": "string",
                            "description": "Denial id, when the line was denied. See [Retrieve a denial](https://daybookhealthcare.com/docs/api-reference/denials/get)."
                          }
                        }
                      },
                      "description": "One entry per CLP loop."
                    },
                    "posting": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "`proposed`, `approved` or `rejected`."
                        },
                        "entries": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          },
                          "description": "Payment, adjustment and transfer entries, ready for your PM system."
                        }
                      },
                      "description": "The proposed posting."
                    },
                    "raw_835_url": {
                      "type": "string",
                      "description": "Signed link to the 835 as received."
                    }
                  }
                },
                "example": {
                  "id": "remit_01JBXF8B3C4V",
                  "object": "remit",
                  "payer": "keystone",
                  "check_or_eft_number": "EFT00048213",
                  "payment_amount_cents": 31200,
                  "payment_date": "2026-10-21",
                  "deposit": {
                    "id": "dep_01JBX9",
                    "amount_cents": 31200,
                    "posted_on": "2026-10-22"
                  },
                  "claims": [
                    {
                      "patient_control_number": "A-20817-1",
                      "billed_cents": 41000,
                      "allowed_cents": 34200,
                      "paid_cents": 31200,
                      "patient_responsibility_cents": 3000,
                      "adjustments": [
                        {
                          "group": "CO",
                          "carc": "45",
                          "amount_cents": 6800
                        },
                        {
                          "group": "PR",
                          "carc": "3",
                          "amount_cents": 3000
                        }
                      ],
                      "remark_codes": [],
                      "matched_claim": "A-20817-1",
                      "denial": null
                    }
                  ],
                  "posting": {
                    "status": "approved",
                    "entries": [
                      {
                        "type": "payment",
                        "claim": "A-20817-1",
                        "amount_cents": 31200
                      },
                      {
                        "type": "adjustment",
                        "claim": "A-20817-1",
                        "code": "CO-45",
                        "amount_cents": 6800
                      },
                      {
                        "type": "transfer_to_patient",
                        "claim": "A-20817-1",
                        "amount_cents": 3000
                      }
                    ]
                  },
                  "raw_835_url": "https://files.daybookhealthcare.com/x/remit_01JBXF8B3C4V/835?sig=..."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "decision": {
                    "type": "string",
                    "description": "`approve` or `reject`."
                  },
                  "note": {
                    "type": "string",
                    "description": "Kept on the audit trail."
                  }
                },
                "required": [
                  "decision"
                ]
              },
              "example": {
                "decision": "approve"
              }
            }
          }
        }
      }
    },
    "/denials/{id}": {
      "get": {
        "operationId": "denialsGet",
        "summary": "Retrieve a denial",
        "description": "Fetch a denial with its codes, the cause Daybook sorted it into, and the recommended next step.",
        "tags": [
          "Denials and appeals"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/denials/get"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The denial id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve a denial",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `den_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `denial`."
                    },
                    "remit": {
                      "type": "string",
                      "description": "The remit the denial came on."
                    },
                    "claim": {
                      "type": "string",
                      "description": "Your claim id."
                    },
                    "codes": {
                      "type": "object",
                      "properties": {
                        "group": {
                          "type": "string",
                          "description": "CAS group code."
                        },
                        "carc": {
                          "type": "string",
                          "description": ""
                        },
                        "rarc": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": ""
                        }
                      },
                      "description": ""
                    },
                    "cause": {
                      "type": "string",
                      "description": "`missing_auth`, `eligibility`, `coding`, `timely_filing`, `duplicate`, `medical_necessity`, `coordination_of_benefits`, `credentialing`, `bundling` or `other`."
                    },
                    "cause_detail": {
                      "type": "string",
                      "description": "Why Daybook sorted it there, in plain words."
                    },
                    "recommended_action": {
                      "type": "string",
                      "description": "`appeal`, `correct_and_resubmit`, `call_payer`, `bill_patient`, `bill_secondary` or `write_off`."
                    },
                    "appealable": {
                      "type": "boolean",
                      "description": ""
                    },
                    "appeal_deadline": {
                      "type": "string",
                      "description": "From the payer's filing limit, when known."
                    },
                    "amount_cents": {
                      "type": "integer",
                      "description": "Amount denied."
                    }
                  }
                },
                "example": {
                  "id": "den_01JBXG2N5R8W",
                  "object": "denial",
                  "remit": "remit_01JBXF8B3C4V",
                  "claim": "A-31120-1",
                  "codes": {
                    "group": "CO",
                    "carc": "197",
                    "rarc": [
                      "N54"
                    ]
                  },
                  "cause": "missing_auth",
                  "cause_detail": "Precertification was required for D4341 and none was on file.",
                  "recommended_action": "appeal",
                  "appealable": true,
                  "appeal_deadline": "2027-04-19",
                  "amount_cents": 88000
                }
              }
            }
          }
        }
      }
    },
    "/appeals": {
      "post": {
        "operationId": "appealsCreate",
        "summary": "Draft an appeal",
        "description": "Draft an appeal letter from a denial's data, for a biller to review and send.",
        "tags": [
          "Denials and appeals"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/appeals/create"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Draft an appeal",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `apl_`."
                    },
                    "object": {
                      "type": "string",
                      "description": "Always `appeal`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`drafting`, `ready` or `refused`."
                    },
                    "denial": {
                      "type": "string",
                      "description": "The denial id."
                    },
                    "letter": {
                      "type": "object",
                      "properties": {
                        "text": {
                          "type": "string",
                          "description": "The letter as plain text."
                        },
                        "pdf_url": {
                          "type": "string",
                          "description": "Signed link to the PDF."
                        }
                      },
                      "description": "Present when `ready`."
                    },
                    "refused_reason": {
                      "type": "string",
                      "description": "Present when `refused`: why the denial should not be appealed, with the figures behind it."
                    },
                    "created_at": {
                      "type": "string",
                      "description": "RFC 3339 timestamp."
                    }
                  }
                },
                "example": {
                  "id": "apl_01JBXH6Q0T3Y",
                  "object": "appeal",
                  "status": "drafting",
                  "denial": "den_01JBXG2N5R8W",
                  "letter": null,
                  "refused_reason": null,
                  "created_at": "2026-10-29T16:00:00Z"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "denial": {
                    "type": "string",
                    "description": "The denial id."
                  },
                  "supporting_documents": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "HTTPS links Daybook may cite, such as the auth approval or chart notes."
                  },
                  "signer": {
                    "type": "object",
                    "description": "Name and title for the signature block."
                  }
                },
                "required": [
                  "denial"
                ]
              },
              "example": {
                "denial": "den_01JBXG2N5R8W",
                "signer": {
                  "name": "Alex Biller",
                  "title": "Billing Manager"
                }
              }
            }
          }
        }
      }
    },
    "/worklists": {
      "post": {
        "operationId": "worklistsCreate",
        "summary": "Create a worklist",
        "description": "Send the accounts you already work. Daybook runs each item through your rules and reports back per item.",
        "tags": [
          "Worklists and rules"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/worklists/create"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Create a worklist",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `wl_`."
                    },
                    "status": {
                      "type": "string",
                      "description": "`processing`, `running` or `done`."
                    },
                    "item_count": {
                      "type": "integer",
                      "description": ""
                    },
                    "rules": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": ""
                    }
                  }
                },
                "example": {
                  "id": "wl_01JBXJ9",
                  "object": "worklist",
                  "status": "processing",
                  "item_count": 0,
                  "rules": [
                    "rule_01JBXJ1"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    },
                    "description": "Accounts, one per item. Any columns you have; Daybook maps the standard ones (payer, member, claim, balance)."
                  },
                  "csv_url": {
                    "type": "string",
                    "description": "Or an HTTPS link to an export from your PM system."
                  },
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Rule ids to run on every item."
                  }
                },
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "AR over 30 days",
                "csv_url": "https://example.com/exports/ar-30.csv?token=...",
                "rules": [
                  "rule_01JBXJ1"
                ]
              }
            }
          }
        }
      }
    },
    "/rules": {
      "post": {
        "operationId": "rulesCreate",
        "summary": "Create a rule",
        "description": "Tell Daybook what to do when something happens: your rule, written once, applied to every account.",
        "tags": [
          "Worklists and rules"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/rules/create"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Create a rule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `rule_`."
                    },
                    "active": {
                      "type": "boolean",
                      "description": ""
                    }
                  }
                },
                "example": {
                  "id": "rule_01JBXJ1",
                  "object": "rule",
                  "name": "Chase silent claims",
                  "active": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": ""
                  },
                  "when": {
                    "type": "object",
                    "properties": {
                      "event": {
                        "type": "string",
                        "description": "An event type, such as `denial.classified`."
                      },
                      "condition": {
                        "type": "string",
                        "description": "A condition, such as `days_since_submission >= 30 and status == \"no_response\"`."
                      },
                      "filter": {
                        "type": "object",
                        "description": "Narrow it, such as `{\"cause\": \"missing_auth\"}`."
                      }
                    },
                    "description": "The trigger: an event type, or a condition on worklist items."
                  },
                  "then": {
                    "type": "object",
                    "properties": {
                      "action": {
                        "type": "string",
                        "description": "`claim_status.check`, `call.start`, `portal_task.start`, `appeal.draft` or `notify`."
                      },
                      "params": {
                        "type": "object",
                        "description": "Fields for the action, as in its own endpoint."
                      }
                    },
                    "required": [
                      "action"
                    ],
                    "description": "The action."
                  }
                },
                "required": [
                  "name",
                  "when",
                  "then"
                ]
              },
              "example": {
                "name": "Chase silent claims",
                "when": {
                  "condition": "days_since_submission >= 30 and status == \"no_response\""
                },
                "then": {
                  "action": "claim_status.check"
                }
              }
            }
          }
        }
      }
    },
    "/webhook-endpoints": {
      "post": {
        "operationId": "webhookEndpointsCreate",
        "summary": "Create a webhook endpoint",
        "description": "Register an HTTPS URL to receive events.",
        "tags": [
          "Webhook endpoints"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/webhook-endpoints/create"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Create a webhook endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique id, prefixed `whe_`."
                    },
                    "url": {
                      "type": "string",
                      "description": ""
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": ""
                    },
                    "secret": {
                      "type": "string",
                      "description": "Signing secret, prefixed `whsec_`. Returned only on create."
                    },
                    "status": {
                      "type": "string",
                      "description": "`enabled` or `disabled`."
                    }
                  }
                },
                "example": {
                  "id": "whe_01JBXK4R7T2M9P5W3Y6A8C0D1E",
                  "object": "webhook_endpoint",
                  "url": "https://example.com/daybook/webhooks",
                  "events": [
                    "*"
                  ],
                  "secret": "whsec_...",
                  "status": "enabled"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "HTTPS only."
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Event types, or `[\"*\"]` for all. See [Event types](https://daybookhealthcare.com/docs/webhooks/event-types)."
                  },
                  "description": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "url",
                  "events"
                ]
              },
              "example": {
                "url": "https://example.com/daybook/webhooks",
                "events": [
                  "*"
                ]
              }
            }
          }
        }
      },
      "get": {
        "operationId": "webhookEndpointsList",
        "summary": "List webhook endpoints",
        "description": "List your webhook endpoints.",
        "tags": [
          "Webhook endpoints"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/webhook-endpoints/list"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "List webhook endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Webhook endpoint objects, without `secret`."
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "whe_01JBXK4R7T2M9P5W3Y6A8C0D1E",
                      "object": "webhook_endpoint",
                      "url": "https://example.com/daybook/webhooks",
                      "events": [
                        "*"
                      ],
                      "secret": null,
                      "status": "enabled"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/webhook-endpoints/{id}": {
      "delete": {
        "operationId": "webhookEndpointsDelete",
        "summary": "Delete a webhook endpoint",
        "description": "Remove an endpoint, so Daybook stops sending events to it.",
        "tags": [
          "Webhook endpoints"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/webhook-endpoints/delete"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete a webhook endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": ""
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": ""
                    }
                  }
                },
                "example": {
                  "id": "whe_01JBXK4R7T2M9P5W3Y6A8C0D1E",
                  "object": "webhook_endpoint",
                  "deleted": true
                }
              }
            }
          }
        }
      }
    },
    "/webhook-endpoints/{id}/test": {
      "post": {
        "operationId": "webhookEndpointsTest",
        "summary": "Send a test event",
        "description": "Send one signed webhook.test event to the endpoint now, and record the delivery.",
        "tags": [
          "Webhook endpoints"
        ],
        "externalDocs": {
          "url": "https://daybookhealthcare.com/docs/api-reference/webhook-endpoints/test"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Send a test event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery": {
                      "type": "object",
                      "description": "The delivery, as it shows in the endpoint's delivery log."
                    },
                    "delivery.event_id": {
                      "type": "string",
                      "description": "The event's `id`, `evt_` and a ULID, sent as the `webhook-id` header."
                    },
                    "delivery.status": {
                      "type": "string",
                      "description": "`succeeded` when your endpoint answered `2xx` within 10 seconds, otherwise `failed`."
                    },
                    "delivery.response_status": {
                      "type": "integer",
                      "description": "Your endpoint's HTTP status, or `null` when it did not answer."
                    }
                  }
                },
                "example": {
                  "delivery": {
                    "id": "whd_01JBXK9C3V5N8Q2R4T6W8Y0A1B",
                    "endpoint_id": "whe_01JBXK4R7T2M9P5W3Y6A8C0D1E",
                    "event_id": "evt_01JBXK8N3QZ7V2C4D5E6F7G8HJ",
                    "event_type": "webhook.test",
                    "attempt": 1,
                    "status": "succeeded",
                    "response_status": 200,
                    "duration_ms": 142,
                    "created_at": "2026-10-29T14:31:40Z"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}