> ## 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.

# Share One Note Across Products

> Pass emr_encounter_id on create so ambient sessions share one clinical note across modalities

**Problem:** Ambient APIs, Mobile, and Web do not share the same clinical note for a visit.

**Solution:** Pass a UUID `emr_encounter_id` on [Create ambient session](/api-reference/ambient-sessions/create). Store `ambient_session_id` and `composition_id`. In the Web SDK, use the same value as `encounter.identifier`.

<Note>
  This cookbook assumes you already have your Partner ID, authentication tokens, and the other prerequisites for Ambient APIs or the Web SDK.
</Note>

<Tabs>
  <Tab title="CURL">
    ```bash theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    curl --request POST \
      --url https://sdp.suki.ai/api/v1/ambient/session/create \
      --header 'Content-Type: application/json' \
      --header 'sdp_suki_token: <sdp_suki_token>' \
      --header 'sdp_provider_id: <sdp_provider_id>' \
      --data '{
        "emr_encounter_id": "6ec3920f-b0b1-499d-a4e9-889bf788e5ab"
      }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    import requests

    response = requests.post(
        "https://sdp.suki.ai/api/v1/ambient/session/create",
        headers={
            "Content-Type": "application/json",
            "sdp_suki_token": sdp_suki_token,
            "sdp_provider_id": sdp_provider_id,
        },
        json={
            "emr_encounter_id": "6ec3920f-b0b1-499d-a4e9-889bf788e5ab",
        },
    )
    response.raise_for_status()
    data = response.json()

    ambient_session_id = data["ambient_session_id"]
    composition_id = data["composition_id"]
    # If you omitted encounter_id on create, composition_id is also the Session Group ID.
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    const response = await fetch("https://sdp.suki.ai/api/v1/ambient/session/create", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        sdp_suki_token: sdpSukiToken,
        sdp_provider_id: sdpProviderId,
      },
      body: JSON.stringify({
        emr_encounter_id: "6ec3920f-b0b1-499d-a4e9-889bf788e5ab",
      }),
    });

    if (!response.ok) {
      throw new Error(`Create ambient session failed: ${response.status}`);
    }

    const data = await response.json();
    const ambientSessionId = data.ambient_session_id;
    const compositionId = data.composition_id;
    // If you omitted encounter_id on create, composition_id is also the Session Group ID.
    ```
  </Tab>
</Tabs>

```json theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
{
  "ambient_session_id": "<ambient_session_id>",
  "composition_id": "<composition_id>"
}
```

## Common mistakes

* Omit `emr_encounter_id` and the note is not interoperable.
* `emr_encounter_id` must be a UUID. Wait at least **1 second** between creates for the same encounter.

## Other cookbooks

<div className="cookbook-hub-wrap">
  <div className="hp-io-method-grid tut-hub-card-grid" data-cookbook-related-grid>
    <a className="hp-io-method-card tut-hub-method-card" href="/documentation/cookbooks/resolve-session-conflict">
      <div className="tut-hub-card-media tut-hub-card-media--blue" aria-hidden="true" />

      <div className="hp-io-method-card-body">
        <div className="tut-hub-card-badges">
          <span className="hp-wn-badge hp-wn-badge-new">Ambient</span>
          <span className="hp-wn-badge cookbook-hub-badge-surface cookbook-hub-badge-surface--api">API</span>
        </div>

        <h3 className="hp-io-method-card-title">Clear a Remote Session Conflict</h3>

        <p className="hp-io-method-card-desc cookbook-hub-card-desc">
          End remote session, then retry.
        </p>

        <div className="hp-io-method-card-meta tut-hub-card-foot" aria-label="5 min">
          <div className="tut-hub-card-foot-meta">
            <span className="hp-io-method-card-meta-time">5 min</span>
          </div>
        </div>
      </div>
    </a>

    <a className="hp-io-method-card tut-hub-method-card" href="/documentation/cookbooks/seed-patient-context-for-web-sdk">
      <div className="tut-hub-card-media" aria-hidden="true" />

      <div className="hp-io-method-card-body">
        <div className="tut-hub-card-badges">
          <span className="hp-wn-badge hp-wn-badge-new">Ambient</span>
          <span className="hp-wn-badge cookbook-hub-badge-surface cookbook-hub-badge-surface--api">API</span>
          <span className="hp-wn-badge cookbook-hub-badge-surface cookbook-hub-badge-surface--sdk">Web SDK</span>
        </div>

        <h3 className="hp-io-method-card-title">Seed Patient Context for the Web SDK</h3>

        <p className="hp-io-method-card-desc cookbook-hub-card-desc">
          Seed patient context for Web SDK.
        </p>

        <div className="hp-io-method-card-meta tut-hub-card-foot" aria-label="5 min">
          <div className="tut-hub-card-foot-meta">
            <span className="hp-io-method-card-meta-time">5 min</span>
          </div>
        </div>
      </div>
    </a>
  </div>
</div>
