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

# Get conversation thread

> Return the full ordered message thread for a lead across all channels.



## OpenAPI

````yaml /openapi.json get /api/v1/public/conversations/{lead_id}
openapi: 3.1.0
info:
  description: >-
    Customer-facing API for managing outreach, leads, conversations, voice
    agents, knowledge bases, analytics, and webhooks.
  title: Sendora Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.sendora.ai
security: []
tags:
  - description: Build, launch, pause and stop campaigns, and enroll leads.
    name: Campaigns
  - description: Create, update, tag, enrich and import leads.
    name: Leads
  - description: Group leads into reusable lists.
    name: Lead lists
  - description: Find new prospects and research existing leads.
    name: Prospecting
  - description: Read conversations and send messages to leads.
    name: Inbox
  - description: Manage workspace-wide suppressions.
    name: Do not contact
  - description: Manage the content your agents answer from.
    name: Knowledge bases
  - description: Create, configure, test and publish voice agents.
    name: Voice agents
  - description: Give agents actions such as booking, lookups and transfers.
    name: Agent tools
  - description: Embed a voice agent on your website.
    name: Voice widgets
  - description: Start voice calls and read call results.
    name: Calls
  - description: Browse and preview the voices an agent can use.
    name: Voices
  - description: List numbers, bring your own, and route calls.
    name: Phone numbers
  - description: List the channel accounts connected to the workspace.
    name: Connected accounts
  - description: Register endpoints and review deliveries.
    name: Webhooks
  - description: Drive the workspace assistant programmatically.
    name: Copilot
  - description: Read workspace and campaign performance.
    name: Analytics
  - description: Track asynchronous operations.
    name: Jobs
  - description: Manage client workspaces, plans and branding.
    name: Agency
