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

# Listar tickets

> Devuelve los tickets del tenant paginados por `limit` y `offset`, con filtros combinables. Una API key ve **todos** los tickets del tenant; la visibilidad por dueño o grupo aplica sólo a las personas del equipo.



## OpenAPI

````yaml /openapi.json get /tickets/public/v1
openapi: 3.1.0
info:
  title: Revem API
  version: 1.0.0
  description: >-
    La API pública de Revem para integraciones de servidor a servidor:
    contactos, tickets y el canal de webchat. Se autentica con la API key de tu
    organización.
  contact:
    name: Soporte Revem
    email: soporte@revem.ai
    url: https://revem.ai
servers:
  - url: https://api.revem.ai
    description: Producción
security:
  - apiKey: []
tags:
  - name: Contactos
    description: >-
      Sincroniza tu base de clientes con Revem. Los contactos se identifican por
      teléfono al crearlos y por id después.
  - name: Tickets
    description: Lee y actualiza los tickets de tu embudo desde tu sistema de gestión.
  - name: Webchat
    description: >-
      Conecta el chat de tu sitio con Revem: registra lo que escribe el
      visitante y lee las respuestas del equipo o del agente.
paths:
  /tickets/public/v1:
    get:
      tags:
        - Tickets
      summary: Listar tickets
      description: >-
        Devuelve los tickets del tenant paginados por `limit` y `offset`, con
        filtros combinables. Una API key ve **todos** los tickets del tenant; la
        visibilidad por dueño o grupo aplica sólo a las personas del equipo.
      operationId: listTickets
      parameters:
        - name: status
          in: query
          required: false
          description: Filtra por estado.
          schema:
            type: string
            enum:
              - active
              - postponed
              - won
              - lost
        - name: ids
          in: query
          required: false
          description: Lista de ids de ticket separados por coma, hasta 200.
          schema:
            type: string
        - name: contactId
          in: query
          required: false
          description: Tickets en que este contacto es el contacto principal o la cuenta.
          schema:
            type: string
            format: uuid
        - name: search
          in: query
          required: false
          description: Texto contenido en el título, sin distinguir mayúsculas.
          schema:
            type: string
            minLength: 1
            maxLength: 200
        - name: funnelStageId
          in: query
          required: false
          description: Tickets en esta etapa del embudo.
          schema:
            type: integer
            minimum: 1
        - name: assignedToProfileId
          in: query
          required: false
          description: Tickets asignados a este perfil.
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          required: false
          description: Tamaño de página.
          schema:
            default: 50
            type: integer
            minimum: 1
            maximum: 200
        - name: offset
          in: query
          required: false
          description: Cuántos resultados saltar.
          schema:
            default: 0
            type: integer
            minimum: 0
      responses:
        '200':
          description: Una página de tickets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketList'
        '400':
          description: Un parámetro no es válido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketsError'
        '401':
          description: Sin credencial, o la API key no existe o fue revocada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              example:
                error: Unauthorized
                message: Invalid API key
        '403':
          description: >-
            La credencial no puede usar esta ruta. Una API key sólo alcanza los
            endpoints documentados aquí; cualquier otra ruta de la API responde
            este código.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              example:
                ok: false
                error: Forbidden
                message: This endpoint is not available to API keys
        '429':
          description: >-
            La key superó su límite de solicitudes por minuto. El header
            `retry-after` indica cuánto esperar.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
              example:
                ok: false
                error: Too many requests. Retry in 1 minute.
          headers:
            retry-after:
              description: Segundos que esperar antes de reintentar.
              schema:
                type: integer
            x-ratelimit-limit:
              description: Solicitudes permitidas por minuto.
              schema:
                type: integer
            x-ratelimit-remaining:
              description: Solicitudes que quedan en la ventana actual.
              schema:
                type: integer
            x-ratelimit-reset:
              description: Segundos hasta que la ventana se reinicia.
              schema:
                type: integer
components:
  schemas:
    TicketList:
      type: object
      properties:
        tickets:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              title:
                type: string
              status:
                type: string
                enum:
                  - active
                  - postponed
                  - won
                  - lost
              funnelStageId:
                type: integer
              funnelId:
                type: string
                format: uuid
              assignedToProfileId:
                anyOf:
                  - type: string
                    format: uuid
                  - type: 'null'
              createdByProfileId:
                anyOf:
                  - type: string
                    format: uuid
                  - type: 'null'
              pointOfContact:
                anyOf:
                  - type: string
                    format: uuid
                  - type: 'null'
              account:
                anyOf:
                  - type: string
                    format: uuid
                  - type: 'null'
              customAttributes:
                type: object
                additionalProperties: true
              lossReason:
                anyOf:
                  - type: string
                  - type: 'null'
              visibility:
                type: string
                enum:
                  - OWNER
                  - OWNER_AND_GROUPS
                  - TENANT
              visibilityGroupId:
                anyOf:
                  - type: string
                    format: uuid
                  - type: 'null'
              postponedUntil:
                anyOf:
                  - type: string
                    format: date-time
                  - type: 'null'
              closedAt:
                anyOf:
                  - type: string
                    format: date-time
                  - type: 'null'
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              conversations:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    channelType:
                      type: string
                      enum:
                        - WhatsApp
                        - Gmail
                        - Outlook
                        - Instagram
                        - Messenger
                        - Webchat
                  required:
                    - id
                    - channelType
                  additionalProperties: false
            required:
              - id
              - title
              - status
              - funnelStageId
              - funnelId
              - assignedToProfileId
              - createdByProfileId
              - pointOfContact
              - account
              - customAttributes
              - lossReason
              - visibility
              - visibilityGroupId
              - postponedUntil
              - closedAt
              - createdAt
              - updatedAt
              - conversations
            additionalProperties: false
        hasMore:
          type: boolean
          description: '`true` si hay más resultados después de esta página.'
      required:
        - tickets
        - hasMore
      additionalProperties: false
      example:
        tickets:
          - id: c0a8012e-5b3d-4e7f-9a1b-2c3d4e5f6a7b
            title: Cotización plan anual
            status: active
            funnelStageId: 12
            funnelId: f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b
            assignedToProfileId: 9b8a7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
            createdByProfileId: null
            pointOfContact: 3f2b6c1e-8d4a-4f0b-9c2e-7a1d5e6f8b90
            account: null
            customAttributes:
              origen: web
            lossReason: null
            visibility: TENANT
            visibilityGroupId: null
            postponedUntil: null
            closedAt: null
            createdAt: '2026-09-02T12:00:00.000Z'
            updatedAt: '2026-09-03T08:15:30.000Z'
            conversations:
              - id: a1d2c3b4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
                channelType: Webchat
        hasMore: false
    TicketsError:
      type: object
      properties:
        ok:
          type: boolean
        error:
          type: string
          description: Explicación legible del problema.
      required:
        - ok
        - error
      additionalProperties: false
    AuthError:
      type: object
      properties:
        ok:
          type: boolean
          const: false
          description: Presente sólo en el `403`.
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
    RateLimitError:
      type: object
      properties:
        ok:
          type: boolean
          const: false
        error:
          type: string
          description: Incluye cuánto esperar antes de reintentar.
      required:
        - ok
        - error
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        La API key de tu organización, con la forma `rvm_<prefijo>.<secreto>`,
        enviada como `Authorization: Bearer rvm_…`. Revem la emite y sólo se
        muestra una vez; si la pierdes se reemplaza, no se recupera.

````