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

# Detalle de conversación

> Devuelve una conversación del business identificada por su UUID.



## OpenAPI

````yaml /openapi.json get /{slug}/conversations/{uuid}
openapi: 3.1.0
info:
  title: 1TO1 AI Public API
  version: 0.2.0
  description: >-
    API pública de 1TO1 AI para integraciones externas (n8n, CRMs, scripts).
    Auth via Bearer token. Rate limit 60 req/min por API key. Contrato REST
    puro: el body de éxito es el payload directo (status HTTP como señal),
    errores retornan `{code, message}` con ambos campos garantizados. Ver schema
    `PublicError`.
servers:
  - url: https://app.1to1.ai/api/v1/public
    description: Producción
security:
  - bearerAuth: []
paths:
  /{slug}/conversations/{uuid}:
    get:
      tags:
        - Conversations
      summary: Detalle de conversación
      description: Devuelve una conversación del business identificada por su UUID.
      parameters:
        - $ref: '#/components/parameters/SlugPathParam'
        - $ref: '#/components/parameters/ConversationUuidPathParam'
      responses:
        '200':
          description: Conversación encontrada
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  ID único para correlacionar con logs server-side. Si el
                  cliente envía uno válido (UUID), se preserva; si no, se genera
                  uno nuevo.
              required: true
              description: >-
                ID único para correlacionar con logs server-side. Si el cliente
                envía uno válido (UUID), se preserva; si no, se genera uno
                nuevo.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationDetail'
        '400':
          description: UUID inválido (INVALID_REQUEST)
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  ID único para correlacionar con logs server-side. Si el
                  cliente envía uno válido (UUID), se preserva; si no, se genera
                  uno nuevo.
              required: true
              description: >-
                ID único para correlacionar con logs server-side. Si el cliente
                envía uno válido (UUID), se preserva; si no, se genera uno
                nuevo.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '401':
          description: Token ausente, mal formado o no válido (INVALID_API_TOKEN)
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  ID único para correlacionar con logs server-side. Si el
                  cliente envía uno válido (UUID), se preserva; si no, se genera
                  uno nuevo.
              required: true
              description: >-
                ID único para correlacionar con logs server-side. Si el cliente
                envía uno válido (UUID), se preserva; si no, se genera uno
                nuevo.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '403':
          description: >-
            El slug del path no coincide con el business del token
            (TOKEN_BUSINESS_MISMATCH)
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  ID único para correlacionar con logs server-side. Si el
                  cliente envía uno válido (UUID), se preserva; si no, se genera
                  uno nuevo.
              required: true
              description: >-
                ID único para correlacionar con logs server-side. Si el cliente
                envía uno válido (UUID), se preserva; si no, se genera uno
                nuevo.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '404':
          description: >-
            Conversación no encontrada o pertenece a otro business
            (CONVERSATION_NOT_FOUND)
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  ID único para correlacionar con logs server-side. Si el
                  cliente envía uno válido (UUID), se preserva; si no, se genera
                  uno nuevo.
              required: true
              description: >-
                ID único para correlacionar con logs server-side. Si el cliente
                envía uno válido (UUID), se preserva; si no, se genera uno
                nuevo.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '429':
          description: >-
            Rate limit excedido (RATE_LIMIT_EXCEEDED). Headers `Retry-After`,
            `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`
            indican cuándo reintentar.
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  ID único para correlacionar con logs server-side. Si el
                  cliente envía uno válido (UUID), se preserva; si no, se genera
                  uno nuevo.
              required: true
              description: >-
                ID único para correlacionar con logs server-side. Si el cliente
                envía uno válido (UUID), se preserva; si no, se genera uno
                nuevo.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
        '500':
          description: Error inesperado del servidor (UNKNOWN_ERROR)
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
                description: >-
                  ID único para correlacionar con logs server-side. Si el
                  cliente envía uno válido (UUID), se preserva; si no, se genera
                  uno nuevo.
              required: true
              description: >-
                ID único para correlacionar con logs server-side. Si el cliente
                envía uno válido (UUID), se preserva; si no, se genera uno
                nuevo.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
