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

# List campaigns

> Returns campaigns for the org along with supporting metadata. The `data` object is richer than a flat array — it includes `results` (the campaign list), `schemas` (field schemas per campaign type), `types` (campaign type labels), and `allowed_triggers` (trigger type availability). Iterate `data.results` for the campaign list.

List all campaigns

**Permission:** requires `campaigns`.



## OpenAPI

````yaml /api-reference/specs/campaigns.json get /api/campaigns
openapi: 3.1.0
info:
  title: ConveYour API — Campaigns
  description: >-
    Retrieve and manage campaigns — the sequences of lessons and triggers
    delivered to contacts.
  version: 1.0.0
servers:
  - url: https://{subdomain}.conveyour.com
    description: Your organization's ConveYour instance
    variables:
      subdomain:
        default: acme
        description: >-
          Your organization's slug — the subdomain you sign in on. Replace
          `acme` with yours: if you sign in at `bigco.conveyour.com`, enter
          `bigco`.
security:
  - conveyourToken: []
tags:
  - name: Campaigns
    description: >-
      Retrieve and manage campaigns — the sequences of lessons and triggers
      delivered to contacts.
paths:
  /api/campaigns:
    get:
      tags:
        - Campaigns
      summary: List campaigns
      description: >-
        Returns campaigns for the org along with supporting metadata. The `data`
        object is richer than a flat array — it includes `results` (the campaign
        list), `schemas` (field schemas per campaign type), `types` (campaign
        type labels), and `allowed_triggers` (trigger type availability).
        Iterate `data.results` for the campaign list.


        List all campaigns


        **Permission:** requires `campaigns`.
      operationId: listAllCampaigns
      parameters:
        - $ref: '#/components/parameters/teams'
        - name: created_after
          in: query
          required: false
          description: Only return records created at or after this Unix timestamp.
          schema:
            type: integer
        - name: created_before
          in: query
          required: false
          description: Only return records created at or before this Unix timestamp.
          schema:
            type: integer
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Envelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/CampaignIndex'
              example:
                status: ok
                message: success
                data:
                  results:
                    - id: 64a1b2c3d4e5f6a7b8c9d0e1
                      name: New Hire Onboarding
                      status: active
                  schemas: {}
                  types: {}
                  allowed_triggers: {}
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    teams:
      name: teams[]
      in: query
      description: >-
        Team scope for the request, as one or more team ObjectIds. The brackets
        are required: PHP keeps only the last value for a repeated plain key, so
        `teams=A&teams=B` silently resolves to B alone. On requests with a JSON
        body you may send `teams` (no brackets) in the body instead.


        **Values that are not valid ObjectIds are silently ignored** — a
        mistyped team ID behaves as if no team was sent. See the [teams section
        of the API conventions guide](/guides/api-conventions#team-scoping).
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
      example:
        - 64a1b2c3d4e5f6a7b8c9d0ff
  schemas:
    Envelope:
      type: object
      description: The common response envelope shared by all ConveYour endpoints.
      properties:
        status:
          type: string
          enum:
            - ok
            - failed
          description: '`ok` on success, `failed` on error.'
        message:
          type: string
          description: Human-readable description of the result.
        data:
          description: >-
            The response payload — an object or an array depending on the
            endpoint.
    CampaignIndex:
      type: object
      description: >-
        The campaign list returns a composite object, not a bare array: the
        matching campaigns plus the type catalogue and per-type field schemas
        used to build the editor.
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/Campaign'
          description: Matching campaigns.
        schemas:
          type: object
          description: Field schema per campaign type, keyed by type id.
          additionalProperties:
            type: object
        types:
          type: object
          description: Campaign types, keyed by type id.
          additionalProperties:
            type: object
            properties:
              group:
                type: string
                description: Type group; falls back to 'Built in!'.
              name:
                type: string
                description: Human-readable type name.
              doc:
                type: string
                description: Documentation slug; empty when not declared.
      required:
        - results
        - schemas
    Campaign:
      type: object
      description: >-
        A campaign. Campaigns build on the base trigger fields, and each
        campaign type declares further fields of its own. Verified against a
        live GET /api/campaigns response.
      properties:
        id:
          type: string
          description: Campaign ID.
        org_id:
          type: integer
          description: Owning organization.
        user_id:
          type: integer
          description: Owner.
        name:
          type: string
          description: Campaign name.
        type:
          type: string
          description: Campaign type, which determines the extra fields present.
        bookmark:
          type: object
          description: Audience bookmark. Required on create.
        bookmark_id:
          type: string
          description: Audience bookmark ID.
        banner_img:
          type: string
          description: Banner image.
        display_img:
          type: string
          description: Display image.
        button_text:
          type: string
          description: Call-to-action text.
        billing:
          type: object
          description: >-
            Billing configuration. Only ever observed as null on the test org —
            type unverified.
        days:
          type: array
          description: Schedule days.
        default:
          type: boolean
          description: Whether this is the org's default campaign.
        contact_fields:
          type: array
          description: Contact fields surfaced in the campaign.
        activity_user_ids:
          type: array
          description: Users receiving activity notifications.
        avoid_contact_updates:
          type: boolean
          description: Whether contact updates are suppressed.
        confirm_form:
          type: string
          description: Confirmation form.
        confirm_response:
          type: string
          description: Confirmation response text.
        confirm_email_subject:
          type: string
          description: Confirmation email subject.
        confirm_email_response:
          type: string
          description: Confirmation email body.
        created_at:
          type: integer
          description: Unix timestamp.
        updated_at:
          type: integer
          description: Unix timestamp.
      required:
        - name
        - bookmark
      additionalProperties:
        description: >-
          Fields declared by the specific campaign type (drip, QA, workflow and
          so on).
  responses:
    Forbidden:
      description: >-
        The token is missing or invalid, or the service account behind it lacks
        the permission this endpoint requires.
      content:
        application/json:
          example:
            status: failed
            message: Lacking necessary permission add_contacts
            data:
              permission: add_contacts
  securitySchemes:
    conveyourToken:
      type: apiKey
      in: header
      name: x-conveyour-token
      description: >-
        Your API key token. Contacts endpoints require a **Server-only — Full
        API** key — see [Authentication](/quickstart).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.