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

# Change a campaign's name, sender pools, send windows, daily email cap, stop-on-reply, start or end. Works until archived; existing conversations keep their assigned sender

> Change a campaign's name, sender pools, send windows, daily email cap, stop-on-reply, start or end. Works until archived; existing conversations keep their assigned sender.



## OpenAPI

````yaml /api-reference/openapi.json patch /campaigns/{sequenceId}
openapi: 3.1.0
info:
  title: Dench API
  version: 1.0.0
  description: >-
    Versioned Dench workspace API. The operation registry is shared with the
    Dench CLI parity layer, so every CLI command maps to an endpoint here.
servers:
  - url: https://www.dench.com/api/v1
security: []
tags:
  - name: agent-config
    description: Agent Config operations.
  - name: apps
    description: Apps operations.
  - name: auth
    description: Auth operations.
  - name: billing
    description: Billing operations.
  - name: browser
    description: Browser operations.
  - name: campaigns
    description: Campaigns operations.
  - name: chat
    description: Chat operations.
  - name: crm
    description: Crm operations.
  - name: email
    description: Email operations.
  - name: environments
    description: Environments operations.
  - name: files
    description: Files operations.
  - name: gateway
    description: Gateway operations.
  - name: lists
    description: Lists operations.
  - name: local
    description: Local operations.
  - name: meetings
    description: Meetings operations.
  - name: members
    description: Members operations.
  - name: memory
    description: Memory operations.
  - name: meta
    description: Meta operations.
  - name: notifications
    description: Notifications operations.
  - name: routines
    description: Routines operations.
  - name: secrets
    description: Secrets operations.
  - name: settings
    description: Settings operations.
  - name: workspace
    description: Workspace operations.
paths:
  /campaigns/{sequenceId}:
    patch:
      tags:
        - campaigns
      summary: >-
        Change a campaign's name, sender pools, send windows, daily email cap,
        stop-on-reply, start or end. Works until archived; existing
        conversations keep their assigned sender
      description: >-
        Change a campaign's name, sender pools, send windows, daily email cap,
        stop-on-reply, start or end. Works until archived; existing
        conversations keep their assigned sender.
      operationId: campaigns_update
      parameters:
        - name: sequenceId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                emailMailboxAccountIds:
                  description: >-
                    Campaign email sender pool: up to 50 emailMailboxAccounts
                    ids both you and the campaign owner may use. Omit to
                    preserve existing configuration; [] clears the pool. A
                    person's sender stays fixed for their conversation. Launch
                    validates sender availability.
                  maxItems: 50
                  type: array
                  items:
                    type: string
                    minLength: 1
                linkedinAccountIds:
                  description: >-
                    Campaign LinkedIn sender pool: up to 50 linkedinAccounts ids
                    both you and the campaign owner may use. Omit to preserve
                    existing configuration; [] clears the pool. Legacy step
                    senders remain until a pool is configured.
                  maxItems: 50
                  type: array
                  items:
                    type: string
                    minLength: 1
                stopOnReply:
                  description: Stop a person's remaining steps when they reply.
                  type: boolean
                startsAt:
                  description: Epoch ms; null clears the start.
                  anyOf:
                    - type: number
                    - type: 'null'
                endsAt:
                  description: Epoch ms; null clears the end.
                  anyOf:
                    - type: number
                    - type: 'null'
                sendSchedules:
                  minItems: 1
                  maxItems: 8
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Label, e.g. "Mon-Fri 9-18".
                      timezone:
                        type: string
                        description: IANA timezone, e.g. America/Los_Angeles.
                      startHour:
                        type: integer
                        minimum: 0
                        maximum: 23
                        description: First hour sends may go out (0-23).
                      endHour:
                        type: integer
                        minimum: 1
                        maximum: 24
                        description: Hour sends stop (1-24); must be after startHour.
                      weekdays:
                        minItems: 1
                        type: array
                        items:
                          type: integer
                          minimum: 0
                          maximum: 6
                        description: 'Days sends may go out: 0 = Sunday ... 6 = Saturday.'
                    required:
                      - name
                      - timezone
                      - startHour
                      - endHour
                      - weekdays
                    additionalProperties: false
                    description: >-
                      One send window. A campaign has one to eight; the first
                      one's timezone is the campaign's.
                timezone:
                  description: Legacy single-window timezone. Prefer sendSchedules.
                  type: string
                sendWindowStartHour:
                  description: Legacy single-window start hour. Prefer sendSchedules.
                  type: integer
                  minimum: 0
                  maximum: 23
                sendWindowEndHour:
                  description: Legacy single-window end hour. Prefer sendSchedules.
                  type: integer
                  minimum: 1
                  maximum: 24
                sendWeekdays:
                  description: >-
                    Legacy single-window weekdays, 0 = Sunday. Prefer
                    sendSchedules.
                  minItems: 1
                  type: array
                  items:
                    type: integer
                    minimum: 0
                    maximum: 6
                dailySendCap:
                  description: Cold emails per day, 1-100.
                  type: integer
                  minimum: 1
                  maximum: 100
            example:
              sequenceId: <sequenceId>
              emailMailboxAccountIds:
                - <emailMailboxAccountId>
              linkedinAccountIds:
                - <linkedinAccountId>
              dailySendCap: 30
              sendSchedules:
                - name: Mon-Fri 9-18
                  timezone: America/Los_Angeles
                  startHour: 9
                  endHour: 18
                  weekdays:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                required:
                  - ok
                additionalProperties: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - DenchApiKey: []
        - AgentSession: []
components:
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Operation or resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
            - code
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
            details: {}
  securitySchemes:
    DenchApiKey:
      type: http
      scheme: bearer
      bearerFormat: DENCH_API_KEY
      description: >-
        Workspace-scoped Dench API key from workspace settings. This is the same
        key used by DENCH_API_KEY in sandboxes.
    AgentSession:
      type: http
      scheme: bearer
      bearerFormat: dch_agent_*
      description: >-
        Agent session token created by `dench signin`. Gateway-backed routes
        exchange this token for the workspace gateway key.

````

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