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

# Obtener Campañas

> Consulta la información de todas las campañas que se han enviado de manera masiva.



## OpenAPI

````yaml /api/openapi.json get /v1/campaigns
openapi: 3.1.0
info:
  title: Jelou API
  description: >-
    API for the Jelou platform. Send messages, manage campaigns, handle
    conversations, users, databases, and widgets.
  version: 1.0.0
servers:
  - url: https://api.jelou.ai
    description: Production server
security:
  - basicAuth: []
tags:
  - name: Messages
    description: Send messages to users
  - name: Campaigns
    description: HSM campaigns and templates
  - name: Conversations
    description: Chat history and metrics
  - name: Users
    description: User state and cache management
  - name: Resources
    description: Media resource management
  - name: Datum
    description: Database CRUD operations
  - name: Widget
    description: Widget and room management
  - name: PMA Custom
    description: External support panel integration
paths:
  /v1/campaigns:
    get:
      tags:
        - Campaigns
      summary: Obtener Campañas
      description: >-
        Consulta la información de todas las campañas que se han enviado de
        manera masiva.
      operationId: listCampaigns
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          schema:
            type: integer
            default: 10
            maximum: 50
        - name: botId
          in: query
          required: true
          schema:
            type: string
        - name: startAt
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: endAt
          in: query
          required: true
          schema:
            type: string
            format: date
        - name: elementName
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
            enum:
              - COMPLETED
              - PENDING
              - IN_PROGRESS
              - SCHEDULED
      responses:
        '200':
          description: Campaigns retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignsListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CampaignsListResponse:
      type: object
      properties:
        message:
          type: array
          items:
            type: string
        status:
          type: string
        data:
          type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/Campaign'
            pagination:
              $ref: '#/components/schemas/Pagination'
    Campaign:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        elementName:
          type: string
        botId:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - SCHEDULED
            - IN_PROGRESS
            - COMPLETED
        totalMessages:
          type: integer
        deliveredMessages:
          type: integer
        failedMessages:
          type: integer
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
    Pagination:
      type: object
      properties:
        limit:
          type: integer
        page:
          type: integer
        total:
          type: integer
        offset:
          type: integer
        totalPages:
          type: integer
    Error:
      type: object
      properties:
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        statusMessage:
          type: string
        status:
          type: integer
        error:
          type: object
          properties:
            code:
              type: string
            key:
              type: string
            description:
              type: string
            developerMessages:
              type: object
            clientMessages:
              type: object
        validationError:
          type: object
  responses:
    BadRequest:
      description: Bad request - Invalid format or missing required fields
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - Invalid authentication credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Basic authentication using Base64 encoded clientId:clientSecret

````