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

# Create a new real call session

> Attributes the session to exactly one of userId or email. A known email resolves to the existing user. When the email does not match an existing user in the caller's organization, a Member user is automatically provisioned (the account requires setting a password on first login) ONLY when the organization has enabled "Automatically create new users from real-call transcripts" in its settings and the email's domain matches one of the organization's configured email domains; otherwise the upload is rejected with 422 and neither a user nor a session is created.

**Speaker-labeled SRT**: a standard SRT transcript may carry a `label: message` prefix on the first content line of each cue. A label that normalizes (trim + lowercase) to a valid email whose domain matches the organization's configured domains (or any email when no domains are configured) marks the speaker as internal (sales side); a non-matching email marks an external client whose turns are never attributed and never provisioned. Internal speakers are attributed to the matching Jam user (auto-provisioned under the same organization opt-in as the email parameter when unknown; turns stay unattributed when provisioning is disabled or impossible) and recorded as session participants. A non-email label (e.g. `Client:`) is stripped from the content without attribution, but only when its colon is followed by whitespace or ends the line (prose colons such as `10:30` or URLs are left intact).

**Rep scoring**: the userId/email parameter designates the scored rep. Scoring, KPIs and dashboards attribute exclusively to the rep; other labeled speakers are recorded as participants only (see participantUserIds on the session).



## OpenAPI

````yaml https://api.wejam.ai/docs-json post /api/v1/real-call-sessions
openapi: 3.0.0
info:
  contact: {}
  description: API description
  title: JAM
  version: 0.0.1
servers:
  - url: https://api.wejam.ai
security:
  - X-API-KEY: []
  - bearer: []
tags: []
paths:
  /api/v1/real-call-sessions:
    post:
      tags:
        - real-call-session
      summary: Create a new real call session
      description: >-
        Attributes the session to exactly one of userId or email. A known email
        resolves to the existing user. When the email does not match an existing
        user in the caller's organization, a Member user is automatically
        provisioned (the account requires setting a password on first login)
        ONLY when the organization has enabled "Automatically create new users
        from real-call transcripts" in its settings and the email's domain
        matches one of the organization's configured email domains; otherwise
        the upload is rejected with 422 and neither a user nor a session is
        created.


        **Speaker-labeled SRT**: a standard SRT transcript may carry a `label:
        message` prefix on the first content line of each cue. A label that
        normalizes (trim + lowercase) to a valid email whose domain matches the
        organization's configured domains (or any email when no domains are
        configured) marks the speaker as internal (sales side); a non-matching
        email marks an external client whose turns are never attributed and
        never provisioned. Internal speakers are attributed to the matching Jam
        user (auto-provisioned under the same organization opt-in as the email
        parameter when unknown; turns stay unattributed when provisioning is
        disabled or impossible) and recorded as session participants. A
        non-email label (e.g. `Client:`) is stripped from the content without
        attribution, but only when its colon is followed by whitespace or ends
        the line (prose colons such as `10:30` or URLs are left intact).


        **Rep scoring**: the userId/email parameter designates the scored rep.
        Scoring, KPIs and dashboards attribute exclusively to the rep; other
        labeled speakers are recorded as participants only (see
        participantUserIds on the session).
      operationId: RealCallSessionController_create_v1
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RealCallSessionCreateRequestDTO'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RealCallSessionCreateResponseDTO'
          description: ''
        '403':
          description: Organization seat limit reached — no user or session is created.
        '409':
          description: >-
            The email already exists in the identity provider but is not a
            member of this organization.
        '422':
          description: >-
            The upload is rejected and no user or session is created: the
            transcript is speaker-labeled (email-prefixed cues) but the
            attributed rep (userId/email) never speaks in it; OR the rep email
            has no Jam account while automatic user provisioning from
            transcripts is disabled for the organization; OR the rep email's
            domain does not match the organization's configured email domains;
            OR the referenced missionId or scorecardId does not exist.
        '502':
          description: >-
            The identity provider refused to provision the user - no user or
            session is created; the upload can be retried.
