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

# Update Outbound

> Patch campaign fields and optionally upsert the full sequence. Field-level rules depend on campaign status.

**CLI:**

```bash theme={null}
puffle campaign update --id <id>
puffle campaign update --id <id> --name <name> --operating-hours <operating-hours> --operating-hours <operating-hours> --daily-limit <daily-limit> --daily-limit <daily-limit> --skip-other-campaigns --stop-on-reply --open-tracking --signature <signature> --sender-account-ids <sender-account-ids> --sequence-nodes <sequence-nodes> --account-limits <account-limits>
```

## Overview

A partial update — only fields present in the body are applied. Most **draft-only** fields (type-specific settings, sequence, sender set) are silently ignored on active/paused/completed campaigns. A few fields work on any status: `name`, `operating_hours`, and (email) `daily_limit`.

## Allowed fields by status

| Field                                                   | Draft | Active                   | Paused  |
| ------------------------------------------------------- | ----- | ------------------------ | ------- |
| `name`                                                  | ✅     | ✅                        | ✅       |
| `operating_hours`                                       | ✅     | ✅ (wakes sleeping leads) | ✅       |
| `daily_limit` (email)                                   | ✅     | ✅                        | ✅       |
| `account_limits` (email)                                | ✅     | ✅                        | ✅       |
| `skip_other_campaigns` (LinkedIn)                       | ✅     | ignored                  | ignored |
| `stop_on_reply` / `open_tracking` / `signature` (email) | ✅     | ignored                  | ignored |
| `sender_account_ids`                                    | ✅     | ignored                  | ignored |
| `sequence_nodes`                                        | ✅     | ignored                  | ignored |

## AI agent notes

<Note>
  **Sequence upsert semantics.** When `sequence_nodes` is provided (draft only), the server replaces the entire sequence. Positions are normalized to match array order — don't try to set your own `position` values. Include every node you want to keep, including `end`.

  **Operating-hours tweak on active campaigns.** Changing `operating_hours` while `status === "active"` triggers an immediate wake-up of any leads currently sleeping on old-schedule waitpoints. They re-check the fresh schedule and resume or re-sleep as appropriate. Safe to call, but expect a burst of send activity within \~30 s of the update.

  **Delay validation.** Delay nodes must total ≥ 1 minute and ≤ 30 days across `delay_days + delay_hours + delay_minutes`. The server validates before any writes, so invalid delays fail cleanly with 400 and no partial state.
</Note>


## OpenAPI

````yaml patch /api/campaigns/{id}
openapi: 3.0.3
info:
  title: Puffle API
  version: 1.0.0
  description: >-
    HTTP API for the Puffle GTM platform - Feed and Lead Finder search
    preparation, campaign-backed Outbound execution, Puffle Agent runs, sender
    management, and Unibox reply workflows. Designed for operation by both
    humans and autonomous AI agents. Agents should start at the [Agent
    Playbook](/guides/agent-playbook) which prescribes a workspace-context check
    (`GET /api/context`) and core user journeys with exact call ordering.
  contact:
    name: Puffle Support
    url: https://puffle.ai
servers:
  - url: https://app.puffle.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Campaigns
    description: >-
      Campaign-backed Outbound execution. These endpoints manage draft,
      launching, active, paused, and completed Outbound runs with sequence
      nodes, contacts, and sender accounts.
  - name: Accounts
    description: Signed-in user account, settings, and workspace context endpoints.
  - name: Billing
    description: Billing customer portal and account billing endpoints.
  - name: Senders
    description: >-
      Connected sender accounts, email inboxes, sending domains, DNS
      verification, warmup, and sender capacity.
  - name: Socials
    description: >-
      Read connected LinkedIn and X accounts, review current and archived posts,
      and reconcile publication status. Creating, editing, scheduling,
      publishing, OAuth connection, analytics, and mentions remain
      dashboard-managed workflows and are not part of the public Bearer-token
      API.
