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

# Lista conversas do usuário na organização ativa



## OpenAPI

````yaml https://portal.unicontrol.me/v1/openapi get /v1/conversations
openapi: 3.1.0
info:
  title: Unicontrol API
  description: Welcome
  version: 1.0.0
servers:
  - url: http://0.0.0.0:3000
    description: Local Server
  - url: https://portal.test.flexhome.casa
    description: Development
  - url: https://portal.unicontrol.me
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/conversations:
    get:
      tags:
        - Conversations
      summary: Lista conversas do usuário na organização ativa
      operationId: getV1Conversations
      parameters:
        - in: header
          name: X-Organization-Id
          required: false
          schema:
            type: string
          description: >-
            ID da organização para contexto (opcional). Quando presente, filtra
            recursos da org.
      responses:
        '200':
          description: Lista de conversas
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    org_id:
                      type: string
                    kind:
                      type: string
                      enum:
                        - direct
                        - group
                    name:
                      type: string
                      nullable: true
                      description: Nome do grupo (null em 1:1)
                    is_public:
                      type: boolean
                      description: true para o grupo canônico 'Público' da org
                    created_at:
                      type: string
                      format: date-time
                    last_message_at:
                      type: string
                      format: date-time
                      nullable: true
                    participants:
                      type: array
                      items:
                        type: object
                        properties:
                          user_id:
                            type: string
                    last_message:
                      type: object
                      nullable: true
                      properties:
                        id:
                          type: integer
                        sender_user_id:
                          type: string
                        content:
                          type: string
                        sent_at:
                          type: string
                          format: date-time
                    unread_count:
                      type: integer
              example:
                - id: 1
                  org_id: org_abc
                  kind: direct
                  name: null
                  is_public: false
                  created_at: '2026-09-01T10:00:00Z'
                  last_message_at: '2026-09-01T10:05:00Z'
                  participants:
                    - user_id: user_alice
                    - user_id: user_bob
                  last_message:
                    id: 42
                    sender_user_id: user_bob
                    content: Oi, tudo bem?
                    sent_at: '2026-09-01T10:05:00Z'
                  unread_count: 1
        '401':
          description: Não autenticado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: unauthorized
        '403':
          description: Acesso negado
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: forbidden
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````