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

# Create Realtime Token

> Issue a subscribe-only Ably token for a submission's realtime channel.

The token grants ``subscribe`` on ``submission:{submission_id}`` only, so a
customer can receive live ``workflow_update`` status events without holding
any Ably credentials. Relay the response verbatim to the Ably client SDK
(e.g. via ``authCallback``); it expires and is re-requested from this
endpoint on refresh.

Authentication: Requires X-API-Key header with valid API key.

Raises:
    404: If submission not found or not in the authenticated workspace.
    503: If Ably is not configured for this deployment.



## OpenAPI

````yaml post /api/submissions/{submission_id}/realtime-token
openapi: 3.1.0
info:
  title: MediaMagic Verify Integrations API
  description: An API for MediaMagic Verify integrations.
  version: 1.0.0
servers:
  - url: https://api.northell.io/nhl/prod/mediamagic-verify-integrations
    description: prod
security: []
paths:
  /api/submissions/{submission_id}/realtime-token:
    post:
      tags:
        - submissions
      summary: Create Realtime Token
      description: >-
        Issue a subscribe-only Ably token for a submission's realtime channel.


        The token grants ``subscribe`` on ``submission:{submission_id}`` only,
        so a

        customer can receive live ``workflow_update`` status events without
        holding

        any Ably credentials. Relay the response verbatim to the Ably client SDK

        (e.g. via ``authCallback``); it expires and is re-requested from this

        endpoint on refresh.


        Authentication: Requires X-API-Key header with valid API key.


        Raises:
            404: If submission not found or not in the authenticated workspace.
            503: If Ably is not configured for this deployment.
      operationId: >-
        create_realtime_token_api_submissions__submission_id__realtime_token_post
      parameters:
        - name: submission_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Submission Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RealtimeTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - apiKey: []
components:
  schemas:
    RealtimeTokenResponse:
      properties:
        keyName:
          type: string
          title: Keyname
          description: Ably key name the token is signed with
        ttl:
          type: integer
          title: Ttl
          description: Token lifetime in milliseconds
        capability:
          type: string
          title: Capability
          description: 'Granted capability (JSON): subscribe on the submission channel'
        clientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Clientid
          description: Client identity stamped on the token
        timestamp:
          type: integer
          title: Timestamp
          description: Signing timestamp (ms since epoch)
        nonce:
          type: string
          title: Nonce
          description: Unique nonce for the signed token request
        mac:
          type: string
          title: Mac
          description: HMAC signature of the token request
      type: object
      required:
        - keyName
        - ttl
        - capability
        - timestamp
        - nonce
        - mac
      title: RealtimeTokenResponse
      description: >-
        Ably token request granting subscribe-only access to a submission
        channel.


        Relay this object verbatim to the Ably client SDK (e.g. via
        ``authCallback``)

        to authenticate a subscription to the submission's realtime channel.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Workspace-scoped API key. Format: sk_live_{64 hex chars}'
      x-default: sk_live_your_api_key_here

````