paths:
  /api/v1/public/conversations/{lead_id}:
    get:
      tags:
        - Inbox
      summary: Get conversation thread
      description: Return the full ordered message thread for a lead across all channels.
      operationId: public_get_conversation_thread_api_v1_public_conversations__lead_id__get
      parameters:
        - description: >-
            The lead's id: the `id` from List all leads. It is also the last
            part of that page's address in the app.
          in: path
          name: lead_id
          required: true
          schema:
            title: Lead Id
            type: string
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - in: header
          name: Authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationThread'
          description: Successful Response
        '401':
          description: The X-API-Key header is missing, invalid, expired, or revoked.
        '402':
          description: >-
            The workspace is suspended for billing, or the request would exceed
            a plan or usage limit.
        '403':
          description: >-
            The key is valid but lacks the required scope, or the workspace has
            no active plan, lacks the entitlement, or has this feature turned
            off or view-only.
        '404':
          description: >-
            The resource does not exist or is not owned by the authenticated
            workspace.
        '410':
          description: The workspace behind this key has been deleted.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '500':
          description: >-
            An unexpected Sendora error occurred. Retry only if the operation is
            safe to repeat.
        '503':
          description: >-
            An entitlement or billing check is temporarily unavailable. Retry
            after the Retry-After interval.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >-
            curl -X GET
            'https://api.sendora.ai/api/v1/public/conversations/YOUR_ID' -H
            "X-API-Key: $SENDORA_API_KEY"
        - label: Python
          lang: python
          source: |-
            import requests

            url = 'https://api.sendora.ai/api/v1/public/conversations/YOUR_ID'
            headers = {'X-API-Key': '$SENDORA_API_KEY'}
            response = requests.get(url, headers=headers)
            response.raise_for_status()
            print(response.json())
        - label: JavaScript
          lang: javascript
          source: >-
            const response = await
            fetch("https://api.sendora.ai/api/v1/public/conversations/YOUR_ID",
            {
              method: "GET",
              headers: { 'X-API-Key': process.env.SENDORA_API_KEY },
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("GET",
            "https://api.sendora.ai/api/v1/public/conversations/YOUR_ID", nil)

            if err != nil { log.Fatal(err) }

            req.Header.Set("X-API-Key", os.Getenv("SENDORA_API_KEY"))

            resp, err := http.DefaultClient.Do(req)

            if err != nil { log.Fatal(err) }

            defer resp.Body.Close()
components:
  schemas:
    ConversationThread:
      properties:
        call_recording:
          anyOf:
            - $ref: '#/components/schemas/CallRecordingOut'
            - type: 'null'
          description: Call recording returned by the Sendora API.
        calls:
          default: []
          description: Calls returned by the Sendora API.
          items:
            $ref: '#/components/schemas/api__v1__unibox__schemas__CallOut'
          title: Calls
          type: array
        conversation:
          $ref: '#/components/schemas/ConversationOut'
          description: Conversation returned by the Sendora API.
        has_more_by_channel:
          additionalProperties:
            type: boolean
          default: {}
          description: Has more by channel returned by the Sendora API.
          title: Has More By Channel
          type: object
        has_more_messages:
          default: false
          description: Has more messages returned by the Sendora API.
          title: Has More Messages
          type: boolean
        messages:
          description: Messages returned by the Sendora API.
          items:
            $ref: '#/components/schemas/MessageOut'
          title: Messages
          type: array
        pending_agent_draft:
          anyOf:
            - $ref: '#/components/schemas/PendingAgentDraft'
            - type: 'null'
          description: Pending agent draft returned by the Sendora API.
      required:
        - conversation
        - messages
      title: ConversationThread
      type: object
    HTTPValidationError:
      properties:
        detail:
          description: Detail returned by the Sendora API.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      required: []
      title: HTTPValidationError
      type: object
    CallRecordingOut:
      description: >-
        Minimal call-recording payload. Only surfaced on the thread endpoint
        when

        the conversation's connected service is 'voice'. Sourced from the most
        recent

        call_logs row for (workspace identifier, lead_id) where connected
        service_call_id IS NOT NULL.


        Superseded by `ConversationThread.calls`, which carries EVERY call
        rather

        than only the newest recorded one. Kept because it is a published
        response

        field; the UI reads `calls`.
      properties:
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Agent name returned by the Sendora API.
          title: Agent Name
        duration_seconds:
          default: 0
          description: Duration seconds returned by the Sendora API.
          title: Duration Seconds
          type: integer
        recording_ref:
          description: Recording ref returned by the Sendora API.
          title: Recording Ref
          type: string
        started_at:
          description: Started at returned by the Sendora API.
          format: date-time
          title: Started At
          type: string
      required:
        - recording_ref
        - started_at
      title: CallRecordingOut
      type: object
    api__v1__unibox__schemas__CallOut:
      description: >-
        One voice call, with everything the operator needs to review it.


        ⚠️ NO `id` FIELD, deliberately. `call_logs` has no `public_id` column

        (AGENTS.md), and the UI only needs a React key, which it derives from

        the position + timestamp. Emitting the row uuid would put a new internal
        id

        on the wire for no functional gain. `recording_ref`, when present, is an

        encrypted opaque reference and does not expose the call id or storage
        URL.
      properties:
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Agent name returned by the Sendora API.
          title: Agent Name
        direction:
          default: outbound
          description: Direction returned by the Sendora API.
          title: Direction
          type: string
        disposition:
          anyOf:
            - type: string
            - type: 'null'
          description: Disposition returned by the Sendora API.
          title: Disposition
        duration_seconds:
          default: 0
          description: Duration seconds returned by the Sendora API.
          title: Duration Seconds
          type: integer
        ended_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Ended at returned by the Sendora API.
          title: Ended At
        processing:
          default: false
          description: Processing returned by the Sendora API.
          title: Processing
          type: boolean
        recording_ref:
          anyOf:
            - type: string
            - type: 'null'
          description: Recording ref returned by the Sendora API.
          title: Recording Ref
        stale:
          default: false
          description: Stale returned by the Sendora API.
          title: Stale
          type: boolean
        started_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Started at returned by the Sendora API.
          title: Started At
        status:
          default: completed
          description: Status returned by the Sendora API.
          title: Status
          type: string
        summary:
          anyOf:
            - type: string
            - type: 'null'
          description: Summary returned by the Sendora API.
          title: Summary
        transcript:
          default: []
          description: Transcript returned by the Sendora API.
          items:
            $ref: '#/components/schemas/CallTurnOut'
          title: Transcript
          type: array
      required: []
      title: CallOut
      type: object
    ConversationOut:
      properties:
        automation_paused:
          default: false
          description: Automation paused returned by the Sendora API.
          title: Automation Paused
          type: boolean
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          description: Avatar url returned by the Sendora API.
          title: Avatar Url
        channel:
          $ref: '#/components/schemas/MessageChannel'
          description: Channel returned by the Sendora API.
        connected_account_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: Always empty in API responses.
          title: Connected Account Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          description: Email returned by the Sendora API.
          title: Email
        escalation_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: The open handoff request for this conversation, when one exists.
          title: Escalation Id
        id:
          description: >-
            The conversation's id. It is the lead's id: pass it to Get
            conversation thread.
          title: Id
          type: string
        is_active_campaign:
          default: false
          description: Is active campaign returned by the Sendora API.
          title: Is Active Campaign
          type: boolean
        is_archived:
          default: false
          description: Is archived returned by the Sendora API.
          title: Is Archived
          type: boolean
        last_message:
          anyOf:
            - type: string
            - type: 'null'
          description: Last message returned by the Sendora API.
          title: Last Message
        last_message_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Last message at returned by the Sendora API.
          title: Last Message At
        lead_company:
          anyOf:
            - type: string
            - type: 'null'
          description: Lead company returned by the Sendora API.
          title: Lead Company
        lead_name:
          description: Lead name returned by the Sendora API.
          title: Lead Name
          type: string
        lead_title:
          anyOf:
            - type: string
            - type: 'null'
          description: Lead title returned by the Sendora API.
          title: Lead Title
        linkedin_url:
          anyOf:
            - type: string
            - type: 'null'
          description: Linkedin url returned by the Sendora API.
          title: Linkedin Url
        phone:
          anyOf:
            - type: string
            - type: 'null'
          description: Phone returned by the Sendora API.
          title: Phone
        pipeline_stage:
          anyOf:
            - type: string
            - type: 'null'
          description: Pipeline stage returned by the Sendora API.
          title: Pipeline Stage
        provider:
          anyOf:
            - enum:
                - linkedin
                - whatsapp
                - email
                - sms
                - voice
              type: string
            - type: 'null'
          description: connected service returned by the Sendora API.
          title: connected service
        recording_ref:
          anyOf:
            - type: string
            - type: 'null'
          description: Recording ref returned by the Sendora API.
          title: Recording Ref
        requires_attention:
          default: false
          description: Requires attention returned by the Sendora API.
          title: Requires Attention
          type: boolean
        thread_count:
          default: 1
          description: Thread count returned by the Sendora API.
          title: Thread Count
          type: integer
        traffic_light_status:
          anyOf:
            - $ref: '#/components/schemas/TrafficLight'
            - type: 'null'
          description: Traffic light status returned by the Sendora API.
        unread_count:
          default: 0
          description: Unread count returned by the Sendora API.
          title: Unread Count
          type: integer
      required:
        - id
        - lead_name
        - channel
      title: ConversationOut
      type: object
    MessageOut:
      properties:
        attachments:
          default: []
          description: Attachments returned by the Sendora API.
          items:
            $ref: '#/components/schemas/AttachmentOut'
          title: Attachments
          type: array
        channel:
          $ref: '#/components/schemas/MessageChannel'
          description: Channel returned by the Sendora API.
        content:
          description: Content returned by the Sendora API.
          title: Content
          type: string
        conversation_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: >-
            The conversation this message belongs to. It identifies the thread
            inside this workspace's inbox only.
          title: Conversation Id
        created_at:
          description: Created at returned by the Sendora API.
          format: date-time
          title: Created At
          type: string
        delivered_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Delivered at returned by the Sendora API.
          title: Delivered At
        direction:
          $ref: '#/components/schemas/MessageDirection'
          description: Direction returned by the Sendora API.
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Error returned by the Sendora API.
          title: Error
        id:
          description: The message's id.
          format: uuid
          title: Id
          type: string
        lead_id:
          description: 'The lead this message belongs to: an `id` from List all leads.'
          title: Lead Id
          type: string
        sent_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Sent at returned by the Sendora API.
          title: Sent At
        status:
          description: Status returned by the Sendora API.
          title: Status
          type: string
      required:
        - id
        - lead_id
        - direction
        - channel
        - content
        - created_at
        - status
      title: MessageOut
      type: object
    PendingAgentDraft:
      description: >-
        A reply written by the inbound-reply agent that's awaiting human review.


        Set when there's a `messages` row with status='draft' on this
        conversation.

        The Unibox composer pre-fills with this text and shows an "AI draft"
        badge.
      properties:
        agent_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          description: Always empty in API responses.
          title: Agent Id
        channel:
          $ref: '#/components/schemas/MessageChannel'
          description: Channel returned by the Sendora API.
        generated_at:
          description: Generated at returned by the Sendora API.
          format: date-time
          title: Generated At
          type: string
        message_id:
          description: The id of the drafted message.
          format: uuid
          title: Message Id
          type: string
        text:
          description: Text returned by the Sendora API.
          title: Text
          type: string
      required:
        - text
        - channel
        - generated_at
        - message_id
      title: PendingAgentDraft
      type: object
    ValidationError:
      properties:
        loc:
          description: Loc returned by the Sendora API.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: Msg returned by the Sendora API.
          title: Message
          type: string
        type:
          description: Type returned by the Sendora API.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    CallTurnOut:
      description: >-
        One line of a call transcript.


        `speaker` is normalised from voice service's own vocabulary:

        MESSAGE_ROLE_AGENT is OUR AI, MESSAGE_ROLE_USER is the person on the
        other

        end. Getting that backwards would attribute the prospect's words to us
        in

        the operator's own inbox, so it is normalised once, here, rather than in

        each renderer.
      properties:
        speaker:
          description: Speaker returned by the Sendora API.
          enum:
            - agent
            - lead
            - tool
          title: Speaker
          type: string
        text:
          description: Text returned by the Sendora API.
          title: Text
          type: string
      required:
        - speaker
        - text
      title: CallTurnOut
      type: object
    MessageChannel:
      enum:
        - EMAIL
        - LINKEDIN
        - WHATSAPP
        - SMS
        - VOICE
      title: MessageChannel
      type: string
    TrafficLight:
      enum:
        - GREEN
        - YELLOW
        - RED
      title: TrafficLight
      type: string
    AttachmentOut:
      properties:
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          description: Content type returned by the Sendora API.
          title: Content Type
        filename:
          anyOf:
            - type: string
            - type: 'null'
          description: Filename returned by the Sendora API.
          title: Filename
        size:
          anyOf:
            - type: integer
            - type: 'null'
          description: Size returned by the Sendora API.
          title: Size
        url:
          description: Url returned by the Sendora API.
          title: Url
          type: string
      required:
        - url
      title: AttachmentOut
      type: object
    MessageDirection:
      enum:
        - inbound
        - outbound
        - system
      title: MessageDirection
      type: string
  securitySchemes:
    ApiKeyAuth:
      description: Customer API key created in the Sendora dashboard.
      in: header
      name: X-API-Key
      type: apiKey

````

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