canonical: https://jentic.com/apis/auth.calm.com/calm-partner

# Auth Calm Calm Partner API

Jentic publishes the only available OpenAPI specification for Calm Partner API, keeping it validated and agent-ready. The Calm Partner API lets approved business partners integrate Calm subscriptions into their own platforms - for example, a health insurer or employer wellbeing benefit that wants to grant Calm access to its members. Three endpoints cover the full integration: authenticate the partner service, link a partner user to a Calm account, and cancel a user's subscription. Authentication is JWT-based and shared between the auth.calm.com production endpoint and a development endpoint.

## For AI agents

Authenticate a Calm partner service, link partner users to Calm accounts, and cancel partner-provisioned subscriptions via JWT-based REST endpoints.

## Scope

Does not handle consumer Calm app sign-up, in-app content, or end-user authentication - use for Calm B2B partner provisioning, linking, and cancellation only.

## Capabilities

- Authenticate the partner service and obtain a JWT via POST `/v0/authorize`
- Link a partner user to a Calm account through POST `/v0/b2b/users/link`
- Cancel a partner-provisioned subscription via DELETE `/v0/b2b/users/{partner_user_id}`
- Use the same auth flow against the production and development environments
- Provision Calm access at scale from an HRIS, benefits, or insurance platform

## Use cases

### Employer wellbeing benefit provisioning

An employer offering Calm as a wellbeing benefit needs every active employee to receive Calm access automatically and lose it when they leave. The partner platform calls POST `/v0/authorize` to get a JWT, POST `/v0/b2b/users/link` to provision a new hire, and DELETE `/v0/b2b/users/{partner_user_id}` when an HRIS termination event arrives. Provisioning becomes a side effect of payroll changes rather than a manual admin task.

Example prompt: On an HRIS new-hire event, POST `/v0/authorize`, then POST `/v0/b2b/users/link` with the employee's partner_user_id and email.

### Health-insurance member access

Health insurers offering Calm as a covered benefit link the insurer's member ID to a Calm account so the member can sign in with single-sign-on or a deep link. POST `/v0/b2b/users/link` takes the partner_user_id (the insurer's member ID) and the user's identifying details and returns a Calm account binding. Member churn flows through DELETE so cancelled policies do not retain Calm access.

Example prompt: For each member in an eligibility file, POST `/v0/b2b/users/link` with their member ID and email, and record the Calm response on the member record.

### Subscription lifecycle audit

A partner program manager needs to keep the count of active Calm subscriptions consistent with the count of eligible members. The partner runs a reconciliation job that authenticates via POST `/v0/authorize`, iterates over expected partner_user_ids, and calls DELETE `/v0/b2b/users/{partner_user_id}` for any that should no longer be active. The audit reduces overpayment to Calm and removes lingering access for departed users.

Example prompt: POST `/v0/authorize`, then for each partner_user_id flagged as terminated, DELETE `/v0/b2b/users/{partner_user_id}` and log the response.

### AI agent integration via Jentic

An HR-ops or benefits agent built on Jentic can run Calm provisioning without storing the partner JWT in prompt memory. The agent searches an intent like 'link a user to a Calm subscription', Jentic returns the matching POST `/v0/b2b/users/link` operation with its input schema, and execution uses the JWT resolved from your Jentic One instance. Token refresh against POST `/v0/authorize` is handled automatically.

Example prompt: Use Jentic search 'link a user to a Calm subscription', load the schema for POST `/v0/b2b/users/link`, and execute it with partner_user_id and email.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v0/authorize` | Authenticate the partner service and obtain a JWT |
| POST | `/v0/b2b/users/link` | Link a partner user to a Calm account |
| DELETE | `/v0/b2b/users/{partner_user_id}` | Cancel a partner-provisioned subscription |

## Key resources

- **Authentication** — Partner-service JWT issuance via POST `/v0/authorize`
- **Subscription** — Partner-user linking and cancellation under `/v0/b2b/users`

## Why Jentic

- **Setup:** Wiring the Calm Partner API by hand means calling its authorize endpoint for a JWT, refreshing it on expiry, and managing B2B user linking and cancellation yourself. Through Jentic you install once, import the Calm Partner API from the API Directory, store the partner credentials once, and your agent calls it while Jentic manages the JWT.
- **Permission scoping:** Calm puts the partner user id in the URL path (`/v0/b2b/users/{partner_user_id}`) for cancellation, while authorize and link carry their target in the request body, so limit the agent to the operations it needs, such as authorizing or linking a user. You choose the operations it may call, so user cancellation is not included unless you add it.
- **Credential handling:** Your Calm partner credentials and the resulting JWT are stored once, encrypted, by your own Jentic One instance, which refreshes the JWT via the authorize endpoint and injects it at execution time. The raw secret never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'link a user to Calm', and Jentic returns the matching operation with its input schema so the agent picks `/v0/authorize`, `/v0/b2b/users/link`, or `/v0/b2b/users/{partner_user_id}` without reading the partner docs.

## Related APIs

- **Stripe API** — Stripe handles billing for the partner platform that wraps the Calm benefit.
- **HubSpot CRM API** — HubSpot holds the partner-side member or employee record that maps to a Calm partner_user_id.
- **Twilio Messaging API** — Twilio sends the welcome message that points a newly linked user to their Calm benefit.

## FAQ

### Why is there no official OpenAPI spec for Calm Partner API?

Calm publishes prose partner documentation at partner.calm.com/docs/api but does not distribute an OpenAPI file. Jentic generates and maintains this spec so that AI agents and developers can call Calm Partner API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Calm Partner API use?

The Calm Partner API uses JWT-based authentication. The partner service calls POST `/v0/authorize` with its credentials and receives a JWT, which is then sent as a Bearer token on POST `/v0/b2b/users/link` and DELETE `/v0/b2b/users/{partner_user_id}.` Through Jentic the partner credentials and JWT are held in the vault.

### Can I link an employee to a Calm subscription with the Calm Partner API?

Yes. POST `/v0/b2b/users/link` takes a partner_user_id (the partner's internal ID for the employee or member) plus identifying fields and binds them to a Calm account. The same partner_user_id is used to cancel via DELETE `/v0/b2b/users/{partner_user_id}.`

### What are the rate limits for the Calm Partner API?

Rate limits are not declared in the spec. Calm gates partner traffic per agreement; production integrations should pace bulk eligibility loads and back off on 429 responses rather than retry tightly. Pre-coordinate with Calm before sending eligibility files larger than tens of thousands of users.

### How do I provision a Calm benefit through Jentic?

Run jentic search 'link a user to Calm', load the schema for POST `/v0/b2b/users/link`, and execute it with the partner_user_id and email. The JWT is refreshed against POST `/v0/authorize` and resolved from your Jentic One instance at execution time. With pip install jentic the call is one async invocation.

### Is the Calm Partner API free?

No. Access is commercial and tied to a Calm partner agreement, typically with employers, insurers, or wellness platforms. The credentials needed for POST `/v0/authorize` are issued only after the partner contract is in place.

### Can I limit what my agent is allowed to do with the Calm Partner API?

Yes. Because you run Jentic One yourself, you decide which of the Calm Partner API operations your agent may call, so you can allow it to authenticate via POST `/v0/authorize` and link members via POST `/v0/b2b/users/link` while withholding cancellation. Subscription cancellation through DELETE `/v0/b2b/users/{partner_user_id}` is only available to the agent if you explicitly add it to the operations it may use. Your partner credentials and the JWT stay in your own instance and are injected at execution time rather than exposed to the agent, so the agent can only act within the scope your rules define.
