FUSE Health Webhooks API
The Webhooks API from FUSE Health — 2 operation(s) for webhooks.
The Webhooks API from FUSE Health — 2 operation(s) for webhooks.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/fusehealth-com:fusehealth-com-webhooks-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: FUSE Brand API (External) Webhooks API
version: 1.0.0
description: 'Server-to-server API exposing the FUSE brand-admin surface so a single brand/tenant can build its own admin frontend. Every request is authenticated with an API key bound to exactly one clinic; all data is auto-scoped to that clinic and cannot reach another brand''s data. Isolation is enforced by application-layer clinic filtering on every query.
COVERAGE: 218 operations across 180 paths, and EVERY ONE is available to every brand. There is no per-clinic enablement step. What governs access: your API key and its scopes, the clinic the key belongs to (every read and write is filtered to it), your plan''s entitlements for the two commercially-gated areas — Affiliates (`AFFILIATES_TIER_REQUIRED`) and CRM Connect (`CRM_TIER_REQUIRED`) — and rate limits.
AUTH: the external /api/v1 surface uses an API key (`x-api-key`, ApiKeyAuth). Key management (/api-keys) and /auth/signin live at the API root and use a brand-admin JWT (BearerAuth); /auth/signin itself is unauthenticated.
SCOPES: every key carries scopes; read-only is the default and mutating endpoints require the `write` scope (403 INSUFFICIENT_SCOPE otherwise). Keys default to a 1-year expiry.
RATE LIMITING: every endpoint may additionally return `429 Too Many Requests` with a `Retry-After` header; 429 is not repeated on each operation below.
PLATFORM FIELDS: product cost, fees, pharmacy routing, doctor questions and FUSE approvals are set by FUSE, not by the brand. Any write (POST/PUT/PATCH/DELETE) whose JSON body carries one of those fields at any depth — for example `pharmacyPrice`, `shippingFeeUsd`, `coolerFeeUsd`, `pharmacyId`, `preferredPharmacyId`, `pharmacyProvider`, `requiredDoctorQuestions`, `facilitationFee`, `placeholderPrice`, `legalBusinessName`, `isTemplate` or `tenantManagerApproved` — is refused with `403 PLATFORM_FIELD`, whose `fields` array lists the offending paths; remove them and resend. (One exception: `POST /api/v1/products` still accepts the `pharmacyPrice` its schema requires, and ignores it.) 403 PLATFORM_FIELD is not repeated on each operation below.'
servers:
- url: https://api-dev.fusehealth.com
description: Development
- url: https://api.fusehealth.com
description: Production
security:
- ApiKeyAuth: []
tags:
- name: Webhooks
paths:
/api/v1/webhooks:
post:
tags:
- Webhooks
summary: Register an outbound webhook endpoint
operationId: postApiV1Webhooks
description: 'Register a publicly-reachable HTTPS endpoint to receive signed, opaque-id-only checkout lifecycle events (`session.completed`, `order.created`, `payment.succeeded`), intake conversion events (`intake.started`, `intake.abandoned`), order/fulfillment events (`order.placed`, `order.cancelled`, `order.doctor_approved`, `order.doctor_denied`, `order.sent_to_pharmacy`, `order.shipped`, `order.delivered`, `payment.failed`, `shipment.updated`), telehealth events (`appointment.scheduled`, `appointment.cancelled`) and suppression sync (`contact.unsubscribed`) instead of polling GET /checkout/sessions/{id}. The full accepted event set is the 17-value enum below — registration rejects anything else with 400. Each delivery body is `{ id, event, createdAt, data:{ …opaque ids + event-specific fields } }`; the exact per-event payload key sets are documented in docs/api/external-brand-api/OUTBOUND-WEBHOOKS.md (source of truth: BRAND_WEBHOOK_PAYLOAD_KEYS in patient-api/src/services/brand-webhook-dispatch.service.ts). Note `order.doctor_denied` is accepted at registration but currently has no firing source in the API — it is declared for forward compatibility and will not be delivered until the denial chokepoint emits it. Verify `X-Fuse-Signature: t=,v1=` (HMAC-SHA256 over `.` keyed by the endpoint secret) and dedupe on `X-Fuse-Idempotency-Key` (stable across retries and replays; `X-Fuse-Delivery-Id` is a per-attempt id, not a dedupe key). URLs that resolve to private/link-local addresses are refused and 3xx redirects are not followed (SSRF protection). The secret is returned in THIS response ONLY and is never retrievable again. Requires write scope; secret keys only.'
security:
- ApiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- url
- events
properties:
url:
type: string
format: uri
description: Absolute https:// URL.
events:
type: array
items:
type: string
enum:
- session.completed
- order.created
- payment.succeeded
- intake.started
- intake.abandoned
- order.cancelled
- shipment.updated
- appointment.scheduled
- appointment.cancelled
- order.placed
- payment.failed
- order.doctor_approved
- order.doctor_denied
- order.sent_to_pharmacy
- order.shipped
- order.delivered
- contact.unsubscribed
minItems: 1
responses:
'201':
description: Created — secret returned once
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
id:
type: string
format: uuid
url:
type: string
events:
type: array
items:
type: string
isActive:
type: boolean
secret:
type: string
description: Signing secret (whsec_…) — shown once.
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
description: Insufficient scope, or a publishable key used on a route it may not call
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
get:
tags:
- Webhooks
summary: List the clinic's webhook endpoints (secrets omitted)
operationId: getApiV1Webhooks
security:
- ApiKeyAuth: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
url:
type: string
events:
type: array
items:
type: string
isActive:
type: boolean
lastTriggeredAt:
type:
- string
- 'null'
format: date-time
consecutiveFailures:
type: integer
'401':
$ref: '#/components/responses/Unauthorized'
/api/v1/webhooks/{id}:
delete:
tags:
- Webhooks
summary: Delete a webhook endpoint (own-clinic only)
operationId: deleteApiV1WebhooksById
description: Foreign-clinic ids return 404. Requires write scope; secret keys only.
security:
- ApiKeyAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Deleted
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
data:
type: object
properties:
id:
type: string
format: uuid
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
components:
responses:
BadRequest:
description: Bad request / business-rule failure (may include a `code`)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
Unauthorized:
description: Missing, invalid, inactive, or expired API key (or JWT)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
NotFound:
description: Resource not found (or not owned by the key's clinic)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
schemas:
ErrorEnvelope:
description: 'Failure shape. NOTE: most modules use `message`; programs endpoints use `error`. Read both. Some errors include a machine-readable `code` and/or a `data` payload.'
type: object
properties:
success:
type: boolean
enum:
- false
message:
type: string
error:
type: string
code:
type: string
data: {}
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: Clinic-scoped API key. Keep server-side; never expose in a browser or app bundle.
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: FUSE brand-admin JWT (from POST /auth/signin). Used ONLY by the key-management endpoints — the external /api/v1 surface never accepts JWTs, and API keys never work on key management.