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

# Get campaigns

> Get all campaigns



## OpenAPI

````yaml GET /campaigns
openapi: 3.0.1
info:
  title: Masivo's REST API
  description: Learn how to use Masivo's REST API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.masivo.ai/api/storefront/v1
security:
  - bearerAuth: []
paths:
  /campaigns:
    get:
      description: Get all campaigns
      parameters:
        - in: query
          name: from
          description: Starting record index, starting from 0
          required: true
          schema:
            type: string
        - in: query
          name: to
          description: Ending record index, starting from 0
          required: true
          schema:
            type: string
        - in: query
          name: type
          description: Filter by campaign type
          schema:
            $ref: '#/components/schemas/CampaignType'
        - in: query
          name: brand_id
          description: Filter by brand id
          schema:
            type: string
            format: uuid
            nullable: true
        - in: query
          name: customer_id
          description: Filter campaigns that a customer can participate
          schema:
            type: string
        - in: query
          name: status
          description: Filter by campaign status
          schema:
            type: string
            enum:
              - RUNNING
              - PAUSED
              - SCHEDULED
              - FINISHED
              - NOT FINISHED
        - in: query
          name: labels
          description: Filter by campaign labels (, separated values)
          schema:
            type: string
        - in: query
          name: platform
          description: Filter by platform name
          schema:
            type: string
        - in: query
          name: store_id
          description: >-
            Filter by store id. Campaigns with stores = null are included
            because they have no store restriction; campaigns with a non-empty
            stores array are included only when it contains this id; campaigns
            with stores = [] are excluded.
          schema:
            type: string
        - in: query
          name: channel_id
          description: >-
            Filter by channel id. Campaigns with channels = null are included
            because they have no channel restriction; campaigns with a non-empty
            channels array are included only when it contains this id; campaigns
            with channels = [] are excluded.
          schema:
            type: string
        - in: query
          name: product_id
          description: >-
            Filter by product id. Campaigns with products = null are included
            because they have no product restriction; campaigns with a non-empty
            products array are included only when it contains this id; campaigns
            with products = [] are excluded.
          schema:
            type: string
        - in: query
          name: funded_by
          description: Filter by funder
          schema:
            type: string
        - in: query
          name: includes
          description: Whether to include additional data inside attributes
          schema:
            type: string
            enum:
              - CODES_SUMMARY
            description: Only applies to COUPONS campaigns
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Campaign'
                  from:
                    type: number
                    example: 0
                    description: The starting record index
                  to:
                    type: number
                    example: 9
                    description: The ending record index
                  count:
                    type: number
                    example: 10
                    description: The total number of campaigns
components:
  schemas:
    CampaignType:
      type: string
      description: The campaign type
      enum:
        - BEHAVIOR
        - COUPONS
        - PUNCH_CARDS
        - REFERRALS
        - SCORE_STREAKS
    Campaign:
      type: object
      description: Campaign response. account_id, order, and created_at are not returned.
      additionalProperties: true
      properties:
        id:
          type: string
          description: The campaign internal unique identifier
          format: uuid
        name:
          type: string
          description: The name of the campaign
        status:
          description: The computed campaign status returned by the API
          type: string
          enum:
            - RUNNING
            - PAUSED
            - SCHEDULED
            - FINISHED
            - NOT FINISHED
        attributes:
          description: The attributes of the campaign
          type: object
          additionalProperties: true
        stores:
          type: array
          description: >-
            Store ids this campaign is restricted to. null means no store
            restriction; a non-empty array restricts the campaign to those
            stores; [] is an explicit empty restriction and matches no stores.
          items:
            type: string
          nullable: true
        channels:
          type: array
          description: >-
            Channel ids this campaign is restricted to. null means no channel
            restriction; a non-empty array restricts the campaign to those
            channels; [] is an explicit empty restriction and matches no
            channels.
          items:
            type: string
          nullable: true
        products:
          type: array
          description: >-
            Product ids this campaign is restricted to. null means no product
            restriction; a non-empty array restricts the campaign to those
            products; [] is an explicit empty restriction and matches no
            products.
          items:
            type: string
          nullable: true
        content:
          description: The CMS content values stored for the campaign
          type: object
          additionalProperties: true
          example:
            Title:
              name: Title
              type: input
              value: Value of the title
            BannerImage:
              alt: Alternative description for the image
              href: Href link for the image
              name: BannerImage
              type: image
              value: https://URL_TO_IMAGE
            Description:
              name: Name of the description
              type: input
              value: Value of the description
        template_id:
          description: >-
            The CMS template id associated with the campaign content, or null
            when there is no template.
          type: string
          format: uuid
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````