components:
  schemas:
    RealCallSessionCreateRequestDTO:
      properties:
        email:
          description: >-
            The learner email associated with the transcript. Designates the
            scored rep (see userId). When no user with this email exists in the
            organization, a Member user is automatically provisioned and the
            session is attributed to them.
          format: email
          pattern: >-
            ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
          type: string
        meetingName:
          description: The name of the meeting.
          minLength: 1
          type: string
        missionId:
          description: The mission ID to be used for the scorecard.
          pattern: ^[0-9a-f]{24}$
          type: string
        scorecardId:
          description: >-
            The scorecard ID to use for analysis. When omitted, the system will
            automatically classify the transcript and select the most
            appropriate scorecard.
          pattern: ^[0-9a-f]{24}$
          type: string
        transcript:
          description: >-
            The transcript text to upload. Supports plain text, SRT, and
            speaker-labeled SRT where the first content line of a cue carries a
            "label: message" prefix: email labels attribute the turn to that Jam
            user and record them as a session participant; non-email labels
            (e.g. "Client:") are stripped without attribution. The transcript is
            rejected with 422 when it is speaker-labeled but the attributed rep
            (userId/email) never speaks in it.
          maxLength: 100000
          minLength: 10
          type: string
        userId:
          description: >-
            The learner user ID associated with the transcript. Designates the
            scored rep: scoring, KPIs and dashboards attribute exclusively to
            this user; other labeled speakers become participants only.
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          type: string
      required:
        - transcript
        - meetingName
      type: object
    RealCallSessionCreateResponseDTO:
      properties:
        analysis:
          properties:
            createdAt:
              format: date-time
              type: string
            id:
              type: string
            items:
              items:
                properties:
                  behaviours:
                    default: []
                    description: Array of behaviours assessed for this item
                    items:
                      properties:
                        evidence:
                          description: Evidence supporting the behaviour assessment
                          items:
                            type: string
                          type: array
                        score:
                          description: The numerical score for this behaviour
                          type: number
                        verdict:
                          description: The verdict of the behaviour evaluation
                          type: string
                      required:
                        - evidence
                        - verdict
                        - score
                      type: object
                    type: array
                  conversationItemReferenceId:
                    description: Reference ID to the conversation item
                    nullable: true
                    type: string
                  createdAt:
                    description: The date and time when the item was created
                    format: date-time
                    type: string
                  explanation:
                    description: Explanation of the analysis result
                    nullable: true
                    type: string
                  id:
                    description: The unique identifier for the analysis item
                    type: string
                  lastUpdatedAt:
                    description: The date and time when the item was last updated
                    format: date-time
                    type: string
                  name:
                    description: The name of the analysis item
                    nullable: true
                    type: string
                  score:
                    description: The numerical score for this analysis item
                    type: number
                  solved:
                    description: The solving status of the item
                    enum:
                      - undetected
                      - notSolved
                      - partlySolved
                      - solved
                      - null
                    nullable: true
                    type: string
                  state:
                    description: The current state of the analysis item
                    enum:
                      - PROCESSING
                      - DONE
                      - ERROR
                    type: string
                  suggestion:
                    description: Suggestions for improvement
                    nullable: true
                    type: string
                required:
                  - id
                  - createdAt
                  - lastUpdatedAt
                  - state
                  - score
                type: object
              type: array
            lastUpdatedAt:
              format: date-time
              type: string
            score:
              type: number
            state:
              enum:
                - PENDING
                - PROCESSING
                - DONE
                - SKIPPED
              type: string
          required:
            - id
            - createdAt
            - lastUpdatedAt
            - state
            - items
            - score
          type: object
        call:
          properties:
            assistantReferenceId:
              description: The reference ID for the assistant
              type: string
            createdAt:
              description: The date and time when the call was created
              format: date-time
              type: string
            endedReason:
              description: The reason why the call ended
              nullable: true
              type: string
            id:
              description: The unique identifier for the call
              type: string
            lastUpdatedAt:
              description: The date and time when the call was last updated
              format: date-time
              type: string
            providerCallId:
              description: The provider call identifier
              nullable: true
              type: string
            state:
              description: The current state of the call
              enum:
                - PENDING
                - DONE
                - DATA-NOT-AVAILABLE
                - CAN-NOT-PROCESS-TRANSCRIPT
              type: string
            summary:
              description: A summary of the call
              nullable: true
              type: string
            transcript:
              description: The transcribed conversation text
              nullable: true
              type: string
          required:
            - id
            - createdAt
            - lastUpdatedAt
            - assistantReferenceId
            - state
          type: object
        completed:
          type: boolean
        createdAt:
          format: date-time
          type: string
        id:
          type: string
        kpis:
          properties:
            createdAt:
              format: date-time
              type: string
            id:
              type: string
            lastUpdatedAt:
              format: date-time
              type: string
            listenRatio:
              nullable: true
              type: number
            longestMonologue:
              nullable: true
              type: number
            state:
              enum:
                - PENDING
                - PROCESSING
                - DONE
                - SKIPPED
              type: string
            talkSpeed:
              nullable: true
              type: number
          required:
            - id
            - createdAt
            - lastUpdatedAt
            - state
          type: object
        language:
          enum:
            - en
            - de
            - fr
            - es
            - it
            - nl
            - zh-Hans
          type: string
        lastUpdatedAt:
          format: date-time
          type: string
        missionReferenceId:
          description: Reference ID for the associated mission
          nullable: true
          type: string
        missionTitle:
          nullable: true
          type: string
        participantUserIds:
          description: >-
            User IDs of all attributed speakers in the call, including the
            scored rep. Not yet resolved at creation time — read it from the
            session GET once transcript processing has finished.
          items:
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            type: string
          type: array
        playedLanguage:
          enum:
            - en
            - de
            - fr
            - es
            - it
            - nl
            - pl
            - zh
            - ja
            - id
            - tr
            - pt
            - el
            - ko
            - vi
            - hi
            - ms
            - th
            - hr
            - ro
            - bg
            - sv
            - 'no'
            - yue
            - null
          nullable: true
          type: string
        scorecardReferenceId:
          description: Reference ID for the associated scorecard
          nullable: true
          type: string
        scorecardTitle:
          description: Title of the associated scorecard
          nullable: true
          type: string
        state:
          enum:
            - PENDING
            - PROCESSING
            - DONE
          type: string
        trackId:
          description: Parent track id for mission-backed roleplay sessions
          nullable: true
          type: string
        trackTitle:
          nullable: true
          type: string
        type:
          enum:
            - REAL_CALL
          type: string
        userId:
          type: string
      required:
        - id
        - createdAt
        - lastUpdatedAt
        - userId
        - call
        - analysis
        - kpis
        - language
        - state
        - completed
        - type
      type: object
  securitySchemes:
    X-API-KEY:
      in: header
      name: X-API-KEY
      type: apiKey
    bearer:
      bearerFormat: JWT
      description: Enter your Bearer token
      scheme: bearer
      type: http

````