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

# Get E/M Coding Status

> Poll the status of a standalone E/M coding session

Use this endpoint to poll the status of a standalone E/M coding session created with [Generate E/M codes](https://developer.suki.ai/em-coding-api-reference/em-coding-sessions/generate.md).

## Status values

| Status | Meaning |
| :- | :- |
| `created` | Session accepted and not finished processing. |
| `running` | Coding is in progress. |
| `completed` | Codes are ready. Call [Get E/M codes](https://developer.suki.ai/em-coding-api-reference/em-coding-sessions/get.md). |
| `failed` | Coding failed. Do not expect codes on the retrieve endpoint. |

Stop polling when status is `completed` or `failed`.

## Code examples

**Language tabs (agents):** Equivalent code samples are available in: Python, TypeScript. Humans see one language at a time. Use the variant that matches the user's stack; behavior is the same across tabs.

> [tab] Python
>
> ```python theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> import requests
>
> session_id = "<em_coding_session_id>"
> url = f"https://sdp.suki.ai/api/v1/em-codes/{session_id}/status"
>
> headers = {
>     "sdp_suki_token": "<sdp_suki_token>",
>     "sdp_provider_id": "<sdp_provider_id>",
> }
>
> response = requests.get(url, headers=headers)
> print(response.status_code)
> print(response.json())
> ```

> [tab] TypeScript
>
> ```typescript theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> const sessionId = "<em_coding_session_id>";
> const url = `https://sdp.suki.ai/api/v1/em-codes/${sessionId}/status`;
>
> const response = await fetch(url, {
>   headers: {
>     sdp_suki_token: "<sdp_suki_token>",
>     sdp_provider_id: "<sdp_provider_id>",
>   },
> });
> console.log(response.status, await response.json());
> ```


## OpenAPI

````yaml GET /api/v1/em-codes/{session_id}/status
openapi: 3.0.1
info:
  title: Suki Developer Platform
  description: >-
    REST and WebSocket APIs for the Suki Developer Platform. Authenticate with
    Login or Register to obtain a Suki access token, then integrate ambient
    clinical documentation, form filling, transcription, content rewrite, and
    reference metadata endpoints.
  contact: {}
  version: '1.0'
servers:
  - url: https://sdp.suki.ai
    description: >-
      Production base URL for Suki Developer Platform REST APIs. WebSocket
      endpoints use the same host with `wss://`.
security:
  - SukiTokenAuth: []
paths:
  /api/v1/em-codes/{session_id}/status:
    get:
      tags:
        - /api/v1/em-codes
      summary: Gets the status of a standalone E/M coding session.
      description: >-
        Gets the status of a standalone E/M coding session created via POST
        /api/v1/em-codes.
      parameters:
        - name: session_id
          in: path
          required: true
          description: >-
            E/M coding session ID returned from Generate E/M Codes (`POST
            /api/v1/em-codes`). This is not an ambient session ID.
          schema:
            type: string
        - $ref: '#/components/parameters/ProviderIdHeader'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.GetEMCodesStatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.BadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.AuthenticationError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.NotFoundError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.InternalServerError'
      security:
        - SukiTokenAuth: []
components:
  parameters:
    ProviderIdHeader:
      name: sdp_provider_id
      in: header
      description: >-
        **Optional** for standard partners.


        **Required** for:


        - **Bearer authentication.** Use the same `provider_id` returned by the
        Login or Register API.

        - **Single Auth Token authentication.** Include the same `provider_id`
        on every request as `sdp_provider_id`.
      required: false
      schema:
        type: string
        example: provider-123
  schemas:
    controllers.GetEMCodesStatusResponse:
      type: object
      properties:
        status:
          description: E/M coding session status.
          type: string
          enum:
            - created
            - running
            - completed
            - failed
          example: completed
    controllers.BadRequestError:
      description: Bad Request Response
      type: object
      properties:
        code:
          type: integer
          example: 400
        message:
          type: string
          example: invalid request
    controllers.AuthenticationError:
      description: Authentication Failure Response
      type: object
      properties:
        code:
          type: integer
          example: 401
        message:
          type: string
          example: invalid token
    controllers.NotFoundError:
      description: Not Found Response
      type: object
      properties:
        code:
          type: integer
          example: 404
        message:
          type: string
          example: not found
    controllers.InternalServerError:
      description: Internal Server Error Response
      type: object
      properties:
        code:
          type: integer
          example: 500
        message:
          type: string
          example: internal server error
  securitySchemes:
    SukiTokenAuth:
      type: apiKey
      in: header
      name: sdp_suki_token
      description: >-
        Suki access token (`suki_token`) from Login or Register. Expires after
        one hour.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.