Daybook DocsDaybook Docs
Browse

Quickstart

Make your first request and receive your first webhook: check a claim's status, then send a signed test event to your endpoint.

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, 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.
    • sk_live_... keys belong to a production account and reach real payers. Production accounts are set up with our team: 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.

  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. 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.

    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);
      }
    });

    verifyDaybookWebhook is twenty lines; copy it from Verifying signatures.

Next steps

On this pageNext steps