paths:
  /api/campaigns/{id}:
    patch:
      tags:
        - Campaigns
      summary: Update Outbound
      description: >-
        Partial update of outbound fields, including name, daily limit,
        operating hours, senders, and optional sequence upsert. Draft outbounds
        accept more edits than active ones.
      operationId: updateCampaign
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Campaign UUID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                operating_hours:
                  type: object
                  additionalProperties: {}
                  nullable: true
                operatingHours:
                  type: object
                  additionalProperties: {}
                  nullable: true
                daily_limit:
                  type: integer
                  minimum: 1
                  maximum: 500
                dailyLimit:
                  type: integer
                  minimum: 1
                  maximum: 500
                skip_other_campaigns:
                  type: boolean
                stop_on_reply:
                  type: boolean
                open_tracking:
                  type: boolean
                signature:
                  type: string
                  nullable: true
                sender_account_ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                sequence_nodes:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      type:
                        type: string
                        enum:
                          - connection_request
                          - message
                          - email
                          - delay
                          - ai
                          - end
                      position:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      subject:
                        type: string
                        nullable: true
                      body:
                        type: string
                        nullable: true
                      signature:
                        type: string
                        nullable: true
                      include_message:
                        type: boolean
                        nullable: true
                      is_reply:
                        type: boolean
                        nullable: true
                      delay_days:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        nullable: true
                      delay_hours:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        nullable: true
                      delay_minutes:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                        nullable: true
                    required:
                      - type
                    additionalProperties: {}
                account_limits:
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: string
                        format: uuid
                      daily_limit:
                        type: integer
                        minimum: 1
                        maximum: 30
                    required:
                      - account_id
                      - daily_limit
                    additionalProperties: false
              additionalProperties: {}
      responses:
        '200':
          description: Campaign updated. Returns the full campaign and sequence.
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaign:
                    type: object
                    properties:
                      id:
                        type: string
                        description: String value with endpoint-specific validation.
                      user_id:
                        type: string
                        description: String value with endpoint-specific validation.
                      type:
                        type: string
                        enum:
                          - linkedin
                          - email
                          - multi_channel
                        description: >-
                          Channel mode for this campaign. Immutable after
                          creation.
                      name:
                        type: string
                      status:
                        type: string
                        enum:
                          - draft
                          - launching
                          - active
                          - paused
                          - completed
                        description: >-
                          Lifecycle state. `draft` is editable; `launching` is
                          transitional; `active` is sending; `paused` halts
                          sends until resumed; `completed` is terminal.
                      daily_limit:
                        type: integer
                        exclusiveMinimum: true
                        maximum: 9007199254740991
                        nullable: true
                        minimum: 0
                      stop_on_reply:
                        type: boolean
                        nullable: true
                      open_tracking:
                        type: boolean
                        nullable: true
                      signature:
                        type: string
                        nullable: true
                      skip_other_campaigns:
                        type: boolean
                        nullable: true
                      operating_hours:
                        type: object
                        additionalProperties: {}
                        nullable: true
                      stats:
                        type: object
                        properties:
                          total:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          sent:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          replied:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          bounced:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          completed:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          timed_out:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          connection_sent:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          connected:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          message_sent:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        additionalProperties: false
                        description: >-
                          Counters updated atomically as leads progress. `total`
                          is set at launch; the rest increment.
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      sender_accounts:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: String value with endpoint-specific validation.
                            type:
                              type: string
                              enum:
                                - linkedin
                                - email
                                - multi_channel
                              description: >-
                                Channel mode for this campaign. Immutable after
                                creation.
                            email_address:
                              type: string
                              nullable: true
                            provider_account_id:
                              type: string
                              nullable: true
                            display_name:
                              type: string
                              nullable: true
                            first_name:
                              type: string
                              nullable: true
                            last_name:
                              type: string
                              nullable: true
                            status:
                              type: string
                            daily_limit:
                              type: integer
                              exclusiveMinimum: true
                              maximum: 9007199254740991
                              nullable: true
                              minimum: 0
                            is_default_sender:
                              type: boolean
                            weekly_connection_limit:
                              type: integer
                              exclusiveMinimum: true
                              maximum: 9007199254740991
                              nullable: true
                              minimum: 0
                            weekly_message_limit:
                              type: integer
                              exclusiveMinimum: true
                              maximum: 9007199254740991
                              nullable: true
                              minimum: 0
                            is_premium:
                              type: boolean
                              nullable: true
                          required:
                            - id
                            - type
                            - email_address
                            - provider_account_id
                            - display_name
                            - status
                          additionalProperties: false
                    required:
                      - id
                      - user_id
                      - type
                      - name
                      - status
                      - daily_limit
                      - stop_on_reply
                      - open_tracking
                      - signature
                      - skip_other_campaigns
                      - operating_hours
                      - stats
                      - created_at
                      - updated_at
                      - sender_accounts
                    additionalProperties: false
                    description: Canonical campaign entity.
                  sequence_nodes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: String value with endpoint-specific validation.
                        campaign_id:
                          type: string
                          description: String value with endpoint-specific validation.
                        position:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        type:
                          type: string
                          enum:
                            - connection_request
                            - message
                            - email
                            - delay
                            - ai
                            - end
                        subject:
                          type: string
                          nullable: true
                        body:
                          type: string
                          nullable: true
                        signature:
                          type: string
                          nullable: true
                        include_message:
                          type: boolean
                          nullable: true
                        is_reply:
                          type: boolean
                          nullable: true
                        delay_days:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                          nullable: true
                        delay_hours:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                          nullable: true
                        delay_minutes:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                          nullable: true
                        ai_node:
                          type: object
                          properties:
                            output_type:
                              type: string
                              enum:
                                - email
                                - message
                          required:
                            - output_type
                          additionalProperties: {}
                          nullable: true
                      required:
                        - id
                        - campaign_id
                        - position
                        - type
                      additionalProperties: false
                      description: >-
                        One node in the campaign sequence. `position` is
                        0-indexed.
                required:
                  - campaign
                  - sequence_nodes
                additionalProperties: false
        '400':
          description: Validation failure for campaign update fields.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: >-
            Account limits or sender assignments reference unauthorized sender
            accounts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Campaign doesn't exist or isn't owned by the caller.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Rename collides with another campaign.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pk_live_...

````