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

# Get a conversation

> Returns one conversation: its phone, its participants and its latest message. Another organization's conversation reads as not found.

Minimum role required: Viewer


## OpenAPI

````yaml /api-reference/openapi-backend.json get /conversations/{conversation_id}
openapi: 3.1.0
info:
  description: Axilio backend HTTP API.
  title: Axilio API
  version: 0.155.0
servers:
  - url: https://api.axilio.ai/api/v1
    description: Production
security: []
tags:
  - name: Agents
  - name: API Keys
  - name: Billing
  - name: Conversations
  - name: Files
  - name: Messages
  - name: Models
  - name: Organization
  - name: Phones
  - name: Runs
  - name: Sessions
  - name: Skill
  - name: Usage
  - name: Webhooks
paths:
  /conversations/{conversation_id}:
    get:
      tags:
        - Conversations
      summary: Get a conversation
      description: >-
        Returns one conversation: its phone, its participants and its latest
        message. Another organization's conversation reads as not found.
      operationId: conversations_get
      parameters:
        - description: conversation identifier
          in: path
          name: conversation_id
          required: true
          schema:
            description: conversation identifier
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
          description: OK
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Not Found
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  schemas:
    Conversation:
      additionalProperties: false
      description: >-
        A conversation: one of your dedicated phones and the people it texts
        with.
      properties:
        created_at:
          description: When the conversation's first message was stored.
          format: date-time
          type: string
        id:
          description: >-
            Conversation identifier. Opaque: don't derive it, read it from a
            conversation or a message's conversation_id.
          type: string
        is_group:
          description: 'True for a group conversation: more than one other person.'
          type: boolean
        last_message:
          $ref: '#/components/schemas/PhoneMessage'
          description: The conversation's latest message.
        last_message_at:
          description: >-
            When the latest message was stored. Conversations list newest
            activity first by this time.
          format: date-time
          type: string
        participants:
          description: >-
            Everyone on the conversation but your phone. Empty when the sender's
            number is unknown.
          items:
            $ref: '#/components/schemas/ConversationParticipant'
          type:
            - array
            - 'null'
        phone_id:
          description: The dedicated phone this conversation is on.
          type: string
        phone_number:
          description: >-
            That phone's own number in E.164: what its SIM reports, or else the
            number its latest received text was sent to. Null when neither is
            known, or when the phone is no longer one your organization rents.
          type:
            - string
            - 'null'
      required:
        - id
        - phone_id
        - phone_number
        - participants
        - is_group
        - last_message
        - last_message_at
        - created_at
      type: object
    V2ErrorModel:
      additionalProperties: false
      description: >-
        Error response, following RFC 9457 (Problem Details for HTTP APIs).
        Returned with a application/problem+json content type.
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/V2ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    PhoneMessage:
      additionalProperties: false
      description: A text message on one of the organization's dedicated phones.
      properties:
        accepted_at:
          description: >-
            When the phone reported it had this outgoing message. Absent for a
            received message, and for one the phone never got.
          format: date-time
          type: string
        api_key_id:
          description: >-
            The API key that sent this message. Absent for a message a signed-in
            user sent, a received message, and one sent before senders were
            recorded.
          type: string
        body:
          description: >-
            The message text: every text part, in order, joined with a newline.
            Empty for a message with no text.
          type: string
        channel:
          description: >-
            How the message travelled: sms (plain text), mms (multimedia,
            including group texts and some long texts), or rcs. More channels
            may be added; treat a value you don't know as a channel you don't
            handle.
          enum:
            - sms
            - mms
            - rcs
          type: string
        conversation_id:
          description: >-
            The conversation this message is in: GET
            /conversations/{conversation_id} reads it, and its messages are at
            GET /conversations/{conversation_id}/messages.
          type: string
        created_at:
          description: >-
            When the platform stored the message. Lists sort and filter on this
            time.
          format: date-time
          type: string
        deleted_at:
          description: >-
            When the message was deleted. Present only on a deleted message,
            which GET /messages/{message_id} still returns with no body or
            parts; lists and conversations leave it out.
          format: date-time
          type: string
        delivered_at:
          description: >-
            When a message this phone sent was delivered. Absent until then, and
            for a received message.
          format: date-time
          type: string
        direction:
          description: inbound for a message the phone received, outbound for one it sent.
          enum:
            - inbound
            - outbound
          type: string
        error:
          description: >-
            Why an outbound message failed or is unconfirmed, in words. Empty
            otherwise.
          type: string
        error_code:
          description: >-
            Why an outbound message failed or is unconfirmed, as a code to
            branch on: phone_unreachable (the phone never got it before its
            deadline; it did not go out), no_result (unconfirmed: the phone had
            it but has not reported), policy_off (the phone's sending switch is
            off), expired (its deadline passed before the phone could send it),
            no_subscription (no SIM line), no_service (no mobile service or
            data), radio_off, carrier_rejected, phone_rate_limited (Android's
            outgoing-message limit on the phone), media_fetch_failed (the phone
            could not download the attachment), connection_lost (the phone lost
            its connection before sending; it did not go out), queue_full (the
            phone was too busy), or send_failed (any other failure; error has
            the detail). Empty when error is. Absent on a failure reported by
            older phone software.
          enum:
            - phone_unreachable
            - no_result
            - policy_off
            - expired
            - no_subscription
            - no_service
            - radio_off
            - carrier_rejected
            - phone_rate_limited
            - media_fetch_failed
            - connection_lost
            - queue_full
            - send_failed
          type: string
        failed_at:
          description: >-
            When a message this phone sent failed. Absent unless its status is
            failed.
          format: date-time
          type: string
        from:
          description: >-
            Sender: an E.164 number, a short code, or an alphanumeric sender id.
            Null only when the sender is this phone's own SIM and the phone does
            not know its number.
          type:
            - string
            - 'null'
        id:
          description: Message identifier.
          type: string
        is_group:
          description: True for a group message (more than one recipient).
          type: boolean
        parts:
          description: >-
            The message content in order: text and media. A plain SMS has one
            text part.
          items:
            $ref: '#/components/schemas/PhoneMessagePart'
          type:
            - array
            - 'null'
        phone_deletion:
          $ref: '#/components/schemas/PhoneMessagePhoneDeletion'
          description: >-
            What the delete did to the copy on the phone. Present only on a
            deleted message: pending until the phone answers, then its answer.
        phone_id:
          description: The phone that received or sent the message.
          type: string
        received_at:
          description: >-
            When this phone received the message, by the phone's clock, to the
            millisecond. Null for a message the phone sent.
          format: date-time
          type:
            - string
            - 'null'
        sent_at:
          description: >-
            When the message was sent. For a received message, the sending
            network's clock (SMS carries whole seconds); for a message this
            phone sent, when the platform learned the network accepted it. Null
            for a message not sent yet.
          format: date-time
          type:
            - string
            - 'null'
        status:
          description: >-
            The delivery state of a message this phone sent: queued (accepted
            and issued to the phone), sent (the network accepted it), delivered
            (the recipient acknowledged it), failed, or unconfirmed (the phone
            had it but has not reported whether it went out; do not resend
            automatically, it may still turn sent or failed). Empty for a
            received message. More statuses may be added; treat one you don't
            know as still in progress.
          enum:
            - queued
            - sent
            - delivered
            - failed
            - unconfirmed
          type: string
        to:
          description: >-
            Every recipient, as E.164 numbers. For a one-to-one inbound message
            this is the phone's own number; a group message lists every
            recipient. Empty when the only recipient is this phone's own SIM and
            the phone does not know its number.
          items:
            type: string
          type:
            - array
            - 'null'
        truncated:
          description: >-
            True when the text was longer than 5000 characters and was cut to
            that length.
          type: boolean
        user_id:
          description: >-
            The signed-in user who sent this message, from the dashboard or the
            CLI. Absent for a message sent with an API key, a received message,
            and one sent before senders were recorded.
          type: string
      required:
        - id
        - phone_id
        - direction
        - channel
        - from
        - to
        - is_group
        - body
        - parts
        - truncated
        - sent_at
        - received_at
        - created_at
        - conversation_id
      type: object
    ConversationParticipant:
      additionalProperties: false
      description: One person on a conversation.
      properties:
        handle:
          description: >-
            How this person is addressed: an E.164 number such as +14155550123,
            a short code, or an alphanumeric sender id.
          type: string
      required:
        - handle
      type: object
    V2ErrorDetail:
      additionalProperties: false
      description: >-
        One specific problem within an error response, locating the offending
        part of the request.
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    PhoneMessagePart:
      additionalProperties: false
      description: >-
        One piece of a message's content: text, or a media file in the
        organization's file library.
      properties:
        file_id:
          description: >-
            The file holding the media, in the organization's file library,
            where the file API returns a short-lived download link. Present on
            media parts.
          type: string
        mime_type:
          description: >-
            The attachment's content type, for example image/jpeg. Present on
            media parts.
          type: string
        name:
          description: >-
            The attachment's filename as the sender's phone named it. Present on
            media parts.
          type: string
        size_bytes:
          description: The attachment's size in bytes. Present on media parts.
          format: int64
          type: integer
        text:
          description: The text. Present on text parts.
          type: string
        type:
          description: >-
            text for a run of message text; media for an attachment. More part
            types may be added; skip a part whose type you don't know.
          enum:
            - text
            - media
          type: string
      required:
        - type
      type: object
    PhoneMessagePhoneDeletion:
      additionalProperties: false
      description: What the delete did to the copy on the phone itself.
      properties:
        next_check_at:
          description: >-
            When Axilio next checks this delete: it asks the phone again if the
            phone can delete and the 7 days after the delete aren't over, or
            settles it. Null once the outcome is final: deleted, not_found,
            ambiguous, not_matched and not_sent at once, unconfirmed when the 7
            days run out; message.phone_deleted or message.phone_delete_failed
            fires then.
          format: date-time
          type:
            - string
            - 'null'
        reason:
          description: A human-readable explanation of status.
          type: string
        status:
          description: >-
            pending (the phone has been asked and has not answered yet), deleted
            (the phone deleted its copy), not_found (the phone has no copy),
            ambiguous (an older text the phone cannot tell apart from an
            identical one; left on the phone), not_default_app (the phone is not
            set up to delete messages yet; it is asked once it can), not_matched
            (the phone stored this message before it became the phone's
            messaging app and could not identify it; its copy may still be
            there), failed (the phone tried and failed; it is asked again),
            unconfirmed (the phone has not confirmed the delete: the request
            could not be sent, or 7 days passed without an answer; its copy may
            still be there), or not_sent (the organization no longer rents the
            phone, so nothing was sent). next_check_at is null once the outcome
            is final. More values may be added.
          enum:
            - pending
            - deleted
            - not_found
            - ambiguous
            - not_default_app
            - not_matched
            - failed
            - unconfirmed
            - not_sent
          type: string
      required:
        - status
        - reason
        - next_check_at
      type: object
  securitySchemes:
    apiKeyAuth:
      description: Customer API key (axl_ prefix).
      in: header
      name: X-Axilio-Api-Key
      type: apiKey

````

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