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

# Preview Teams Message

> Render the Teams chat invitation with the given (possibly unsaved) text.

Returns a standalone document mimicking a Teams chat bubble around the
exact message HTML the send path produces (custom text or the default
template when ``message`` is empty), so the builder can show a live
preview in a sandboxed iframe.



## OpenAPI

````yaml /openapi.json post /v1/workspaces/{workspace_id}/teams-message/preview
openapi: 3.1.0
info:
  title: Ontora API
  description: >-
    Ontora's public API. Covers interview campaigns, transcripts, synthesis
    reports, graph queries, webhooks, and workspace management. 


    **Authentication**: endpoints accept either a Clerk JWT (`Authorization:
    Bearer <token>`) or a workspace API key (`X-API-Key: ont_...`). Workspace
    keys are managed via `/v1/api-keys`.
  version: 0.1.0
servers: []
security:
  - ClerkJWT: []
  - WorkspaceApiKey: []
tags:
  - name: interviews
    description: Campaign CRUD, lifecycle, contacts, question sets.
  - name: campaign-insights
    description: Synthesis outputs — cartography, roadmap, personas, conversations.
  - name: interview-query
    description: Graph RAG query over campaign data.
  - name: campaign-reports
    description: Versioned synthesis Reports — manual regenerate, version history.
  - name: interview-export
    description: Markdown / ZIP exports of transcripts and reports.
  - name: api-keys
    description: Manage workspace-scoped API keys for programmatic access.
  - name: webhook-endpoints
    description: Outbound webhook endpoints for automation.
  - name: booking
    description: Public self-scheduling endpoints for interview participants.
  - name: join
    description: Public QR-code / share-link self-registration for campaign participants.
  - name: workspaces
    description: Workspace and membership management.
  - name: vaults
    description: Context vault management.
paths:
  /v1/workspaces/{workspace_id}/teams-message/preview:
    post:
      tags:
        - workspaces
      summary: Preview Teams Message
      description: |-
        Render the Teams chat invitation with the given (possibly unsaved) text.

        Returns a standalone document mimicking a Teams chat bubble around the
        exact message HTML the send path produces (custom text or the default
        template when ``message`` is empty), so the builder can show a live
        preview in a sandboxed iframe.
      operationId: >-
        preview_teams_message_v1_workspaces__workspace_id__teams_message_preview_post
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceTeamsMessagePreviewRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceTeamsMessagePreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkspaceTeamsMessagePreviewRequest:
      properties:
        message:
          anyOf:
            - type: string
              maxLength: 4000
            - type: 'null'
          title: Message
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        campaign_title:
          anyOf:
            - type: string
              maxLength: 300
            - type: 'null'
          title: Campaign Title
        duration_minutes:
          anyOf:
            - type: integer
              maximum: 240
              minimum: 1
            - type: 'null'
          title: Duration Minutes
      type: object
      title: WorkspaceTeamsMessagePreviewRequest
      description: >-
        Current (possibly unsaved) builder values for the Teams chat preview.


        Mirrors the email preview: ``campaign_title``/``duration_minutes`` let
        the

        campaign builder preview with the real campaign values so the {title}
        and

        {duration} placeholders render as they will in the actual chat.
    WorkspaceTeamsMessagePreviewResponse:
      properties:
        html:
          type: string
          title: Html
      type: object
      required:
        - html
      title: WorkspaceTeamsMessagePreviewResponse
    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:
    ClerkJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Clerk-issued RS256 JWT.
    WorkspaceApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Workspace-scoped API key (prefix: `ont_`).'
    HTTPBearer:
      type: http
      scheme: bearer

````