Skip to main content
This quickstart walks you through one successful standalone E/M Coding workflow: authenticate, submit note sections, poll status, and retrieve generated codes. Your application owns when coding runs, how you map codes into RCM or EHR handoff, and whether you poll or use the webhook. What you will do
  1. Authenticate to get an sdp_suki_token (and register the user if needed).
  2. Start a standalone E/M coding session with note sections.
  3. Poll status until completed or failed.
  4. Retrieve the generated E/M codes.
Prefer one paste-ready file? Use the Complete script in the preferred language below, then follow the numbered steps for the same flow with full explanations.
Using an AI coding tool?Copy the prompt below to point your agent at the E/M Coding API skill and Documentation MCP. For every task skill, refer to AI coding tools.

Fetch the E/M Coding API skill and connect the documentation MCP.

Open in Cursor

Access and credentials

You need partner credentials to use the Suki E/M Coding APIs. Contact our Partnership team to get your credentials. They will guide you through the Onboarding process, confirm that E/M Coding is enabled for your organization, and provide what you need to get started.

Prerequisites

To use the Suki E/M Coding APIs, you must have the following:
  • Partner credentials for Suki authentication endpoints (partner_id and partner_token).
  • Ability to call Login (and Register when needed) to obtain an sdp_suki_token.
  • Note section text (LOINC + content) for at least one section.
  • Optional but recommended for better codes: patient type, date of service, diagnoses, insurance, provider NPI, and total time minutes when billing by time.
  • A publicly accessible endpoint (or Okta authorization server) for token validation.

Environments to use for development and testing

Examples use https://sdp.suki.ai for API calls (production).
Important:
  • The production environment is https://sdp.suki.ai.
  • The staging environment is https://sdp.suki-stage.com.
  • Your partnership team will confirm which environment, base URL, and credentials apply for your integration.

Complete script

Replace the credential placeholders, then run. For detailed explanations of each step, refer to the numbered steps below.
  • Python: pip install requests then python em_coding.py.
  • TypeScript (Node): npx tsx em_coding.ts (Node 18+).

Create your first E/M coding session

1

Authenticate to Get a Suki Token

To begin, you must authenticate to get your access token. Send a POST request to the Login API endpoint with the following parameters in the request body:
  • partner_id: Your unique , which we provide to you securely offline.
  • partner_token: The user’s OAuth 2.0 ID token () from your identity provider.
  • provider_id (Optional): Unique identifier for the . Required for Bearer type partners only.
On a successful request, the API returns a (suki_token) that you must include as the sdp_suki_token header for all subsequent API calls.
Handling an unregistered user:
  • If the user is not yet registered in our system, the /login request will fail.
  • In this case, you must first call the Register API endpoint to create the user, then call /login again.
  • You only need to call the register endpoint once for each new user.
Save the suki_token from the response. This token is valid for 1 hour. When it is about to expire, you can get a new one by making the same POST request to /login with a valid partner_token.
2

Start Standalone E/M Coding

Call the Generate E/M codes endpoint with note sections (required) and optional patient, provider, encounter, and diagnoses context.
  • sections (required): At least one LOINC section with content.type set to TEXT and non-empty content.text.
  • patient, provider, encounter, diagnoses (optional): Improve code selection when you have them. Include patient_type, date_of_service, and total_time_minutes when billing by time.
Suki returns an E/M coding session_id. Generation is asynchronous.
The session_id returned here is an E/M coding session ID. It is not an ambient session ID. Use it only with the E/M status and retrieve endpoints.
3

Poll E/M Coding Status

Poll Get E/M coding status until the session reaches a terminal state (completed or failed).If webhooks are enabled for your partner account, you can wait for the standalone E/M notification instead of polling only. On success, additional_info.session_type is EM_CODES. Failure notifications have no additional_info, so match their session_id against the session IDs you saved. See E/M Coding asynchronous notifications and E/M Coding webhook events.
4

Retrieve Generated E/M Codes

When status is completed, call Get E/M codes and map em_codes.values into your RCM or EHR handoff.
For complete technical specifications, refer to the relevant API Reference pages.

Verify your integration

Before you design the full production workflow, confirm that your integration can complete this minimum path:
  • Authenticate successfully and use the returned sdp_suki_token in follow-up requests.
  • Start a standalone E/M coding session with at least one note section.
  • Poll status until the session completes.
  • Retrieve generated E/M codes from GET /api/v1/em-codes/{session_id}.
After this path works end to end, add richer clinical context, webhook handling, E/M Coding with Ambient when needed, and production error handling.

Next steps

E/M Coding overview - Capability framing, ambient vs standalone, and use cases. Add E/M codes to an ambient visit - Opt in on create session and retrieve ambient E/M codes. E/M Coding webhook payload - Success and failure payload fields for standalone E/M Coding. E/M Coding error messages - Validation and session errors for the standalone APIs.
Last modified on November 5, 2026