components:
  parameters:
    SlugPathParam:
      schema:
        $ref: '#/components/schemas/SlugPathParam'
      required: true
      description: >-
        Slug del business, case-insensitive. Debe coincidir con el business del
        token.
      name: slug
      in: path
    ConversationUuidPathParam:
      schema:
        $ref: '#/components/schemas/ConversationUuidPathParam'
      required: true
      description: UUID de la conversación
      name: uuid
      in: path
  schemas:
    ConversationDetail:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        contact:
          type: object
          properties:
            uuid:
              type: string
              format: uuid
            name:
              type:
                - string
                - 'null'
            profile_name:
              type:
                - string
                - 'null'
            phone:
              type:
                - string
                - 'null'
            whatsapp_user_id:
              type:
                - string
                - 'null'
              description: >-
                BSUID del contacto (identificador forward-compatible). Devuelve
                el BSUID real cuando existe, con fallback al teléfono (`phone`)
                mientras Meta no migre. Para resolver una conversación con un
                valor de fallback, reenvíalo como `phone` (el resolver solo
                acepta BSUIDs reales y daría `404`).
          required:
            - uuid
            - name
            - profile_name
            - phone
            - whatsapp_user_id
        last_message_at:
          type:
            - string
            - 'null'
          format: date-time
        last_message_preview:
          $ref: '#/components/schemas/LastMessagePreview'
        inbox_status:
          type: string
          enum:
            - pending
            - resolved
        response_status:
          type: string
          enum:
            - unread
            - pending
            - responded
        unread_count:
          type: integer
          minimum: 0
        mailbox:
          type:
            - object
            - 'null'
          properties:
            uuid:
              type: string
              format: uuid
            name:
              type: string
          required:
            - uuid
            - name
        ai_employee:
          type:
            - object
            - 'null'
          properties:
            uuid:
              type: string
              format: uuid
            name:
              type: string
          required:
            - uuid
            - name
        tags:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
            required:
              - uuid
              - name
              - color
        messaging_window_expires_at:
          type:
            - string
            - 'null'
          format: date-time
        is_tester:
          type: boolean
          description: >-
            Indica si la conversación fue creada desde el módulo tester del
            dashboard (feature donde el usuario prueba flujos con conversaciones
            ficticias). El listado devuelve reales y tester mezclados; filtrar
            por este campo si el cliente solo necesita uno de los dos. Para
            solo-tester existe `/tester/conversations`.
      required:
        - uuid
        - contact
        - last_message_at
        - last_message_preview
        - inbox_status
        - response_status
        - unread_count
        - mailbox
        - ai_employee
        - tags
        - messaging_window_expires_at
        - is_tester
    PublicError:
      type: object
      properties:
        code:
          type: string
          example: INVALID_API_TOKEN
        message:
          type: string
          example: >-
            The provided API token is invalid or has been revoked. Generate a
            new one in Settings → API Token.
      required:
        - code
        - message
      description: >-
        Public API error body. The client should match against `code` (stable
        canonical identifier) and NOT against `message` (human text, may be
        refined between API versions without notice). The HTTP status code is
        the error-type signal (4xx client, 5xx server).
    SlugPathParam:
      type: string
      example: acme
      description: >-
        Slug del business, case-insensitive. Debe coincidir con el business del
        token.
    ConversationUuidPathParam:
      type: string
      format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
      description: UUID de la conversación
    LastMessagePreview:
      type:
        - object
        - 'null'
      properties:
        body:
          type:
            - string
            - 'null'
          example: sí, te mando el documento
        content_type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
            - document
            - location
            - sticker
            - contacts
            - template
            - interactive
            - reaction
          example: text
        is_from_customer:
          type: boolean
          description: >-
            Prefijo "Tú:" en UI cuando `false`. Útil para distinguir mensajes
            del negocio (humano o AI) vs mensajes del cliente en el preview.
      required:
        - body
        - content_type
        - is_from_customer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_1to1_<hex>
      description: >-
        API token emitido desde Settings → API Token del dashboard 1TO1 AI.
        Enviar en header Authorization: Bearer sk_1to1_...

````