openapi: 3.1.0
info:
  title: Momentum API
  description: API for managing meetings with attendee and transcript details, and retrieving AI signal executions.
  version: 2.0.0
servers:
  - url: https://api.momentum.io
tags:
  - name: Meetings
    description: Endpoints for retrieving and managing meetings.
  - name: Users
    description: Endpoints for retrieving organization users.
  - name: Signals V1
    description: AI signal prompts and executions (v1).
  - name: Signals V2
    description: AI signal definitions and executions (v2).
paths:
  /v1/meetings:
    get:
      summary: Retrieve a list of meetings
      tags:
        - Meetings
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |
            curl --request GET \
              --url 'https://api.momentum.io/v1/meetings?from=2025-01-01T00:00:00Z&to=2025-01-31T23:59:59Z&pageNumber=1&pageSize=10&includeDownloadUrl=true&sourceTypes=MOMENTUM,GONG' \
              --header 'X-API-Key: YOUR_API_KEY'
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch(
              "https://api.momentum.io/v1/meetings?from=2025-01-01T00:00:00Z&to=2025-01-31T23:59:59Z&pageNumber=1&pageSize=10&includeDownloadUrl=true&sourceTypes=MOMENTUM,GONG",
              {
                headers: { "X-API-Key": "YOUR_API_KEY" },
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.momentum.io/v1/meetings",
                headers={"X-API-Key": "YOUR_API_KEY"},
                params={
                    "from": "2025-01-01T00:00:00Z",
                    "to": "2025-01-31T23:59:59Z",
                    "pageNumber": 1,
                    "pageSize": 10,
                    "includeDownloadUrl": "true",
                    "sourceTypes": "MOMENTUM,GONG",
                },
            )
            data = response.json()
        - lang: go
          label: Go
          source: |
            req, _ := http.NewRequest("GET",
              "https://api.momentum.io/v1/meetings?from=2025-01-01T00:00:00Z&to=2025-01-31T23:59:59Z&pageNumber=1&pageSize=10&includeDownloadUrl=true&sourceTypes=MOMENTUM,GONG",
              nil)
            req.Header.Set("X-API-Key", "YOUR_API_KEY")
            resp, _ := http.DefaultClient.Do(req)
            defer resp.Body.Close()
            body, _ := io.ReadAll(resp.Body)
      parameters:
        - name: from
          in: query
          description: Filter meetings starting from this date-time (ISO 8601 format) inclusively. Required.
          required: true
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          description: Filter meetings ending before this date-time (ISO 8601 format) inclusively.
          required: false
          schema:
            type: string
            format: date-time
        - name: pageNumber
          in: query
          description: The page number to retrieve (1-based indexing). Defaults to 1 if not specified.
          required: false
          schema:
            type: number
            format: int32
            minimum: 1
            default: 1
        - name: pageSize
          in: query
          description: The maximum number of meetings to return per page. Must be between 1 and 50. Defaults to 10 if not specified.
          required: false
          schema:
            type: number
            format: int32
            minimum: 1
            maximum: 50
            default: 10
        - name: salesforceAccountId
          in: query
          description: Filter meetings associated with a specific Salesforce account. Optional, must be 18 characters in length. Cannot be used with salesforceOpportunityId.
          required: false
          schema:
            type: string
            minLength: 18
            maxLength: 18
        - name: salesforceOpportunityId
          in: query
          description: Filter meetings associated with a specific Salesforce opportunity. Optional, must be 18 characters in length. Cannot be used with salesforceAccountId.
          required: false
          schema:
            type: string
            minLength: 18
            maxLength: 18
        - name: attendeeEmailAddresses
          in: query
          description: Filter meetings that include all of the provided attendee email addresses.
          required: false
          schema:
            type: array
            items:
              type: string
              format: email
          style: form
          explode: false
        - name: sourceTypes
          in: query
          description: |
            Filter meetings by source type(s). Provide a comma-separated list of source types.
            Valid values: AIRCALL, ATTENTION, CHORUS, CLOUDTALK, DIALPAD, GONG, MINDTICKLE, MOMENTUM, MS_TEAMS, ORUM, OUTREACH, RINGCENTRAL, SALESLOFT, SALESLOFT_CI, USER_PROVIDED, VONAGE, WEBEX, WINGMAN, WISER, ZOOM, ZOOM_PHONE
          required: false
          schema:
            type: string
        - name: includeDownloadUrl
          in: query
          description: >
            When set to true, includes a temporary pre-signed download URL (valid for 2 hours) for each meeting
            that has a recording available. Defaults to false.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: A list of meetings.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meetings:
                    type: array
                    items:
                      $ref: "#/components/schemas/Meeting"
                  pageCount:
                    type: number
                    format: int32
                    description: Total number of pages available for the current query.
                required:
                  - meetings
  /v1/users:
    get:
      summary: Retrieve a list of users
      description: Returns a paginated list of users in your organization with their profile, license, and integration status.
      tags:
        - Users
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |
            curl --request GET \
              --url 'https://api.momentum.io/v1/users?pageSize=50&licenseAdded=true' \
              --header 'X-API-Key: YOUR_API_KEY'
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch(
              "https://api.momentum.io/v1/users?pageSize=50&licenseAdded=true",
              {
                headers: { "X-API-Key": "YOUR_API_KEY" },
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.momentum.io/v1/users",
                headers={"X-API-Key": "YOUR_API_KEY"},
                params={
                    "pageSize": 50,
                    "licenseAdded": "true",
                },
            )
            data = response.json()
      parameters:
        - name: pageNumber
          in: query
          description: The page number to retrieve (1-based indexing). Defaults to 1 if not specified.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 1
        - name: pageSize
          in: query
          description: The maximum number of users to return per page. Must be between 1 and 50. Defaults to 10 if not specified.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 50
            default: 10
        - name: licenseAdded
          in: query
          description: Filter users by license status. Use 'true' for licensed users, 'false' for unlicensed users.
          required: false
          schema:
            type: boolean
        - name: role
          in: query
          description: Filter users by role.
          required: false
          schema:
            type: string
            enum: [VIEWER, EDITOR, ORGANIZATION_ADMIN, USER_ADMIN, USER]
      responses:
        "200":
          description: A paginated list of users.
          content:
            application/json:
              schema:
                type: object
                properties:
                  users:
                    type: array
                    items:
                      $ref: "#/components/schemas/User"
                  pageCount:
                    type: integer
                    format: int32
                    description: Total number of pages available for the current query.
                required:
                  - users
                  - pageCount
        "400":
          description: Bad request due to validation errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - error
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: "Internal server error"
                required:
                  - error
  /v1/meeting/remap:
    post:
      summary: Remap a meeting with new salesforce objects
      description: Associates a meeting with new salesforce objects and optionally triggers call summary and generates AI signals.
      tags:
        - Meetings
      parameters:
        - name: triggerSummary
          in: query
          description: Whether to trigger call summary after remapping
          required: false
          schema:
            type: boolean
            default: false
        - name: triggerAiSignals
          in: query
          description: Whether to trigger AI signals after remapping
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MeetingRemapRequest"
      responses:
        "200":
          description: Meeting successfully remapped
          content:
            application/json:
              schema:
                type: object
                properties:
                  accepted:
                    type: boolean
                    example: true
                  requestId:
                    type: string
                    description: ID of the request for tracking purposes
                required:
                  - accepted
                  - requestId
        "400":
          description: Bad request due to validation errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message describing the validation failure
                  requestId:
                    type: string
                    description: ID of the request for tracking purposes
                required:
                  - error
                  - requestId
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: "Internal server error"
                  requestId:
                    type: string
                    description: ID of the request for tracking purposes
                required:
                  - error
                  - requestId
  /v1/user-provided-meeting:
    servers:
      - url: https://receiver.momentum.io/
    post:
      summary: Ingest a meeting from any source
      description: Ingests a meeting and optional transcript from any source into the Momentum system.
      tags:
        - Meetings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UserProvidedMeetingBody"
      responses:
        "200":
          description: Meeting successfully created.
        "400":
          description: Bad request.
        "401":
          description: Unauthorized.
        "413":
          description: Payload too large. The body size should not exceed 5 MB.
        "422":
          description: Unprocessable entity due to semantic errors, such as invalid transcript format or inconsistent meeting details.
        "500":
          description: Internal server error.
  /v1/signals/prompts:
    get:
      summary: List all AI signal prompts
      description: Retrieves a list of all AI signal prompts configured for the organization, including their enabled status and context source type.
      tags:
        - Signals V1
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |
            curl --request GET \
              --url 'https://api.momentum.io/v1/signals/prompts' \
              --header 'X-API-Key: YOUR_API_KEY'
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch(
              "https://api.momentum.io/v1/signals/prompts",
              {
                headers: { "X-API-Key": "YOUR_API_KEY" },
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.momentum.io/v1/signals/prompts",
                headers={"X-API-Key": "YOUR_API_KEY"},
            )
            data = response.json()
        - lang: go
          label: Go
          source: |
            req, _ := http.NewRequest("GET",
              "https://api.momentum.io/v1/signals/prompts", nil)
            req.Header.Set("X-API-Key", "YOUR_API_KEY")
            resp, _ := http.DefaultClient.Do(req)
            defer resp.Body.Close()
            body, _ := io.ReadAll(resp.Body)
      responses:
        "200":
          description: A list of signal prompts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  signals:
                    type: array
                    items:
                      $ref: "#/components/schemas/SignalPrompt"
                required:
                  - signals
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: "Internal server error"
                required:
                  - error
  /v1/signals/{promptId}/executions:
    get:
      summary: Retrieve signal executions
      description: Retrieves a paginated list of signal executions (triggered signals) for a specific prompt within a given time range.
      tags:
        - Signals V1
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |
            curl --request GET \
              --url 'https://api.momentum.io/v1/signals/42/executions?executionFrom=2025-01-01T00:00:00Z&executionTo=2025-01-31T23:59:59Z&pageNumber=1&pageSize=10&includeCustomInstructions=true' \
              --header 'X-API-Key: YOUR_API_KEY'
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch(
              "https://api.momentum.io/v1/signals/42/executions?executionFrom=2025-01-01T00:00:00Z&executionTo=2025-01-31T23:59:59Z&pageNumber=1&pageSize=10&includeCustomInstructions=true",
              {
                headers: { "X-API-Key": "YOUR_API_KEY" },
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.momentum.io/v1/signals/42/executions",
                headers={"X-API-Key": "YOUR_API_KEY"},
                params={
                    "executionFrom": "2025-01-01T00:00:00Z",
                    "executionTo": "2025-01-31T23:59:59Z",
                    "pageNumber": 1,
                    "pageSize": 10,
                    "includeCustomInstructions": "true",
                },
            )
            data = response.json()
        - lang: go
          label: Go
          source: |
            req, _ := http.NewRequest("GET",
              "https://api.momentum.io/v1/signals/42/executions?executionFrom=2025-01-01T00:00:00Z&executionTo=2025-01-31T23:59:59Z&pageNumber=1&pageSize=10&includeCustomInstructions=true",
              nil)
            req.Header.Set("X-API-Key", "YOUR_API_KEY")
            resp, _ := http.DefaultClient.Do(req)
            defer resp.Body.Close()
            body, _ := io.ReadAll(resp.Body)
      parameters:
        - name: promptId
          in: path
          description: The ID of the signal prompt to retrieve executions for.
          required: true
          schema:
            type: integer
            minimum: 1
        - name: executionFrom
          in: query
          description: Filter executions starting from this date-time (ISO 8601 format). Required.
          required: true
          schema:
            type: string
            format: date-time
        - name: executionTo
          in: query
          description: Filter executions up to this date-time (ISO 8601 format). Defaults to current time if not specified.
          required: false
          schema:
            type: string
            format: date-time
        - name: pageNumber
          in: query
          description: The page number to retrieve (1-based indexing). Defaults to 1 if not specified.
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: pageSize
          in: query
          description: The maximum number of executions to return per page. Must be between 1 and 50. Defaults to 10 if not specified.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 10
        - name: includeCustomInstructions
          in: query
          description: Whether to include custom instruction outputs (follow-up prompts) in the response. Defaults to false.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: A paginated list of signal executions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  signals:
                    type: array
                    items:
                      $ref: "#/components/schemas/SignalExecution"
                  pageCount:
                    type: integer
                    description: Total number of pages available for the current query.
                required:
                  - signals
                  - pageCount

        "400":
          description: Bad request due to validation errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - error
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: "Internal server error"
                required:
                  - error

  # V2 Endpoints
  /v2/signals:
    get:
      summary: List all signal v2 definitions
      description: Retrieves a list of all signal v2 definitions configured for the organization, including their enabled status and context source type.
      tags:
        - Signals V2
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |
            curl --request GET \
              --url 'https://api.momentum.io/v2/signals' \
              --header 'X-API-Key: YOUR_API_KEY'
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch(
              "https://api.momentum.io/v2/signals",
              {
                headers: { "X-API-Key": "YOUR_API_KEY" },
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.momentum.io/v2/signals",
                headers={"X-API-Key": "YOUR_API_KEY"},
            )
            data = response.json()
        - lang: go
          label: Go
          source: |
            req, _ := http.NewRequest("GET",
              "https://api.momentum.io/v2/signals", nil)
            req.Header.Set("X-API-Key", "YOUR_API_KEY")
            resp, _ := http.DefaultClient.Do(req)
            defer resp.Body.Close()
            body, _ := io.ReadAll(resp.Body)
      responses:
        "200":
          description: A list of signal definitions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  signals:
                    type: array
                    items:
                      $ref: "#/components/schemas/SignalDefinition"
                required:
                  - signals
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: "Internal server error"
                required:
                  - error
  /v2/signals/{definitionId}/executions:
    get:
      summary: Retrieve signal v2 executions
      description: Retrieves a paginated list of signal executions (triggered signals) for a specific signal definition within a given time range.
      tags:
        - Signals V2
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |
            curl --request GET \
              --url 'https://api.momentum.io/v2/signals/42/executions?executionFrom=2026-01-01T00:00:00Z&executionTo=2026-03-31T23:59:59Z&pageNumber=1&pageSize=10&includeFollowUpPrompts=true' \
              --header 'X-API-Key: YOUR_API_KEY'
        - lang: javascript
          label: JavaScript
          source: |
            const response = await fetch(
              "https://api.momentum.io/v2/signals/42/executions?executionFrom=2026-01-01T00:00:00Z&executionTo=2026-03-31T23:59:59Z&pageNumber=1&pageSize=10&includeFollowUpPrompts=true",
              {
                headers: { "X-API-Key": "YOUR_API_KEY" },
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.momentum.io/v2/signals/42/executions",
                headers={"X-API-Key": "YOUR_API_KEY"},
                params={
                    "executionFrom": "2026-01-01T00:00:00Z",
                    "executionTo": "2026-03-31T23:59:59Z",
                    "pageNumber": 1,
                    "pageSize": 10,
                    "includeFollowUpPrompts": "true",
                },
            )
            data = response.json()
        - lang: go
          label: Go
          source: |
            req, _ := http.NewRequest("GET",
              "https://api.momentum.io/v2/signals/42/executions?executionFrom=2026-01-01T00:00:00Z&executionTo=2026-03-31T23:59:59Z&pageNumber=1&pageSize=10&includeFollowUpPrompts=true",
              nil)
            req.Header.Set("X-API-Key", "YOUR_API_KEY")
            resp, _ := http.DefaultClient.Do(req)
            defer resp.Body.Close()
            body, _ := io.ReadAll(resp.Body)
      parameters:
        - name: definitionId
          in: path
          description: The ID of the signal definition to retrieve executions for.
          required: true
          schema:
            type: integer
            minimum: 1
        - name: executionFrom
          in: query
          description: Filter executions starting from this date-time (ISO 8601 format). Required.
          required: true
          schema:
            type: string
            format: date-time
        - name: executionTo
          in: query
          description: Filter executions up to this date-time (ISO 8601 format). Defaults to current time if not specified.
          required: false
          schema:
            type: string
            format: date-time
        - name: pageNumber
          in: query
          description: The page number to retrieve (1-based indexing). Defaults to 1 if not specified.
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: pageSize
          in: query
          description: The maximum number of executions to return per page. Must be between 1 and 50. Defaults to 10 if not specified.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 10
        - name: includeFollowUpPrompts
          in: query
          description: Whether to include follow-up prompt outputs in the response. Defaults to false.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        "200":
          description: A paginated list of signal executions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  signals:
                    type: array
                    items:
                      $ref: "#/components/schemas/SignalV2Execution"
                  pageCount:
                    type: integer
                    description: Total number of pages available for the current query.
                required:
                  - signals
                  - pageCount
        "400":
          description: Bad request due to validation errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - error
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: "Internal server error"
                required:
                  - error

components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authenticating requests
  schemas:
    # V1 Schemas
    MeetingAttendee:
      type: object
      additionalProperties: false
      properties:
        email:
          description: >
            Email address of the attendee.
          type: string
          format: email
        isInternal:
          description: >
            Indicates if the attendee is internal to the organization.
          type: boolean
        name:
          description: >
            Name of the attendee.
          type: string
    Meeting:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        host:
          type: object
          properties:
            email:
              type: string
            name:
              type: string
        attendees:
          type: array
          items:
            $ref: "#/components/schemas/Attendee"
        transcript:
          type: object
          properties:
            entries:
              type: array
              items:
                $ref: "#/components/schemas/TranscriptEntry"
        salesforceAccountId:
          type: string
        salesforceLeadId:
          type: string
        salesforceOpportunityId:
          type: string
        downloadUrl:
          type: string
          format: uri
          description: >
            Pre-signed URL to download the meeting recording. Valid for 2 hours from the time of the API request.
            Only present when includeDownloadUrl=true and the meeting has a recording available.
        downloadUrlExpiresAt:
          type: string
          format: date-time
          description: >
            Expiration time of the download URL in ISO 8601 format (UTC).
            Only present when includeDownloadUrl=true and downloadUrl is generated.
    Attendee:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        isInternal:
          type: boolean
        salesforceCaseId:
          type: string
        salesforceLeadId:
          type: string
      required:
        - name
        - email
        - isInternal
    TranscriptEntry:
      type: object
      properties:
        speaker:
          type: object
          properties:
            name:
              type: string
            attendeeId:
              type: string
          required:
            - name
        timestamp:
          type: string
        timestampSeconds:
          type: number
          format: int32
        text:
          type: string
      required:
        - text
    UserProvidedTranscriptSegment:
      type: object
      additionalProperties: false
      properties:
        speaker:
          type: object
          properties:
            name:
              type: string
        text:
          type: string
        timestampSeconds:
          type: number
          format: float
      required:
        - text
        - timestampSeconds
    UserProvidedTranscript:
      type: object
      additionalProperties: false
      properties:
        segments:
          type: array
          items:
            $ref: "#/components/schemas/UserProvidedTranscriptSegment"
      required:
        - segments
    UserProvidedMeeting:
      type: object
      additionalProperties: false
      properties:
        id:
          description: >
            Optional external meeting ID from the source system.
          type: string
        title:
          description: >
            Title of the meeting.
          type: string
        callUrl:
          description: >
            URL to join the meeting.
          type: string
          format: uri
        recordingUrl:
          description: >
            URL to the meeting recording.
          type: string
          format: uri
        startTime:
          description: >
            Start time of the meeting.
          type: string
          format: date-time
        endTime:
          description: >
            End time of the meeting.
          type: string
          format: date-time
        host:
          description: >
            Host of the meeting.
          type: object
          properties:
            name:
              description: >
                Name of the host.
              type: string
            email:
              description: >
                Email of the host.
              type: string
              format: email
          required:
            - name
            - email
        attendees:
          description: >
            List of attendees for the meeting.
          type: array
          items:
            $ref: "#/components/schemas/MeetingAttendee"
        salesforceAccountId:
          description: >
            Salesforce Account ID
          type: string
        salesforceOpportunityId:
          description: >
            Salesforce Opportunity ID
          type: string
        transcript:
          description: >
            Optional transcript for the meeting. If provided, it should follow the specified format.
          $ref: "#/components/schemas/UserProvidedTranscript"
      required:
        - endTime
        - host
        - startTime
        - title
    UserProvidedMeetingBody:
      type: object
      additionalProperties: false
      properties:
        meeting:
          $ref: "#/components/schemas/UserProvidedMeeting"
        processImportedMeeting:
          description: >
            Whether to process the imported meeting.
          type: boolean
      required:
        - meeting
        - processImportedMeeting
    User:
      type: object
      properties:
        email:
          type: string
          format: email
          description: User's email address
        name:
          type: string
          description: User's full name
        role:
          type: string
          description: "User's role in the organization. Note: the role filter query parameter accepts uppercase values (e.g. VIEWER), but the response returns the stored lowercase form."
          enum: [viewer, editor, organization-admin, user-admin, user]
        type:
          type: string
          description: User type
        slackUserId:
          type: string
          nullable: true
          description: User's Slack user ID, if connected
        title:
          type: string
          nullable: true
          description: User's job title from Slack profile
        salesforceDepartment:
          type: string
          nullable: true
          description: User's department from Salesforce
        salesforceUserRole:
          type: string
          nullable: true
          description: User's role name from Salesforce
        licenseAdded:
          type: boolean
          description: Whether the user has an active AI license
        licenseAssignedAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the license was assigned
        salesforceAuthStatus:
          type: string
          description: Salesforce authentication status
          enum: [AUTHENTICATED, NOT_AUTHENTICATED]
        gcalAuthStatus:
          type: string
          description: Google Calendar authentication status
          enum: [AUTHENTICATED, NOT_AUTHENTICATED]
      required:
        - email
        - name
        - role
        - type
        - licenseAdded
        - salesforceAuthStatus
        - gcalAuthStatus
    MeetingRemapRequest:
      type: object
      description: >
        Request body for remapping a meeting.
        Either `source` or `meetingDetails` must be provided:
        Use `source` when remapping a meeting based on an external system (e.g., Google Calendar, Zoom, Gong, etc.), providing the source identifier and type.
        Use `meetingDetails` when remapping a meeting using explicit meeting information (such as title, start time and host) instead of referencing an external source.
        Choose the option that best matches the available data for the meeting you wish to remap.
      properties:
        source:
          type: object
          description: Source information for the meeting
          properties:
            id:
              type: string
              description: Source identifier for the meeting
            type:
              type: string
              description: Type of meeting source
              enum: [ GOOGLE_CALENDAR, ZOOM, RECALL, GONG, CHORUS, WINGMAN, WISER, SALESLOFT ]
          required:
            - id
            - type
        meetingDetails:
          type: object
          description: Details about the meeting. If momentumMeetingId is provided, other fields are not needed.
          properties:
            title:
              type: string
              description: Title of the meeting
            startTime:
              type: string
              format: date-time
              description: Start time of the meeting in ISO 8601 format
            hostEmail:
              type: string
              format: email
              description: Email of the meeting host
            momentumMeetingId:
              type: integer
              description: Internal Momentum meeting ID
          oneOf:
            - required: [ momentumMeetingId ]
              not:
                anyOf:
                  - required: [ title ]
                  - required: [ startTime ]
                  - required: [ hostEmail ]
            - required: [ title, startTime, hostEmail ]
              not:
                required: [ momentumMeetingId ]
        salesforceRecords:
          type: object
          description: Associated Salesforce record IDs. At least one record ID must be provided.
          properties:
            opportunityId:
              type: string
              description: Salesforce opportunity ID
            accountId:
              type: string
              description: Salesforce account ID
            leadId:
              type: string
              description: Salesforce lead ID
          anyOf:
            - required: [ opportunityId ]
            - required: [ accountId ]
            - required: [ leadId ]
      required:
        - salesforceRecords
      oneOf:
        - required: [ source ]
        - required: [ meetingDetails ]
    SignalPrompt:
      type: object
      description: An AI signal prompt configured for the organization.
      properties:
        id:
          type: integer
          description: Unique identifier for the signal prompt.
        signalName:
          type: string
          description: Display name of the signal.
        contextSource:
          type: string
          description: The source type that triggers this signal (call transcript or email body).
        enabled:
          type: boolean
          description: Whether the signal is currently enabled.
        createdAt:
          type: string
          format: date-time
          description: The date and time when the signal prompt was created (ISO 8601 format).
      required:
        - id
        - signalName
        - contextSource
        - enabled
        - createdAt
    SignalExecution:
      description: An execution of a signal prompt, triggered by either a meeting or an email.
      oneOf:
        - $ref: "#/components/schemas/SignalExecutionMeeting"
        - $ref: "#/components/schemas/SignalExecutionEmail"
      discriminator:
        propertyName: sourceType
        mapping:
          meeting: "#/components/schemas/SignalExecutionMeeting"
          email: "#/components/schemas/SignalExecutionEmail"
    SignalExecutionBase:
      type: object
      description: Common fields for all signal executions.
      properties:
        signalId:
          type: integer
          description: The ID of the signal prompt that was triggered.
        signalName:
          type: string
          description: The name of the signal that was triggered.
        triggeredAt:
          type: string
          format: date-time
          description: When the signal was triggered.
        sourceId:
          type: string
          description: The ID of the source (meeting ID or email message ID).
        sourceTitle:
          type: string
          nullable: true
          description: The title of the meeting or subject of the email.
        prompt:
          type: string
          description: The prompt text that was used for the signal.
        reason:
          type: string
          nullable: true
          description: The AI-generated reason explaining why the signal was triggered.
        salesforceAccountId:
          type: string
          nullable: true
          description: Associated Salesforce Account ID, if any.
        salesforceAccountName:
          type: string
          nullable: true
          description: Associated Salesforce Account name, if any.
        salesforceOpportunityId:
          type: string
          nullable: true
          description: Associated Salesforce Opportunity ID, if any.
        salesforceOpportunityName:
          type: string
          nullable: true
          description: Associated Salesforce Opportunity name, if any.
        salesforceLeadId:
          type: string
          nullable: true
          description: Associated Salesforce Lead ID, if any.
        salesforceLeadName:
          type: string
          nullable: true
          description: Associated Salesforce Lead name, if any.
        customInstructions:
          type: array
          nullable: true
          description: Custom instruction outputs from follow-up prompts. Only included when includeCustomInstructions=true.
          items:
            $ref: "#/components/schemas/SignalCustomInstruction"
      required:
        - signalId
        - signalName
        - triggeredAt
        - sourceId
        - sourceTitle
        - prompt
        - reason
        - salesforceAccountId
        - salesforceAccountName
        - salesforceOpportunityId
        - salesforceOpportunityName
        - salesforceLeadId
        - salesforceLeadName
    SignalExecutionMeeting:
      description: fields for signal triggered by meeting/call.
      allOf:
        - $ref: "#/components/schemas/SignalExecutionBase"
        - type: object
          properties:
            sourceType:
              type: string
              description: Indicates this signal was triggered by a meeting.
            hostEmail:
              type: string
              nullable: true
              description: Email of the meeting host.
            attendeeEmails:
              type: array
              items:
                type: string
                format: email
              description: List of attendee emails.
          required:
            - sourceType
            - hostEmail
            - attendeeEmails
    SignalExecutionEmail:
      description: fields for signal triggered by email.
      allOf:
        - $ref: "#/components/schemas/SignalExecutionBase"
        - type: object
          properties:
            sourceType:
              type: string
              description: Indicates this signal was triggered by an email.
            emailFrom:
              type: string
              nullable: true
              description: Sender email address.
            emailTo:
              type: array
              items:
                type: string
                format: email
              description: List of recipient email addresses.
            emailCc:
              type: array
              items:
                type: string
                format: email
              description: List of CC email addresses.
            emailBcc:
              type: array
              items:
                type: string
                format: email
              description: List of BCC email addresses.
            emailThreadId:
              type: integer
              nullable: true
              description: Email thread ID.
          required:
            - sourceType
            - emailFrom
            - emailTo
            - emailCc
            - emailBcc
            - emailThreadId
    SignalCustomInstruction:
      type: object
      description: Output from a custom instruction (follow-up prompt). The key is the instruction label.
      additionalProperties:
        type: object
        properties:
          prompt:
            type: string
            nullable: true
            description: The prompt text used for this custom instruction.
          generatedText:
            type: string
            nullable: true
            description: The AI-generated output text.
          reason:
            type: string
            nullable: true
            description: The AI-generated reason for this output.

    # V2 Schemas
    SignalDefinition:
      type: object
      description: An AI signal definition configured for the organization.
      properties:
        id:
          type: integer
          description: Unique identifier for the signal definition.
        signalName:
          type: string
          description: Display name of the signal.
        contextSource:
          type: string
          description: The source type that triggers this signal (call transcript).
        enabled:
          type: boolean
          description: Whether the signal is currently enabled.
        createdAt:
          type: string
          format: date-time
          description: The date and time when the signal definition was created (ISO 8601 format).
      required:
        - id
        - signalName
        - contextSource
        - enabled
        - createdAt
    SignalV2Execution:
      type: object
      description: An execution of a signal definition, triggered by a meeting.
      properties:
        signalId:
          type: integer
          description: The ID of the signal definition that was triggered.
        signalName:
          type: string
          description: The name of the signal that was triggered.
        triggeredAt:
          type: string
          format: date-time
          description: When the signal was triggered.
        sourceId:
          type: integer
          description: The ID of the source meeting.
        sourceType:
          type: string
          enum:
            - meeting
          description: The type of source that triggered the signal.
        sourceTitle:
          type: string
          nullable: true
          description: The title of the meeting.
        prompt:
          type: string
          nullable: true
          description: The prompt text that was used for the signal.
        reason:
          type: string
          nullable: true
          description: The AI-generated reason explaining why the signal was triggered.
        hostEmail:
          type: string
          nullable: true
          description: Email of the meeting host.
        attendeeEmails:
          type: array
          items:
            type: string
            format: email
          description: List of attendee emails.
        followUpPrompts:
          type: array
          nullable: true
          description: Follow-up prompt outputs. Only included when includeFollowUpPrompts=true.
          items:
            $ref: "#/components/schemas/SignalV2FollowUpPrompt"
        salesforceAccountId:
          type: string
          nullable: true
          description: Associated Salesforce Account ID, if any.
        salesforceAccountName:
          type: string
          nullable: true
          description: Associated Salesforce Account name, if any.
        salesforceOpportunityId:
          type: string
          nullable: true
          description: Associated Salesforce Opportunity ID, if any.
        salesforceOpportunityName:
          type: string
          nullable: true
          description: Associated Salesforce Opportunity name, if any.
        salesforceLeadId:
          type: string
          nullable: true
          description: Associated Salesforce Lead ID, if any.
        salesforceLeadName:
          type: string
          nullable: true
          description: Associated Salesforce Lead name, if any.
      required:
        - signalId
        - signalName
        - triggeredAt
        - sourceId
        - sourceType
        - sourceTitle
        - prompt
        - reason
        - hostEmail
        - attendeeEmails
        - salesforceAccountId
        - salesforceAccountName
        - salesforceOpportunityId
        - salesforceOpportunityName
        - salesforceLeadId
        - salesforceLeadName
    SignalV2FollowUpPrompt:
      type: object
      description: Output from a follow-up prompt. The key is the follow-up prompt title, and the value is the generated text.
      additionalProperties:
        type: string
security:
  - ApiKeyAuth: []
