> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bearer Partner Type Authentication

> Learn how Bearer partner authentication works, when to pass provider_id, and how to integrate with REST APIs

Some partners cannot include clinician identity in the OAuth 2.0 token they send to Suki. During onboarding, Suki configures these organizations as **Bearer partners**.

Bearer partners authenticate the same way as other server-to-server integrations by sending `partner_token` in the request body of the [Login](/api-reference/authentication/login) and [Register](/api-reference/authentication/register) APIs.

Because `partner_token` does not identify the clinician, Bearer partners must also include `provider_id` in every Login and Register request. Suki uses `provider_id` to identify the clinician and validates it against the expression configured during onboarding.

<Note>
  **Important**

  * Bearer authentication **is not the same as** Single Auth Token authentication. Bearer partners send `provider_id` only during Login and Register. Single Auth Token partners include clinician identity on every subsequent API request by sending `sdp_provider_id`. See [Single Auth Token authentication](/api-reference/single-auth-token-authentication).

  * A partner cannot use both Bearer authentication and Single Auth Token authentication.

  * Suki assigns your authentication type during onboarding. If you are unsure whether your organization is configured as a Bearer partner, contact your Suki partnership team.
</Note>

## Prerequisites

Before you implement Bearer partner authentication, confirm the following:

* **Bearer partner configuration** - Your Suki partner contact confirms that your organization is configured as a Bearer partner.
* **Provider ID format** - You and Suki agree on a stable provider identifier format, such as an email address or external user ID. Use the same format on every login and register call.
* **HTTPS required** - Send [Login](/api-reference/authentication/login) and [Register](/api-reference/authentication/register) requests as HTTPS POST requests with a JSON body. Do not send credentials in query parameters.

## Common integration patterns and use cases

Use Bearer partner authentication only when Suki configured this partner type during onboarding. In each pattern, your backend supplies the active provider identity separately from the shared token.

<CardGroup cols={2}>
  <Card title="Shared Partner Token" icon="key">
    Reuse the shared `partner_token` across providers, and send the active provider's stable `provider_id` on every [Login](/api-reference/authentication/login) and [Register](/api-reference/authentication/register) request.
  </Card>

  <Card title="Identity Outside the Partner Token" icon="user">
    Read the signed-in provider from your application session or identity store, then map that identity to the agreed `provider_id` format in the authentication request body.
  </Card>

  <Card title="No Per-User ID Token" icon="shield">
    Keep your existing shared-token model when your identity provider cannot issue a Suki-compatible per-user token. Use `provider_id` as the separate provider identity.
  </Card>
</CardGroup>

<img src="https://mintcdn.com/suki-1e08f176/JWCBr7FDuYx75ifb/api-reference/assets/bearer-shared-accounts-flow-light.svg?fit=max&auto=format&n=JWCBr7FDuYx75ifb&q=85&s=3d7df41a474ba24ba3aeab1bb9c1f33d" alt="Diagram: Tenant A, Tenant B, and Tenant C connect through shared partner tokens, then to the Suki platform." className="block dark:hidden w-full max-w-4xl mx-auto" width={840} height={400} loading="eager" decoding="async" data-path="api-reference/assets/bearer-shared-accounts-flow-light.svg" />

<img src="https://mintcdn.com/suki-1e08f176/JWCBr7FDuYx75ifb/api-reference/assets/bearer-shared-accounts-flow-dark.svg?fit=max&auto=format&n=JWCBr7FDuYx75ifb&q=85&s=3c81e6a47359eb7ec2d04a2a94deaca1" alt="Diagram: Tenant A, Tenant B, and Tenant C connect through shared partner tokens, then to the Suki platform." className="hidden dark:block w-full max-w-4xl mx-auto" width={840} height={400} loading="eager" decoding="async" data-path="api-reference/assets/bearer-shared-accounts-flow-dark.svg" />

## How Bearer authentication differs

Bearer partners authenticate the same way as other partners, but clinician identity is provided through `provider_id` instead of being derived from `partner_token`.

| Topic                               | Standard authentication                | Bearer authentication                                       |
| :---------------------------------- | :------------------------------------- | :---------------------------------------------------------- |
| Clinician identity                  | Derived from `partner_token`           | Passed as `provider_id` in the request body                 |
| `partner_token`                     | Per-user ID token or user-scoped token | Typically one shared `partner_token` for multiple providers |
| `provider_id` on Login and Register | Optional and ignored                   | **Required**                                                |
| `provider_id` validation            | Not applicable                         | Must match the expression configured during onboarding      |

### Bearer authentication behavior

