API Overview

    What the Patrol Sense API is for, how access is controlled, and which workflows it is designed to support.

    Authentication

    Access is identity-based, not shared-secret based.

    Bearer tokens

    Every request carries a token bound to a workspace member and their role. Tokens are short-lived and refreshable.

    Tenant scoping

    Authorization is enforced in the database, not in application code. A request can only ever return rows belonging to the caller's organization.

    Role awareness

    Owner, admin, manager, and viewer roles constrain the API exactly as they constrain the dashboard.

    Webhooks

    Outbound, signed, and retried.

    Signed payloads

    Each delivery includes a signature header so your receiver can verify the payload originated from Patrol Sense.

    Retry with backoff

    Failed deliveries retry on an exponential schedule and are recorded in a per-endpoint delivery log.

    Idempotency

    Events carry a stable identifier so replays and retries can be de-duplicated on your side.

    Event types

    Patrol Sense webhook event types
    EventMeaning
    incident.createdA detection has been confirmed and an incident record exists with its first snapshot.
    incident.updatedStatus, severity, assignment, or classification changed.
    incident.resolvedAn incident was marked resolved; the payload carries the previous status.
    evidence_package.readyA claim-ready evidence package has finished assembling and can be shared.
    camera.offlineA stream stopped responding and analysis is paused for that camera.
    camera.onlineA previously offline stream is producing usable frames again.

    Claims Evidence API

    For insurers, adjusters and claims software: read a customer's incidents, evidence and claim reports with a key the customer gives you.

    1. Get a sandbox key

    Create a free Patrol Sense account, then open Settings → API Keys → Insurance and claims partner keys and create a Test (sample data) key. It works at once, is shown only once and sees one synthetic incident.

    2. Make a first call

    Send the key as a Bearer token. A test key returns the synthetic incident; a live key returns only the organization that created it, and only its allowed buildings.

    3. Go live

    The customer creates a live key for you with only the scopes you need and can revoke it at any time. Every call is logged for the customer.

    Example request and answer (sandbox)

    curl "https://api.patrolsense.com/v1/claims/incidents?limit=1" \
      -H "Authorization: Bearer ps_test_..."
    {
      "object": "list",
      "data": [{
        "schema": "patrolsense.canonical.v1",
        "id": "11111111-1111-4111-8111-111111111111",
        "category": "slip_fall",
        "severity": "high",
        "status": "investigating",
        "occurred_at": "2026-02-11T14:22:09.000Z",
        "timezone": "America/New_York",
        "property": { "name": "Sandbox Lobby Tower (synthetic)", "city": "Sandbox City", "country": "US" },
        "evidence_package_ref": "pkg_22222222-2222-4222-8222-222222222222",
        "claim_report_ref": "rpt_33333333-3333-4333-8333-333333333333",
        "synthetic": true
      }],
      "has_more": false,
      "next_cursor": null,
      "request_id": "req_..."
    }

    Claims webhooks

    Deliveries are signed: X-Webhook-Signature is sha256= followed by the HMAC-SHA256 of the timestamp, a dot and the raw body, keyed with your endpoint's secret; X-Webhook-Timestamp is in seconds. Reject deliveries older than 5 minutes and use X-Webhook-Id to drop repeats.

    // Node.js: verify a claims webhook delivery
    import { createHmac, timingSafeEqual } from "node:crypto";
    const ts = req.headers["x-webhook-timestamp"];          // seconds
    const sent = req.headers["x-webhook-signature"];        // "sha256=<hex>"
    const want = "sha256=" + createHmac("sha256", process.env.WEBHOOK_SECRET)
      .update(`${ts}.${rawBody}`).digest("hex");
    const fresh = Math.abs(Date.now() / 1000 - Number(ts)) <= 300;
    const ok = fresh && sent.length === want.length && timingSafeEqual(Buffer.from(sent), Buffer.from(want));

    Events: incident.created, incident.verified, evidence.ready, evidence_package.ready, claim_report.ready_for_review, claim_report.approved, claim_report.shared, claim_report.share_revoked

    Integration patterns

    Operational alerting

    Route incidents into the channel your team already watches and keep triage where it happens today.

    Claims workflows

    Trigger on evidence package readiness, attach the package to a claim record, and keep the share link permissioned.

    Incident Graph access

    Read the structured relationships between incidents, cameras, sites, and evidence rather than scraping the interface.

    Portfolio reporting

    Pull incident and camera health data on a schedule to feed your own BI or risk models.

    Deployment philosophy

    Integrations are outbound by default. Patrol Sense does not require inbound firewall rules into your network.

    Evidence stays snapshot-based. Integrations exchange structured metadata and still images, not continuous video.

    Your data remains yours. Export paths exist for every record the platform holds about your organization.

    API questions

    Does Patrol Sense offer an API?

    Yes. Owners and admins can create API keys in Settings, with scopes and an expiry, and use the documented public API at /docs. Webhooks can send events to your own systems. Copilot can also create and revoke keys and set up webhooks: the key or signing secret is shown once in a secure card and never kept in the chat.

    Can we integrate before a ready-made connector exists?

    Yes. Webhooks and the public API cover most workflows, such as sending incidents and evidence into claims or ticketing systems.

    How is API access authenticated?

    Each request carries an organization API key (or a signed-in user's token) as a Bearer credential. The same database access rules as the dashboard apply, so a key can never read another organization's data.

    Can an AI assistant query our data?

    Yes, through the Copilot in the dashboard, which works under your own sign-in and permissions. Your own tools and AI assistants can use the public API with an organization API key, which is limited to your organization in the same way. Neither can reach other organizations. A ready-made MCP server is not offered today.

    What are the API rate limits?

    By default up to 600 requests per minute per API key or user. Contact us before large bulk exports.

    How can an insurer or a developer try the Claims API?

    Create a free account and open Settings → API Keys → Insurance and claims partner keys to create a Test (sample data) key. It works at once and returns one synthetic incident with its evidence package and claim report, so you can build against real responses. The API page has an example request, the webhook signature check and a Postman collection. A live key is created by the customer with only the scopes you need and can be revoked at any time.