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

# List Campaigns

> Returns all SMS campaigns belonging to the authenticated user.



## OpenAPI

````yaml GET /campaigns
openapi: 3.0.0
info:
  title: ECSEND Developer API
  description: Public API for programmatically sending SMS and managing campaigns/contacts.
  version: 1.0.0
servers:
  - url: https://ecsend.paysgator.com
    description: Production Base URL
security:
  - ApiKeyAuth: []
paths:
  /campaigns:
    get:
      tags:
        - Campaigns
      summary: List all campaigns
      description: Returns all SMS campaigns belonging to the authenticated user.
      operationId: listCampaigns
      responses:
        '200':
          description: List of campaigns
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Campaign'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Campaign:
      type: object
      properties:
        id:
          type: string
          example: clx456def
        name:
          type: string
          example: Summer Promo
        status:
          type: string
          enum:
            - PENDING
            - COMPLETED
            - FAILED
          example: COMPLETED
        senderId:
          type: string
          example: ECSEND
        createdAt:
          type: string
          format: date-time
        errorMessage:
          type: string
          nullable: true
        recipientCount:
          type: integer
          example: 100
    Error:
      type: object
      properties:
        error:
          type: string
          example: Unauthorized. Invalid or missing X-Api-Key.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````