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

# Enable campaign

> Enable message dispatch for a campaign. If the campaign is in draft status, this transitions it to active. If paused, this resumes sending according to the configured schedule. The campaign must have at least one lead, one linked account, and a valid sequence. See [Update sequence](#tag/campaigns/PUT/campaigns/{campaignId}/sequence) and [Add leads](#tag/campaigns/POST/campaigns/{campaignId}/leads).



## OpenAPI

````yaml post /campaigns/{campaignId}/enable
openapi: 3.1.1
info:
  title: Inbox API
  version: 1.0.0
  description: >+

    The Inbox API gives you full access to manage the following entities in your
    team:

    - **Threads**: DM conversations on X

    - **Account links**: X accounts connected to your team

    - **Members**: users who can access the team

    - **Prospects**: external profiles on X

    - **Tags**: labels for prospects

    - **Statuses**: pipeline statuses for prospects

    - **Lists**: collections of leads with custom columns and import jobs

    - **Campaigns**: automated multi-step DM sequences


    ## A quick note on IDs

    Inbox stores two types of IDs for objects that relate to X:

    - `id` — The Inbox ID, which is the ID of the Inbox object

    - `platformId` — The original X 'platform' ID, which is the ID of the X
    user, conversation, etc.


    Throughout the API, you'll see instances where multiple IDs are present.
    `platformId` is always the original X ID.


    ## Helpful X URLs


    You can use platform IDs to construct direct links to X:


    - **User profile**: `https://x.com/i/user/{platformId}` — This is the most
    reliable way to link to a user since it uses their immutable ID rather than
    their username, which can change.

    - **User by username**: `https://x.com/{username}` — Note that usernames can
    change, so this link may break if the user updates their handle.

    - **Tweet/Post**: `https://x.com/anyusername/status/{tweetId}` — The
    username in the URL is ignored by X; only the tweet ID matters. You can use
    any string in place of the username and the link will still work.

    - **DM conversation**: `https://x.com/i/chat/{conversationPlatformId}` — The
    conversation ID is formatted as `{smallerUserId}:{largerUserId}`, where the
    two participant user IDs are sorted numerically (smaller ID first).


    ## Encoding objects and arrays in query params


    Inbox's API uses bracket notation to denote objects and arrays.


    ### Objects

    For an endpoint that accepts a `cursor` parameter for instance, with the
    cursor object being

    ```json

    {
      id: "l44e15irdq4db30i77cgphhx",
      timestamp: "2025-11-10T18:03:16.000Z"
    }

    ```


    The URL search params would be encoded as:

    ```txt

    ?cursor[id]=l44e15irdq4db30i77cgphhx&cursor[timestamp]=2025-11-10T18:03:16.000Z

    ```


    ### Arrays

    For an endpoint that accepts an `ids` parameter for instance, with the value
    being

    ```json

    ["1", "2", "3"]

    ```


    there are three options:

    1. Repeat the parameter for each value:

    ```txt

    ?ids=1&ids=2&ids=3

    ```

    2. Append `[]` to explicitly denote an array (useful if there's only one
    value):

    ```txt

    ?ids[]=1&ids[]=2&ids[]=3

    ```

    3. Append `[number]` to denote the array index. This option is the most
    flexible and allows for reordering and skipping values:

    ```txt

    ?ids[0]=1&ids[1]=2&ids[2]=3

    ```

  summary: >-
    The Inbox API gives you full access to manage the following entities in your
    team.
servers:
  - url: https://inboxapp.com/api/v1
security: []
tags:
  - name: Teams
    description: >-
      Teams are shared workspace for members to view and manage account links,
      tags, statuses, campaigns, conversations, and more.
  - name: Threads
    description: >-

      Threads represent conversations between an account linked to your team and
      a prospect on Twitter.
                  
  - name: Messages
    description: |-

      Messages are the individual messages sent in a thread.
                  
  - name: Account Links
    description: |-

      Account links represent X accounts connected to your team.
                  
  - name: Members
    description: |-

      Members are Inbox users who can access the team.
                  
  - name: Prospects
    description: |-

      Prospects represent external profiles on X.
                  
  - name: Tags
    description: |-

      Tags are labels for prospects.
                  
  - name: Statuses
    description: >-

      Statuses are used to track the deal stage or any fixed state for a
      prospect.
                  
  - name: Colors
    description: >-

      Get predefined color options that can be used when creating or updating
      tags and statuses.
                  
  - name: Lists
    description: >-
      Lists are collections of leads that you can organize, filter, and use as
      targeting sources for campaigns.
  - name: List columns
    description: >-
      Custom columns defined on a list. Each column stores a text value per lead
      and can be used as merge variables in campaign messages.
  - name: Leads
    description: >-
      Leads are prospects that belong to a list. Each lead has the full prospect
      profile, CRM context (tags, status, notes), and list-specific custom
      column data.
  - name: Import jobs
    description: >-
      Import jobs populate lists from various sources including CSV files, X
      followers, tweet engagements, and X lists. Poll the job status endpoint to
      track progress.
  - name: Campaigns
    description: >-
      Campaigns are automated multi-step DM sequences sent to leads via your
      linked X accounts.


      A campaign pulls its leads from your existing lists using **lead rules** —
      attach lists to automatically sync leads into the campaign, and optionally
      exclude lists (e.g. a "Do Not Contact" list) to avoid messaging certain
      people. Leads can also be added directly or imported in bulk.


      Each campaign has a **sequence** of steps — messages, delays, and tweet
      interactions — that run for every lead. Messages support variables for
      personalization: use the built-in `first-name` variable or create **custom
      columns** on the campaign to store per-lead data like company name or
      role.


      **Automations** let you trigger actions when certain events occur, such as
      applying a tag or setting a status when a prospect replies.


      Configure a sending schedule and hourly message rate, then enable the
      campaign to start sending.
paths:
  /campaigns/{campaignId}/enable:
    post:
      tags:
        - Campaigns
      summary: Enable campaign
      description: >-
        Enable message dispatch for a campaign. If the campaign is in draft
        status, this transitions it to active. If paused, this resumes sending
        according to the configured schedule. The campaign must have at least
        one lead, one linked account, and a valid sequence. See [Update
        sequence](#tag/campaigns/PUT/campaigns/{campaignId}/sequence) and [Add
        leads](#tag/campaigns/POST/campaigns/{campaignId}/leads).
      operationId: campaigns.campaign.enable
      parameters:
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-z]+$
            description: The ID of the campaign to enable
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties: {}
              required: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
components:
  schemas:
    Campaign:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-z]+$
          description: Unique identifier for the campaign
          examples:
            - usdjpdql3f90seqk13rwuo7z
        name:
          type: string
          description: Display name of the campaign
          examples:
            - Q1 DM outreach
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Optional description for the campaign
          examples:
            - Targeting SaaS founders from the import list
        status:
          enum:
            - draft
            - active
            - paused
            - completed
          description: Current lifecycle status of the campaign.
          examples:
            - paused
        enabled:
          type: boolean
          description: >-
            Whether the campaign is enabled for sending. Enabling a draft
            campaign transitions it to active. Disabling any campaign
            transitions it to paused.
          examples:
            - true
        dryRun:
          type: boolean
          description: >-
            When true, the campaign simulates sending without delivering real
            messages. This flag is managed internally and cannot be set through
            the API.
          examples:
            - false
        targetsCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Total number of leads in scope for this campaign
          examples:
            - 1200
        contactedCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Number of leads that have been contacted so far
          examples:
            - 340
        repliesCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: Number of leads that replied to a campaign message
          examples:
            - 42
        completionRate:
          type: number
          description: >-
            Fraction of targeted leads that have fully completed their sequence
            (0-1)
          examples:
            - 0.28
        replyRate:
          type: number
          description: >-
            Fraction of contacted leads that replied (0-1). Zero when no leads
            have been contacted.
          examples:
            - 0.12
        hourlyMessageRate:
          type: integer
          minimum: 1
          maximum: 25
          description: Messages to send per hour per linked account
          examples:
            - 8
        scheduleTimezone:
          type: string
          description: IANA timezone used for the sending schedule windows
          examples:
            - America/New_York
        scheduleHours:
          type: object
          propertyNames:
            enum:
              - '0'
              - '1'
              - '2'
              - '3'
              - '4'
              - '5'
              - '6'
          additionalProperties:
            type: object
            properties:
              start:
                type: number
                minimum: 0
                maximum: 1439
                description: >-
                  Start minute of the day (0–1439). For example, 9:00 AM = 540
                  (9 × 60), 12:00 PM = 720 (12 × 60).
                examples:
                  - 540
              end:
                type: number
                minimum: 0
                maximum: 1439
                description: >-
                  End minute of the day (0–1439). For example, 9:00 PM = 1260
                  (21 × 60), 5:00 PM = 1020 (17 × 60).
                examples:
                  - 1260
            required:
              - start
              - end
          description: >-
            Sending windows per day of week where key 0 is Sunday and values are
            minute-of-day start/end ranges
          examples:
            - '1':
                start: 540
                end: 1020
              '2':
                start: 540
                end: 1020
              '3':
                start: 540
                end: 1020
              '4':
                start: 540
                end: 1020
              '5':
                start: 540
                end: 1020
        isBuildingPlan:
          type: boolean
          description: >-
            True while the campaign is rebalancing lead assignments across
            sending accounts. This runs automatically in the background and does
            not block sending or any other operations.
          examples:
            - false
        isSyncing:
          type: boolean
          description: >-
            True while the campaign is updating its lead list based on the
            current rules. This runs automatically in the background after rule
            changes.
          examples:
            - false
        scopeAssessedCount:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: >-
            Number of leads that have been assessed for eligibility. If this
            number is less than `targetsCount`, some leads are still being
            evaluated for reachability and the target count may increase. Once
            `scopeAssessedCount` equals `targetsCount`, the final scope of the
            campaign is known.
          examples:
            - 1150
        accountLinkIds:
          type: array
          items:
            type: string
            pattern: ^[0-9a-z]+$
          description: IDs of linked accounts used to send campaign messages
          examples:
            - - r4t9vw15jm6bn3yxcf2dq8ek
        rules:
          type: object
          properties:
            syncedLists:
              type: array
              items:
                type: object
                properties:
                  listId:
                    type: string
                    pattern: ^[0-9a-z]+$
                    description: The ID of the source list.
                    examples:
                      - l44e15irdq4db30i77cgphhx
                  listName:
                    type: string
                    description: The display name of the source list.
                    examples:
                      - Hot Leads Q1
                  columnMapping:
                    anyOf:
                      - type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: string
                      - type: 'null'
                    description: >-
                      Mapping of source list column IDs to campaign column IDs.
                      Only applies to custom columns — profile data (username,
                      followers, etc.) is synced automatically. Null if no
                      custom column mapping is configured.
                    examples:
                      - custom_q5cktl47a6pqa74eu06fz89v: custom_m8r2xj93hd5bk0atcw7oe4fp
                required:
                  - listId
                  - listName
                  - columnMapping
              description: Lists whose leads are automatically synced into the campaign.
            excludedLists:
              type: array
              items:
                type: object
                properties:
                  listId:
                    type: string
                    pattern: ^[0-9a-z]+$
                    description: The ID of the excluded list.
                    examples:
                      - l44e15irdq4db30i77cgphhx
                  listName:
                    type: string
                    description: The display name of the excluded list.
                    examples:
                      - Do Not Contact
                required:
                  - listId
                  - listName
              description: >-
                User-created lists whose leads are excluded from the campaign.
                Does not include system lists — see excludeContacted and
                excludeMutuals.
            excludeContacted:
              type: boolean
              description: >-
                When true, leads you've already sent a direct message to are
                excluded from the campaign. Under the hood, this excludes the
                Contacted system list, which Inbox automatically maintains
                across all linked accounts.
              examples:
                - false
            excludeMutuals:
              type: boolean
              description: >-
                When true, leads with a mutual conversation (at least one
                message sent and received) are excluded from the campaign. Under
                the hood, this excludes the Mutual system list, which Inbox
                automatically maintains across all linked accounts.
              examples:
                - false
          required:
            - syncedLists
            - excludedLists
            - excludeContacted
            - excludeMutuals
          description: >-
            Lead rules controlling which lists feed leads into the campaign and
            which lists are excluded.
        sequence:
          type: object
          properties:
            version:
              type: number
              description: The current version number of the sequence.
              examples:
                - 2
            steps:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for this step within the sequence.
                    examples:
                      - w3x4y5z6a7b8c9d0e1f2g3h4
                  rank:
                    type: number
                    description: Zero-based position of this step in the sequence.
                    examples:
                      - 0
                  type:
                    enum:
                      - message
                      - delay
                      - likeTweet
                    description: The type of step.
                    examples:
                      - message
                  data:
                    anyOf:
                      - type: object
                        properties:
                          segments:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  properties:
                                    type:
                                      const: static
                                    text:
                                      type: string
                                      description: >-
                                        The literal text to insert. Use static
                                        segments for fixed content and
                                        whitespace between other segments. If
                                        you want to randomize phrasing, use a
                                        variation segment instead.
                                  required:
                                    - type
                                    - text
                                  title: Static text
                                - type: object
                                  properties:
                                    type:
                                      const: variable
                                    name:
                                      type: string
                                      description: >-
                                        The variable name to substitute. Use
                                        'first-name' to insert the prospect's
                                        first name, which is automatically
                                        extracted from their profile using AI.
                                        For any other variables, create a custom
                                        column on the campaign and use its
                                        column ID here (e.g.
                                        'custom_q5cktl47a6pqa74eu06fz89v'). The
                                        column must already exist on the
                                        campaign.
                                      examples:
                                        - first-name
                                    fallback:
                                      type: string
                                      description: >-
                                        Fallback text used when the variable has
                                        no value for a given prospect. If
                                        omitted and the value is empty, nothing
                                        is inserted and any trailing whitespace
                                        from the preceding segment is trimmed.
                                        For example, [{ type: "static", text:
                                        "Hey " }, { type: "variable", name:
                                        "first-name" }, { type: "static", text:
                                        "," }] with no value and no fallback
                                        produces "Hey," — the trailing space in
                                        "Hey " is removed.
                                      examples:
                                        - there
                                  required:
                                    - type
                                    - name
                                  title: Variable
                                - type: object
                                  properties:
                                    type:
                                      const: variation
                                    options:
                                      type: array
                                      items:
                                        type: string
                                      description: >-
                                        A list of variants to insert into the
                                        message. One option is chosen at random
                                        every time the message is constructed.
                                      examples:
                                        - - Hey
                                          - Hello
                                          - How's it going
                                  required:
                                    - type
                                    - options
                                  title: Variation
                            description: >-
                              Ordered array of segments that are concatenated
                              directly without any whitespace or separators. To
                              include spaces between segments, use a static
                              segment with a space character (e.g. { type:
                              'static', text: ' ' }).
                        required:
                          - segments
                      - type: object
                        properties:
                          delaySeconds:
                            type: number
                            description: >-
                              The exact number of seconds to wait before
                              proceeding to the next step. This is the actual
                              delay used by the system. For example, 86400 = 1
                              day, 604800 = 7 days.
                            examples:
                              - 604800
                          unit:
                            enum:
                              - minutes
                              - hours
                              - days
                            description: >-
                              Display hint for the UI only. Does not affect the
                              actual delay, which is always determined by
                              delaySeconds. The unit simply controls how the
                              delay is presented to users in the dashboard.
                        required:
                          - delaySeconds
                          - unit
                      - type: object
                        properties:
                          maxTweets:
                            type: integer
                            minimum: 1
                            maximum: 5
                            default: 1
                            description: >-
                              Maximum number of the prospect's recent tweets to
                              like. Only tweets that haven't already been liked
                              by the sender account are considered. If fewer
                              unliked tweets are available than requested, only
                              those are liked and the step continues normally.
                              For example, if a prospect has 3 tweets total and
                              a previous step already liked 1, requesting 4 here
                              will only like the remaining 2.
                            examples:
                              - 3
                    description: >-
                      Step configuration data. Structure depends on the step
                      type.
                required:
                  - id
                  - rank
                  - type
                  - data
              description: Ordered list of steps in the current sequence.
              examples:
                - - id: w3x4y5z6a7b8c9d0e1f2g3h4
                    rank: 0
                    type: message
                    data:
                      segments:
                        - type: static
                          text: 'Hey '
                        - type: variable
                          name: first-name
                          fallback: there
                        - type: static
                          text: >-
                            , I noticed you're building in the SaaS space. Would
                            love to connect and share some ideas — open to a
                            quick chat?
                  - id: a1b2c3d4e5f6g7h8i9j0k1l2
                    rank: 1
                    type: delay
                    data:
                      delaySeconds: 86400
                      unit: days
                  - id: m3n4o5p6q7r8s9t0u1v2w3x4
                    rank: 2
                    type: message
                    data:
                      segments:
                        - type: static
                          text: >-
                            Hey, just following up on my last message — would
                            love to hear your thoughts if you have a moment!
          required:
            - version
            - steps
          description: The current message sequence — the ordered steps sent to each lead.
        automations:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9a-z]+$
                description: Unique identifier for the automation.
                examples:
                  - j7k8l9m0n1o2p3q4r5s6t7u8
              trigger:
                const: prospectFirstReply
                description: >-
                  The event that triggers this automation. Currently only
                  'prospectFirstReply' is supported — fires when a prospect
                  replies to the campaign for the first time.
                examples:
                  - prospectFirstReply
              action:
                enum:
                  - setStatus
                  - setTags
                description: >-
                  The action to perform when the trigger fires. 'setStatus'
                  assigns a status to the prospect, 'setTags' applies tags.
                examples:
                  - setStatus
              actionData:
                anyOf:
                  - type: object
                    properties:
                      statusId:
                        type: string
                        pattern: ^[0-9a-z]+$
                        description: The status ID to assign to the prospect.
                        examples:
                          - m3n4o5p6q7r8s9t0u1v2w3x4
                    required:
                      - statusId
                  - type: object
                    properties:
                      tagIds:
                        type: array
                        items:
                          type: string
                          pattern: ^[0-9a-z]+$
                        description: Array of tag IDs to apply to the prospect.
                        examples:
                          - - a1b2c3d4e5f6g7h8i9j0k1l2
                    required:
                      - tagIds
                description: >-
                  Configuration data for the action. Structure depends on the
                  action type: statusId for setStatus, tagIds for setTags.
              enabled:
                type: boolean
                description: Whether the automation is currently active.
                examples:
                  - true
            required:
              - id
              - trigger
              - action
              - actionData
              - enabled
          description: >-
            Automations that trigger actions on certain events, such as setting
            a status when a prospect replies.
        createdAt:
          type: string
          format: date-time
          x-native-type: date
          description: When the campaign was created
          examples:
            - '2025-06-01T12:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          x-native-type: date
          description: When the campaign was last modified
          examples:
            - '2025-06-02T09:30:00.000Z'
        pausedAt:
          anyOf:
            - type: string
              format: date-time
              x-native-type: date
            - type: 'null'
          description: When the campaign was last paused, or null if never paused
          examples:
            - '2025-06-05T16:00:00.000Z'
        completedAt:
          anyOf:
            - type: string
              format: date-time
              x-native-type: date
            - type: 'null'
          description: >-
            When the campaign finished processing all targets, or null if still
            running
          examples:
            - null
        lastStartedAt:
          anyOf:
            - type: string
              format: date-time
              x-native-type: date
            - type: 'null'
          description: >-
            When the campaign was most recently started or resumed, or null if
            never started
          examples:
            - '2025-06-03T09:00:00.000Z'
      required:
        - id
        - name
        - description
        - status
        - enabled
        - dryRun
        - targetsCount
        - contactedCount
        - repliesCount
        - completionRate
        - replyRate
        - hourlyMessageRate
        - scheduleTimezone
        - scheduleHours
        - isBuildingPlan
        - isSyncing
        - scopeAssessedCount
        - accountLinkIds
        - rules
        - sequence
        - automations
        - createdAt
        - updatedAt
        - pausedAt
        - completedAt
        - lastStartedAt

````