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

# Get campaign sequence

> The campaign sequence (steps and branches) as configured in the editor. Branching steps expose their conditions — e.g. connected vs. not connected, invitation accepted vs. expired, replied vs. not replied. Use the `format` query parameter to choose the representation.



## OpenAPI

````yaml /openapi.json get /v1/campaigns/{id}/sequence
openapi: 3.0.0
info:
  title: Botdog API
  description: |-
    API documentation for Botdog.

    **Authentication**: Pass your API key as the `x-api-key` header.
    Example: `x-api-key: bd_live_abc123`

    Do NOT use the `Authorization` header.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.botdog.co
    description: Production
security: []
tags:
  - name: campaigns
    description: >-
      Create, read, update, and control campaigns (pause/resume, pause
      activities, archive, delete).
  - name: leads
    description: >-
      List and filter leads, read full detail + event history, update metadata,
      add to a campaign, or stop a sequence.
  - name: lists
    description: Manage lead/audience lists and their members.
  - name: blacklist
    description: Manage suppression lists (excluded profiles).
  - name: snippets
    description: Manage message snippets / templates.
  - name: accounts
    description: >-
      Connected LinkedIn accounts (seats), their connection health, and daily
      sending limits.
  - name: webhooks
    description: Manage webhook subscriptions.
  - name: messaging
    description: >-
      Send messages and replies, schedule a future send, and mark conversations
      read/unread. Rate-limited per sending account.
  - name: analytics
    description: Team-level analytics totals, daily breakdowns, and per-user metrics.
  - name: users
    description: Read the users in your team.
  - name: teams
    description: Current team context.
  - name: health
    description: Service health checks (no authentication).
paths:
  /v1/campaigns/{id}/sequence:
    get:
      tags:
        - campaigns
      summary: Get campaign sequence
      description: >-
        The campaign sequence (steps and branches) as configured in the editor.
        Branching steps expose their conditions — e.g. connected vs. not
        connected, invitation accepted vs. expired, replied vs. not replied. Use
        the `format` query parameter to choose the representation.
      operationId: CampaignsController_getSequence
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: format
          required: false
          in: query
          description: >-
            Response shape: `graph` (default, faithful/lossless), `tree` (nested
            branches), `readable` (human outline), or `all`.
          schema:
            type: string
            default: graph
            enum:
              - graph
              - tree
              - readable
              - all
      responses:
        '200':
          description: The campaign sequence in the requested format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignSequenceResponseDto'
        '401':
          description: Unauthorized. API key is missing or invalid.
        '404':
          description: Campaign not found
        '429':
          description: Rate limit exceeded. Retry after cooldown.
      security:
        - api-key: []
components:
  schemas:
    CampaignSequenceResponseDto:
      type: object
      properties:
        campaignId:
          type: string
          description: The id of the campaign this sequence belongs to
          example: 123e4567-e89b-12d3-a456-426614174000
        editorViewType:
          type: string
          description: Which editor produced the campaign
          example: ADVANCED
          enum:
            - SIMPLE
            - ADVANCED
        source:
          type: string
          description: >-
            Where the sequence was read from: `workflow` (modern), `legacy` (old
            linear sequences), or `empty` (no sequence yet).
          example: workflow
          enum:
            - workflow
            - legacy
            - empty
        firstStep:
          type: number
          nullable: true
          description: Id of the first step to run, or null when there is no sequence
          example: 1
        steps:
          type: array
          description: Present when format is `graph` or `all`
          items:
            $ref: '#/components/schemas/SequenceGraphNodeDto'
        tree:
          type: object
          nullable: true
          description: >-
            Present when format is `tree` or `all`. Nested step tree rooted at
            the first step; null for an empty sequence.
          additionalProperties: true
        readable:
          type: array
          description: >-
            Present when format is `readable` or `all`. One line per
            step/branch.
          items:
            type: string
          example:
            - Step 1 · Send invitation (start)
            - '    → then step 2 (Wait for invitation response)'
      required:
        - campaignId
        - editorViewType
        - source
    SequenceGraphNodeDto:
      type: object
      properties:
        id:
          type: number
          description: Stable numeric id of the step
          example: 2
        stepType:
          type: string
          description: Step type
          example: WAIT_FOR_INVITATION_RESPONSE
        label:
          type: string
          description: Human-readable label for the step type
          example: Wait for invitation response
        metadata:
          type: object
          description: Step configuration (message text, wait duration, etc.)
          additionalProperties: true
        next:
          type: number
          nullable: true
          description: >-
            Next step id for a linear step, or null to end this branch. Present
            only on non-branching steps.
          example: 3
        choice:
          type: object
          description: >-
            Branch map for a conditional step: outcome -> next step id (null
            ends the branch). Present only on branching steps.
          additionalProperties:
            type: number
            nullable: true
          example:
            invitation_accepted: 3
            expired: null
      required:
        - id
        - stepType
        - label
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key
      x-default: bd_live_your_key_here

````