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

# Listar Campañas

> Returns all Campaigns for your organization

<Info>
  **Límite de Tasa:** 12 solicitudes por segundo
</Info>

<Warning>
  `startDate` y `endDate` deben proporcionarse juntos cuando se filtra por rango de fechas.
</Warning>


## OpenAPI

````yaml GET /campaigns
openapi: 3.0.1
info:
  title: Altur API
  description: >-
    An API aimed to allow third-party developers to interact with the Altur
    platform through a RESTful interface.
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.altur.io/api/v1.0
security:
  - apiKeyAuth: []
paths:
  /campaigns:
    get:
      description: Returns all Campaigns for your organization
      parameters:
        - name: agentId
          in: query
          description: >-
            Filters the Campaigns by Agent ID of the agent assigned to the
            Campaign
          schema:
            type: string
            format: uuid4
          required: false
        - name: status
          in: query
          description: Filters the Campaigns by the Status of the Campaign
          schema:
            type: string
            enum:
              - pending
              - ready
              - active
              - inactive
              - cooldown
              - finished
          required: false
        - name: integration
          in: query
          description: Type of integration for the Campaign
          schema:
            type: string
            enum:
              - phone_call
              - whatsapp
          required: false
        - name: startDate
          in: query
          description: Bottom date of the range to filter the Campaigns in ISO 8601 format
          schema:
            type: string
            format: ISO 8601
        - name: endDate
          in: query
          description: Top date of the range to filter the Campaigns in ISO 8601 format
          schema:
            type: string
            format: ISO 8601
          required: false
        - name: archived
          in: query
          description: If true, archived Campaigns will be included in the results.
          schema:
            type: boolean
            default: false
          required: false
        - name: pageSize
          in: query
          description: Number of items per page to return.
          schema:
            type: integer
            default: 50
            maximum: 100
          required: false
        - name: cursor
          in: query
          description: Cursor to the next page to return.
          schema:
            type: string
          required: false
      responses:
        '200':
          description: Campaigns response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignsResponse'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DRFBadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CampaignsResponse:
      type: object
      properties:
        total_count:
          description: >-
            Total number of Campaigns for the given query. NOTE: The result is
            cache for 3 minutes.
          type: integer
        campaigns:
          type: array
          items:
            $ref: '#/components/schemas/Campaign'
        pagination:
          $ref: '#/components/schemas/CursorPagination'
          type: object
    DRFBadRequestError:
      type: object
      description: >-
        Validation error response where each field name that has an error is a
        property containing an array of error messages
      additionalProperties:
        type: array
        items:
          type: string
      example:
        field1:
          - This field is required.
        field2:
          - Incorrect format.
        non_field_errors:
          - The date range is not valid.
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    Campaign:
      type: object
      properties:
        id:
          description: Unique identifier for the Campaign
          type: integer
        name:
          description: Name of the Campaign
          type: string
        description:
          description: Description of the Campaign
          type: string
        status:
          description: The current status of the Campaign
          type: string
        created_at:
          description: The date and time when the Campaign was created
          type: string
          format: ISO 8601
        agent:
          $ref: '#/components/schemas/Agent'
          description: The agent assigned to the Campaign
          type: object
        scheduling:
          $ref: '#/components/schemas/CampaignSchedule'
          description: The schedule of the Campaign
          type: object
        timezone:
          description: The timezone of the Campaign
          type: string
        retries:
          description: >-
            The number of times the campaign will retry to contact a contact if
            the call or message fails
          type: integer
        archived:
          description: Whether the Campaign is archived
          type: boolean
        template:
          description: WhatsApp Template assigned to the Campaign (WhatsApp campaigns only)
          type: string
        first_message:
          description: >-
            The first message the Agent will say upon the call being answered
            (Phone call campaigns only)
          type: string
        concurrency_limit:
          description: >-
            The maximum number of concurrent calls allowed (Phone call campaigns
            only)
          type: integer
        cycle_enabled:
          description: >-
            If enabled the campaign will automatically rerun and re-contact
            contacts (Phone call campaigns only)
          type: boolean
        cycle_max_iterations:
          description: >-
            The maximum number of times a campaign will retry to contact a
            contact if the call fails (Phone call campaigns only)
          type: integer
        cycle_cooldown_minutes:
          description: >-
            The cooldown time between cycles of the campaign in minutes (Phone
            call campaigns only)
          type: integer
        cycle_filter_statuses:
          description: >-
            The list of contact statuses to exclude from the campaign on cycles
            (Phone call campaigns only)
          type: array
          items:
            type: string
        cycle_filter_tags:
          description: >-
            The list of contact tags assigned to the contacts to exclude from
            the campaign on cycles (Phone call campaigns only)
          type: array
          items:
            type: string
        cycle_current_iteration:
          description: Current iteration of the Campaign (Phone call campaigns only)
          type: integer
        cycle_last_iteration_at:
          description: Last iteration of the Campaign (Phone call campaigns only)
          type: string
          format: ISO 8601
    CursorPagination:
      type: object
      description: >-
        Filters are applied to each request independently. Changing filters
        while paginating may result in gaps or overlaps in the result set. For
        consistent results, maintain the same filters throughout pagination.
      properties:
        has_next:
          type: boolean
          description: Boolean describing if there are more items to fetch
        has_previous:
          type: boolean
          description: Boolean describing if there are previous items to fetch
        next_cursor:
          type: string
          description: Cursor to the next page to return
        previous_cursor:
          type: string
          description: Cursor to the previous page to return
    Agent:
      type: object
      properties:
        id:
          description: Unique identifier for the Agent
          type: string
          format: uuid4
        name:
          description: Name of the Agent
          type: string
    CampaignSchedule:
      type: object
      properties:
        mon:
          $ref: '#/components/schemas/CampaignScheduleDay'
          description: Monday
          type: object
        tue:
          $ref: '#/components/schemas/CampaignScheduleDay'
          description: Tuesday
          type: object
        wed:
          $ref: '#/components/schemas/CampaignScheduleDay'
          description: Wednesday
          type: object
        thu:
          $ref: '#/components/schemas/CampaignScheduleDay'
          description: Thursday
          type: object
        fri:
          $ref: '#/components/schemas/CampaignScheduleDay'
          description: Friday
          type: object
        sat:
          $ref: '#/components/schemas/CampaignScheduleDay'
          description: Saturday
          type: object
        sun:
          $ref: '#/components/schemas/CampaignScheduleDay'
          description: Sunday
          type: object
    CampaignScheduleDay:
      type: object
      properties:
        startTime:
          description: Start time of the Campaign on Monday
          type: string
        stopTime:
          description: End time of the Campaign on Monday
          type: string
        active:
          description: Boolean describing if the Campaign is active on Monday
          type: boolean
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Add `api-key YOUR_API_SECRET_KEY` as the value of the `Authorization`
        header.

````