# Quickstart

Make your first Daybook API request and receive your first webhook: check a claim's status over 276/277 and get the answer back in your own system.

Source: https://daybookhealthcare.com/docs/quickstart

This guide checks a claim's status, then sends a signed test event to your own endpoint. It takes about five minutes.

### 1. Get your API keys

Create a free [sandbox account](https://daybookhealthcare.com/docs/accounts), then open **Developers → API keys** in the Daybook app and create a key. The key is shown once, when you create it; copy it to your secrets manager then.

- `sk_test_...` keys belong to a sandbox account and open only that account. A sandbox is a real workspace with every capability of production: its clearinghouse requests go to Stedi's test payers and members when Daybook has given it a Stedi test key, its webhook events carry `mode: test`, and a payer call placed from it is a real call. See [Sandbox and payer calls](https://daybookhealthcare.com/docs/authentication#sandbox-and-payer-calls).
- `sk_live_...` keys belong to a production account and reach real payers. Production accounts are set up with our team: [book a demo](https://daybookhealthcare.com/book-a-demo).

Keep keys on your server. Never ship them to a browser or a mobile app.

```bash
export DAYBOOK_API_KEY=sk_test_...
```

### 2. Register a webhook endpoint

Tell Daybook where to send events: open **Developers → Webhooks** in the Daybook app, add an endpoint with its HTTPS URL, and choose its event types, or `*` for all. Any HTTPS URL works; for local testing, a tunnel such as `cloudflared` is fine.

Daybook shows the endpoint's signing secret, starting `whsec_`, once. Store it: you use it to [verify signatures](https://daybookhealthcare.com/docs/webhooks/verifying-signatures).

### 3. Check a claim's status

```bash
curl https://api.daybookhealthcare.com/v1/claim-status/checks \
  -H "Authorization: Bearer $DAYBOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "payer": "keystone",
    "provider": { "npi": "1999999984" },
    "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" }
  }'
```

The answer comes back in the response, normalized from the 277:

```json
{
  "id": "cs_01JBXE4H9M2T",
  "object": "claim_status_check",
  "status": "complete",
  "claim_status": {
    "category": "paid",
    "category_code": "F1",
    "paid_amount_cents": 31200,
    "check_or_eft_number": "EFT00048213"
  },
  "changed": true
}
```

### 4. Receive a test event

Choose **Send test event** on the endpoint's page, or call [Send a test event](https://daybookhealthcare.com/docs/api-reference/webhook-endpoints/test). Daybook signs a `webhook.test` event and posts it to your endpoint. Verify the signature, return `2xx` quickly, and do the work after. The delivery shows on the endpoint's page.

Node (Express):

```javascript
import express from "express";
import { verifyDaybookWebhook } from "./verify.js";

const app = express();

app.post("/daybook/webhooks", express.raw({ type: "application/json" }), (req, res) => {
  const event = verifyDaybookWebhook(
    req.body,
    req.headers,
    process.env.DAYBOOK_WEBHOOK_SECRET,
  );
  res.sendStatus(200);

  if (event.type === "webhook.test") {
    console.log(event.data.message);
  }
});
```

Python (Flask):

```python
import os
from flask import Flask, request
from verify import verify_daybook_webhook

app = Flask(__name__)

@app.post("/daybook/webhooks")
def daybook_webhook():
    event = verify_daybook_webhook(
        request.get_data(),
        request.headers,
        os.environ["DAYBOOK_WEBHOOK_SECRET"],
    )
    if event["type"] == "webhook.test":
        print(event["data"]["message"])
    return "", 200
```

`verifyDaybookWebhook` is twenty lines; copy it from [Verifying signatures](https://daybookhealthcare.com/docs/webhooks/verifying-signatures).

## Next steps

- [APIs by workflow](https://daybookhealthcare.com/docs/workflows): Pick the workflow you want to plug in.
- [Rules](https://daybookhealthcare.com/docs/worklists-and-rules): Let Daybook start checks and calls on its own, from your rules.
- [Event types](https://daybookhealthcare.com/docs/webhooks/event-types): The events Daybook sends, and their data.
- [MCP](https://daybookhealthcare.com/docs/mcp): Give your agents the same operations as tools.