* Login and Register identify the clinician using `provider_id` instead of per-user claims in `partner_token`.
* Clients, including the Web SDK, pass `provider_id` for Bearer partners. Other clients can do the same.
* `provider_id` is **required** and must follow the format agreed during onboarding.
* Bearer partners cannot have the `READONLY` partner access level.

<Note>
  In Bearer partner authentication, the partner application provides the provider identity on behalf of the signed-in user. This is different from the HTTP `Authorization: Bearer` header format.

  You still send `partner_token` in the JSON request body for login and register requests.
</Note>

<Warning>
  **Security considerations for Bearer partners**

  Accepting end-user identifiers as API metadata has security implications:

  * **Encryption:** Send `provider_id` in the JSON body of HTTPS POST requests over TLS. Do not put credentials in query parameters.
  * **Impersonation:** Restrict Login and Register to trusted systems so impostors cannot assert another clinician's `provider_id`.
  * **Shared token risk:** Unlike signed OAuth tokens, user metadata in the API body can be misused if someone obtains your shared service account `partner_token`. Monitor for abuse and rotate tokens when your identity provider allows it.
</Warning>

## Authentication workflow

For Bearer partners, Suki validates `partner_id` and `provider_id` on [Login](/api-reference/authentication/login). If the provider is not registered, call [Register](/api-reference/authentication/register), then call Login again.

The flow matches standard partners after registration. Learn more about registration scenarios in [Provider authentication](/api-reference/provider-authentication#registration-scenarios).

## Login and Register request fields

Bearer partners use the same login and register endpoints as standard partners. You must include `provider_id` on every login and register call.

### Login

<Callout title="Login" icon="code">
  **Endpoint:** [Login](/api-reference/authentication/login)

  **Method:** <Badge color="blue" size="sm">POST</Badge>
</Callout>

| Field           | Bearer partners                                                                                                                                             |
| :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `partner_id`    | <Badge color="red" size="sm">Required</Badge>. Partner ID from Suki.                                                                                        |
| `partner_token` | <Badge color="red" size="sm">Required</Badge>. Shared `partner_token` your integration uses for authentication.                                             |
| `provider_id`   | <Badge color="red" size="sm">Required</Badge>. Stable identifier for the provider in your system. Must match the format agreed with Suki during onboarding. |

#### Example request

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  curl -X POST https://sdp.suki-stage.com/api/v1/auth/login \
    -H "Content-Type: application/json" \
    -d '{
      "partner_id": "your-partner-id",
      "partner_token": "your-shared-partner-token",
      "provider_id": "provider-123"
    }'
  ```
</CodeGroup>

<Tip>
  On success, the API returns `suki_token`. Use it as the `sdp_suki_token` header on later Ambient API calls. The token is valid for **1 hour**. To refresh it, call Login again with a valid `partner_token`.
</Tip>

### Register

Register a provider once before their first login. Refer to [Provider authentication](/api-reference/provider-authentication#registration-scenarios) for new user, existing user, and conflict responses.

<Callout title="Register" icon="code">
  **Endpoint:** [Register](/api-reference/authentication/register)

  **Method:** <Badge color="blue" size="sm">POST</Badge>
</Callout>

| Field                | Bearer partners                                                                                                                                    |
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| `partner_id`         | <Badge color="red" size="sm">Required</Badge>. Partner ID from Suki.                                                                               |
| `partner_token`      | <Badge color="red" size="sm">Required</Badge>. Shared `partner_token` your integration uses for authentication.                                    |
| `provider_id`        | <Badge color="red" size="sm">Required</Badge>. Stable identifier for the provider in your system. Use this as the user identifier at registration. |
| `provider_name`      | <Badge color="red" size="sm">Required</Badge>. Display name for the provider.                                                                      |
| `provider_org_id`    | <Badge color="red" size="sm">Required</Badge>. Organization the provider belongs to.                                                               |
| `provider_specialty` | <Badge color="blue" size="sm">Optional</Badge>. Defaults to `FAMILY_MEDICINE` if omitted.                                                          |

#### Example request

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
  curl -X POST https://sdp.suki-stage.com/api/v1/auth/register \
    -H "Content-Type: application/json" \
    -d '{
      "partner_id": "your-partner-id",
      "partner_token": "your-shared-partner-token",
      "provider_id": "provider-123",
      "provider_name": "Dr. Jane Smith",
      "provider_org_id": "org-123"
    }'
  ```
</CodeGroup>

<Tip>
  For all Register fields and response codes, refer to the [Register API reference](/api-reference/authentication/register).
</Tip>
