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

# Change campaign settings

> Changes senders, steps, schedule or language on a campaign that is not running. Send the revision from Get campaign settings and only the fields you change.

Permission: `campaigns:configure`

[Read the recovery rules](https://docs.emailx.ai/en/api-reference/idempotency.md) before retrying a write. Keep the same key and body for the same logical operation.


## OpenAPI

````yaml openapi/emailx.en.json PATCH /workspaces/{workspace_id}/campaigns/{channel}/{campaign_id}/configuration
openapi: 3.0.3
info:
  title: Emailx API
  version: 1.0.0-beta
  description: >-
    Customer and agency integrations for Emailx. Beta access is operator-issued.
    The v1 beta supports bounded People CSV/XLSX imports, saved email-template
    settings, selected email generation with explicit AI-credit confirmation,
    exact-message approval, reviewed email activation for native scheduled
    sending, and explicitly confirmed inbox replies bound to saved context when
    host capabilities permit. Inbox context is bounded and may be incomplete or
    stale; no provider refresh occurs. Manual LinkedIn imports, reviewed
    activation and reviewed resume of paused campaigns are separate gated
    workflows. Reply drafts, knowledge, team, infrastructure quotes with hosted
    checkout and agency administration are covered by separate scopes. Signed
    webhooks report durable operation outcomes. It does not support immediate
    batches or direct card charges.
servers:
  - url: https://app.emailx.ai/api/v1
    description: Emailx application · access must be enabled
security: []
tags:
  - name: Getting started
  - name: Workspaces
  - name: Contacts
  - name: Templates
  - name: Campaigns
  - name: Inbox
  - name: Senders
  - name: Team
  - name: Analytics
  - name: Imports
  - name: Operations
  - name: Knowledge
  - name: Infrastructure
  - name: Agency
paths:
  /workspaces/{workspace_id}/campaigns/{channel}/{campaign_id}/configuration:
    patch:
      tags:
        - Set up a campaign
      summary: Change campaign settings
      description: >-
        Changes senders, steps, schedule or language on a campaign that is not
        running. Send the revision from Get campaign settings and only the
        fields you change.


        Permission: `campaigns:configure`
      operationId: configure_api_campaign
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: Emailx workspace (Clients) ID, not the agency workspace link ID.
        - name: channel
          in: path
          required: true
          schema:
            type: string
            enum:
              - email
              - linkedin
          description: Resource identifier.
        - name: campaign_id
          in: path
          required: true
          schema:
            type: integer
            minimum: 1
          description: Resource identifier.
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 128
            pattern: ^[A-Za-z0-9_.:/-]+$
          description: Unique per logical mutation. Same path and body replay for 24 hours.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaignConfiguration'
            example:
              expected_revision: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
              sender_ids:
                - 903
      responses:
        '200':
          description: Success
          headers:
            X-Request-Id:
              schema:
                type: string
            Emailx-Api-Version:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: string
            X-RateLimit-Remaining:
              schema:
                type: string
            X-RateLimit-Reset:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CampaignConfiguration'
                required:
                  - data
              example:
                data:
                  id: 456
                  workspace_id: 123
                  channel: linkedin
                  name: Example Studio outreach
                  campaign_status: draft
                  sender_ids: []
                  revision: >-
                    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  steps: []
                  schedule:
                    timezone: Europe/Rome
                    active_days:
                      - Mon
                      - Tue
                      - Wed
                      - Thu
                      - Fri
                    time_start: '09:00'
                    time_end: '17:00'
                    daily_connection_limit: 20
                    daily_message_limit: 40
                  reply_owner_subclient_id: null
                  reply_routing: sender
                  language: English
                  audience: null
                  sender_context: null
                  lead_source: manual
                  ai_autopilot_enabled: false
                  editable: true
                  edit_blockers: []
                  approval_status: not_evaluated
                  activation_status: not_requested
        '400':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid, expired or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope or write permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource missing or inaccessible
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict, concurrent request or uncertain original result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait when present.
        '413':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '415':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; respect Retry-After
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait when present.
        '500':
          description: Request error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: API disabled, request storage unavailable or feature not enabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            Retry-After:
              schema:
                type: string
              description: Seconds to wait when present.
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: cURL
          source: >-
            curl -X PATCH
            "https://app.emailx.ai/api/v1/workspaces/123/campaigns/linkedin/456/configuration"
            \
              -H "Authorization: Bearer $EMAILX_API_KEY" \
              -H "Content-Type: application/json" \
              -H "Idempotency-Key: example-operation-001" \
              --data '{"expected_revision":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","sender_ids":[903]}'
        - lang: Python
          source: |-
            import os, requests

            response = requests.patch(
                "https://app.emailx.ai/api/v1/workspaces/123/campaigns/linkedin/456/configuration",
                headers={"Authorization": "Bearer " + os.environ["EMAILX_API_KEY"], "Idempotency-Key": "example-operation-001"},
                json={'expected_revision': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'sender_ids': [903]},
                timeout=30,
            )
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          source: >-
            const response = await
            fetch("https://app.emailx.ai/api/v1/workspaces/123/campaigns/linkedin/456/configuration",
            {
              method: "PATCH",
              headers: { Authorization: `Bearer ${process.env.EMAILX_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "example-operation-001" },
              body: JSON.stringify({"expected_revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sender_ids": [903]}),
              signal: AbortSignal.timeout(30000),
            });

            if (!response.ok) throw new Error(`Emailx: ${response.status}`);

            console.log(await response.json());
components:
  schemas:
    UpdateCampaignConfiguration:
      type: object
      properties:
        expected_revision:
          type: string
          pattern: ^[a-f0-9]{64}$
        name:
          type: string
          minLength: 1
          maxLength: 255
        sender_ids:
          type: array
          items:
            type: integer
            minimum: 1
          maxItems: 100
          uniqueItems: true
        reply_owner_subclient_id:
          type: integer
          minimum: 1
          nullable: true
        reply_routing:
          type: string
          enum:
            - person
            - sender
        language:
          type: string
          minLength: 1
          maxLength: 50
        audience:
          type: string
          nullable: true
          maxLength: 10000
        sender_context:
          type: string
          nullable: true
          maxLength: 10000
        schedule:
          oneOf:
            - $ref: '#/components/schemas/EmailConfigurationSchedule'
            - $ref: '#/components/schemas/LinkedinConfigurationSchedule'
        steps:
          anyOf:
            - type: array
              items:
                type: object
                properties:
                  id:
                    type: integer
                    minimum: 1
                  label:
                    type: string
                    minLength: 1
                    maxLength: 255
                  template_id:
                    type: integer
                    minimum: 1
                  wait_days:
                    type: integer
                    minimum: 0
                    maximum: 90
                required:
                  - template_id
                  - wait_days
                additionalProperties: false
              maxItems: 10
            - type: array
              items:
                type: object
                properties:
                  id:
                    type: integer
                    minimum: 1
                  label:
                    type: string
                    minLength: 1
                    maxLength: 255
                  type:
                    type: string
                    enum:
                      - connection_request
                      - message
                  message:
                    type: string
                    nullable: true
                    maxLength: 8000
                  wait_days:
                    type: integer
                    minimum: 0
                    maximum: 14
                required:
                  - type
                  - wait_days
                additionalProperties: false
              minItems: 1
              maxItems: 6
      required:
        - expected_revision
      minProperties: 2
      additionalProperties: false
    CampaignConfiguration:
      type: object
      properties:
        id:
          type: integer
          minimum: 1
        workspace_id:
          type: integer
          minimum: 1
        channel:
          type: string
          enum:
            - email
            - linkedin
        name:
          type: string
        campaign_status:
          type: string
        sender_ids:
          type: array
          items:
            type: integer
            minimum: 1
        revision:
          type: string
          pattern: ^[a-f0-9]{64}$
        steps:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                minimum: 1
              label:
                type: string
              template_id:
                type: integer
                minimum: 1
                nullable: true
              type:
                type: string
                nullable: true
              message:
                type: string
                nullable: true
              wait_days:
                type: integer
              has_attachments:
                type: boolean
            required:
              - id
              - label
              - wait_days
        schedule:
          type: object
          properties:
            timezone:
              type: string
              minLength: 1
              maxLength: 100
            active_days:
              type: array
              items:
                type: string
                enum:
                  - Mon
                  - Tue
                  - Wed
                  - Thu
                  - Fri
                  - Sat
                  - Sun
              minItems: 1
              maxItems: 7
              uniqueItems: true
            time_start:
              type: string
              pattern: ^(?:[01][0-9]|2[0-3]):[0-5][0-9]$
            time_end:
              type: string
              pattern: ^(?:[01][0-9]|2[0-3]):[0-5][0-9]$
            daily_volume_per_mailbox:
              type: integer
              nullable: true
            initial_wait_days:
              type: integer
              nullable: true
            daily_connection_limit:
              type: integer
              nullable: true
            daily_message_limit:
              type: integer
              nullable: true
          required:
            - timezone
            - active_days
            - time_start
            - time_end
        reply_owner_subclient_id:
          type: integer
          minimum: 1
          nullable: true
        reply_routing:
          type: string
          nullable: true
        language:
          type: string
          nullable: true
        audience:
          type: string
          nullable: true
        sender_context:
          type: string
          nullable: true
        contact_ids:
          type: array
          items:
            type: integer
            minimum: 1
        lead_source:
          type: string
          nullable: true
        ai_autopilot_enabled:
          type: boolean
        editable:
          type: boolean
        edit_blockers:
          type: array
          items:
            type: string
        approval_status:
          type: string
          enum:
            - not_evaluated
        activation_status:
          type: string
          enum:
            - not_requested
      required:
        - id
        - workspace_id
        - channel
        - name
        - campaign_status
        - sender_ids
        - revision
        - steps
        - schedule
        - reply_owner_subclient_id
        - reply_routing
        - editable
        - edit_blockers
        - approval_status
        - activation_status
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
            - request_id
      required:
        - error
    EmailConfigurationSchedule:
      type: object
      properties:
        timezone:
          type: string
          minLength: 1
          maxLength: 100
        active_days:
          type: array
          items:
            type: string
            enum:
              - Mon
              - Tue
              - Wed
              - Thu
              - Fri
              - Sat
              - Sun
          minItems: 1
          maxItems: 7
          uniqueItems: true
        time_start:
          type: string
          pattern: ^(?:[01][0-9]|2[0-3]):[0-5][0-9]$
        time_end:
          type: string
          pattern: ^(?:[01][0-9]|2[0-3]):[0-5][0-9]$
        daily_volume_per_mailbox:
          type: integer
          minimum: 1
          maximum: 100
        initial_wait_days:
          type: integer
          minimum: 0
          maximum: 90
      required:
        - timezone
        - active_days
        - time_start
        - time_end
        - daily_volume_per_mailbox
        - initial_wait_days
      additionalProperties: false
    LinkedinConfigurationSchedule:
      type: object
      properties:
        timezone:
          type: string
          minLength: 1
          maxLength: 100
        active_days:
          type: array
          items:
            type: string
            enum:
              - Mon
              - Tue
              - Wed
              - Thu
              - Fri
              - Sat
              - Sun
          minItems: 1
          maxItems: 7
          uniqueItems: true
        time_start:
          type: string
          pattern: ^(?:[01][0-9]|2[0-3]):[0-5][0-9]$
        time_end:
          type: string
          pattern: ^(?:[01][0-9]|2[0-3]):[0-5][0-9]$
        daily_connection_limit:
          type: integer
          minimum: 1
          maximum: 30
        daily_message_limit:
          type: integer
          minimum: 1
          maximum: 100
      required:
        - timezone
        - active_days
        - time_start
        - time_end
        - daily_connection_limit
        - daily_message_limit
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        ex_test_ or ex_live_ key issued by an Emailx operator. Never use
        provider keys or session cookies.

````

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