API documentation

Read and write people and cases from your own systems, and get a signed webhook when something happens. API access and webhooks are included with Growth and higher plans.

Machine-readable: openapi.json

Authentication

Create an API key in Casey under Studio, Developers. Send it as a bearer token. Keys belong to one organization, carry scopes, and can be revoked at any time. Keep them secret: they are shown once.

curl https://meetcasey.co/api/v1/people \
  -H "Authorization: Bearer YOUR_API_KEY"

Scopes: people:readpeople:writecases:readcases:write

Limits and errors

  • 120 requests per minute per key. Over the limit you get 429 with a retry-after header.
  • Errors look like {"error":{"code":"unauthorized","message":"..."}}. Common codes: 401 missing or revoked key, 403 missing scope or plan, 404 not found, 422 invalid input.
  • Lists are paged: pass limit (1 to 100) and the cursor from the last response’s nextCursor.

Endpoints

  • get/api/v1/people

    List people

    Scope: people:read

    • limit (query, integer)
    • cursor (query, string)
  • post/api/v1/people

    Create a person

    Scope: people:write

  • get/api/v1/people/{id}

    Get a person

    Scope: people:read

    • id (path, required, string)
  • get/api/v1/cases

    List cases

    Scope: cases:read

    • limit (query, integer)
    • cursor (query, string)
    • status (query, string)
  • post/api/v1/cases

    Open a case

    Scope: cases:write. Starts at the case type's first stage and creates its default tasks.

  • get/api/v1/cases/{id}

    Get a case

    Scope: cases:read

    • id (path, required, string)
  • patch/api/v1/cases/{id}

    Update title or priority

    Scope: cases:write

    • id (path, required, string)

Webhooks

Add an endpoint under Studio, Developers and choose the events you want. Casey sends a JSON POST and retries failures up to five times with increasing delays. In HIPAA and education workspaces payloads carry identifiers and state only; fetch details over the API.

Events: case.createdcase.stage_changedcase.closedreferral.receivedreferral.acceptedtest.ping

Verify the signature

Every request carries x-casey-signature: sha256=<hex>, an HMAC-SHA256 of the raw body with your endpoint’s secret. Compute it and compare in constant time before trusting the payload.

import { createHmac, timingSafeEqual } from "crypto";

function verify(rawBody, header, secret) {
  const expected = "sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex");
  return header.length === expected.length &&
    timingSafeEqual(Buffer.from(header), Buffer.from(expected));
}

Questions or something missing? Contact us or write to hello@meetcasey.co.