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

# Update Campaign

> Updates the editable fields of an existing campaign. `id`, `name`, `userStyleId`, `userContextId`, `postMaxAgeDays`, `skipTeammatesLeads`, `isIndirectEngagementEnabled` are required (full replace). Backend types `TARGET_USER` and `KEYWORD` correspond to user-facing 'Prospects campaign' and 'Topic campaign' respectively.

**`KEYWORD` campaigns: only `name` is editable.** The backend rejects with `INVALID_ARGUMENT: This campaign can't be updated` whenever any of `skipTeammatesLeads`, `applyCommentIntervalH`, `isIndirectEngagementEnabled`, `connectingSettings.isSendConnectionRequestEnabled`, or `dmSettings.isGenerateDmEnabled` differs from the current value (or is missing while the current value is set).



## OpenAPI

````yaml https://api.goextrovert.com/client/v2/docs-json patch /client/v2/campaign/{id}
openapi: 3.0.0
info:
  title: Extrovert Client API
  description: >-
    Public API for Extrovert platform integration. Use your API key for
    authentication.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.goextrovert.com/
    description: API Server
security: []
tags: []
paths:
  /client/v2/campaign/{id}:
    patch:
      tags:
        - Campaigns
      summary: Update Campaign
      description: >-
        Updates the editable fields of an existing campaign. `id`, `name`,
        `userStyleId`, `userContextId`, `postMaxAgeDays`, `skipTeammatesLeads`,
        `isIndirectEngagementEnabled` are required (full replace). Backend types
        `TARGET_USER` and `KEYWORD` correspond to user-facing 'Prospects
        campaign' and 'Topic campaign' respectively.


        **`KEYWORD` campaigns: only `name` is editable.** The backend rejects
        with `INVALID_ARGUMENT: This campaign can't be updated` whenever any of
        `skipTeammatesLeads`, `applyCommentIntervalH`,
        `isIndirectEngagementEnabled`,
        `connectingSettings.isSendConnectionRequestEnabled`, or
        `dmSettings.isGenerateDmEnabled` differs from the current value (or is
        missing while the current value is set).
      operationId: CampaignClientApiController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateResponseDto'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientApiErrorResponseDto'
      security:
        - api-key: []
components:
  schemas:
    UpdateRequestDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Campaign id to update.
        name:
          type: string
          minLength: 1
          description: Updated display name.
        userStyleId:
          type: string
          format: uuid
          description: >-
            Style id the campaign should use after the update. Always required —
            the backend treats omission as 'remove' and rejects active
            campaigns.
        userContextId:
          type: string
          format: uuid
          description: >-
            Context id the campaign should use after the update. Always required
            — the backend treats omission as 'remove' and rejects active
            campaigns.
        postMaxAgeDays:
          type: integer
          exclusiveMinimum: true
          maximum: 9007199254740991
          description: >-
            Legacy field, ignored at runtime. Required by the validator — pass
            the campaign's current value (or `30`) unchanged.
          minimum: 0
        skipTeammatesLeads:
          type: boolean
          description: >-
            If `true`, skip prospects that are already in teammates' campaigns
            in the same team — avoids double outreach to the same person.
        isIndirectEngagementEnabled:
          type: boolean
          description: >-
            Indirect engagement feature. If `true`, Extrovert also pulls
            indirect posts — posts from the people the prospect engages with
            most frequently (content the prospect is likely to see in their own
            feed) — so the campaign can comment on them too. Useful for reaching
            prospects who rarely post themselves.
        applyCommentIntervalH:
          type: integer
          description: >-
            Optional: minimum gap in hours between automated comments (spreads
            approved comments over time so engagement feels natural). Stored in
            hours but the UI only exposes whole-day choices — pass a multiple of
            24 (24, 48, or 72). Omit to keep the feature off.
          exclusiveMinimum: true
          maximum: 9007199254740991
          minimum: 0
        postActivityFilter:
          type: object
          description: >-
            Optional updated postActivityFilter. For `KEYWORD` (Topic), pass
            only `sortBy=postedDate`, `postDate`, `emotionTypes`, an empty
            `monitoredTopicIds` array, and optional `minPostLikes`; omit every
            `prospect*` field and Prospects-only display-order field.
          properties:
            sortBy:
              type: string
              enum:
                - postedDate
                - targetUserName
                - noSort
              description: >-
                Legacy field — ignored at runtime. Posts in the approval feed
                are always sorted by post date regardless of the value passed.
                Pass `postedDate`.
            postDate:
              type: string
              enum:
                - NEWER_THAN_1_DAY
                - NEWER_THAN_2_DAYS
                - NEWER_THAN_3_DAYS
                - NEWER_THAN_4_DAYS
                - NEWER_THAN_5_DAYS
                - NEWER_THAN_6_DAYS
                - NEWER_THAN_1_WEEK
                - NEWER_THAN_2_WEEKS
                - NEWER_THAN_3_WEEKS
                - NEWER_THAN_4_WEEKS
              description: Show only posts within this age window.
            emotionTypes:
              type: array
              items:
                type: string
                enum:
                  - THOUGHT_LEADERSHIP
                  - BUSINESS_ISSUES
                  - COMPANY_NEWS_OR_ACHIEVEMENTS
                  - OFFLINE_EVENTS
                  - ONLINE_EVENTS
                  - SOCIAL_ISSUES
                  - OWN_PRODUCT_PROMOTION
                  - JOB_RELATED
                  - PERSONAL_LIFE_BLOG
                  - POLITICS
                  - COMMENT_X_TO_GET_Y
                  - EXTRA_SENSITIVE
                  - OTHER
              description: >-
                Show only posts whose AI-detected type matches one of these
                values. Pass an empty array to include all types.
            monitoredTopicIds:
              type: array
              items:
                type: string
                format: uuid
              description: >-
                Show only posts that match at least one of these Monitored Topic
                ids. Applies to `TARGET_USER` campaigns only — must be empty for
                `KEYWORD`.
            prospectLastCommentedTime:
              description: >-
                Optional: hide posts from prospects you already commented on
                within this time window. Applies to `TARGET_USER` (Prospects)
                campaigns only — omit it for `KEYWORD` (Topic) campaigns; the
                backend rejects it there.
              type: string
              enum:
                - MORE_THAN_1_DAY_AGO
                - MORE_THAN_3_DAYS_AGO
                - MORE_THAN_1_WEEK_AGO
                - MORE_THAN_2_WEEKS_AGO
                - MORE_THAN_3_WEEKS_AGO
                - MORE_THAN_1_MONTH_AGO
                - MORE_THAN_2_MONTHS_AGO
            prospectNumberOfTouchPoints:
              description: >-
                Optional: show only posts whose author you've already commented
                on this many times. Applies to `TARGET_USER` (Prospects)
                campaigns only — omit it for `KEYWORD` (Topic) campaigns; the
                backend rejects it there.
              type: string
              enum:
                - COMMENTED_1_TIME
                - COMMENTED_2_TIMES
                - COMMENTED_3_TIMES
                - COMMENTED_4_TIMES
                - COMMENTED_5_TIMES
                - COMMENTED_6_TIMES
            postsNumberPerProspect:
              description: >-
                Optional: cap how many posts per prospect appear in the feed.
                Applies to `TARGET_USER` (Prospects) campaigns only — omit it
                for `KEYWORD` (Topic) campaigns; the backend rejects it there.
              type: string
              enum:
                - MAX_1_POST
                - MAX_2_POSTS
                - MAX_3_POSTS
                - MAX_4_POSTS
                - MAX_5_POSTS
            isShowImportantTargetUsersFirstEnabled:
              description: >-
                Show posts from prospects marked as important at the top of the
                feed.
              type: boolean
            isShowDirectPostFirstEnabled:
              description: >-
                Show direct posts (written by the prospect themselves) above
                indirect posts (posts from people the prospect engages with —
                content the prospect is likely to see in their own feed).
              type: boolean
            minPostLikes:
              description: >-
                Optional: show only posts that have at least this many likes
                (1–50). Applies to `KEYWORD` campaigns only — omit it for
                `TARGET_USER` campaigns (the backend rejects it with
                `INVALID_ARGUMENT: This campaign can't be updated`). Omit to
                disable the filter.
              type: integer
              minimum: 1
              maximum: 50
        connectingSettings:
          type: object
          description: Optional updated connection-request settings.
          properties:
            isSendConnectionRequestEnabled:
              type: boolean
              description: >-
                Master switch: enable automatic connection requests from this
                campaign. When `false`, no connection requests are sent
                regardless of the trigger flags below.
            sendConnectionRequestOnDirectCommentCount:
              description: >-
                Direct-comment trigger: send a connection request once the user
                has commented this many times under the prospect's own posts.
              type: integer
              exclusiveMinimum: true
              maximum: 9007199254740991
              minimum: 0
            isSendConnectionRequestOnIndirectCommentEnabled:
              description: >-
                Enable the indirect-comment trigger: also count comments left
                under indirect posts (posts from people the prospect engages
                with — content the prospect is likely to see in their own feed)
                toward a connection request. Requires the indirect-engagement
                feature (`isIndirectEngagementEnabled`) to be on.
              type: boolean
            sendConnectionRequestOnIndirectCommentCount:
              description: >-
                Number of comments under indirect posts needed to trigger a
                connection request.
              type: integer
              exclusiveMinimum: true
              maximum: 9007199254740991
              minimum: 0
            isSendConnectionRequestOnTimeoutEnabled:
              description: >-
                Enable the timeout trigger: send a connection request after the
                prospect has been in the campaign for N days even if no other
                trigger has fired.
              type: boolean
            sendConnectionRequestOnTimeoutDays:
              description: >-
                Number of days in the campaign before the timeout
                connection-request trigger fires.
              type: integer
              exclusiveMinimum: true
              maximum: 9007199254740991
              minimum: 0
            isSendConnectionRequestOnNoPostsEnabled:
              description: >-
                Send a connection request immediately when there is nothing to
                comment on. If the indirect-engagement feature
                (`isIndirectEngagementEnabled`) and the indirect-comment trigger
                are both on, this fires only when the prospect has no direct
                posts AND no indirect posts (no point waiting for comments when
                there's nothing to comment under). Otherwise it fires when the
                prospect has no direct posts.
              type: boolean
        dmSettings:
          type: object
          description: Optional updated DM-generation settings.
          properties:
            isGenerateDmEnabled:
              type: boolean
              description: >-
                Master switch: enable automatic DM drafting for this campaign.
                When `false`, no DMs are suggested regardless of the trigger
                flags below.
            isGenerateDmOnConnectEnabled:
              description: >-
                Enable the on-connect trigger: suggest a first DM once the
                prospect accepts the connection request.
              type: boolean
            generateDmOnConnectAfterDaysCount:
              description: >-
                Number of days to wait after the prospect accepts the connection
                before suggesting the first DM.
              type: integer
              exclusiveMinimum: true
              maximum: 9007199254740991
              minimum: 0
            isGenerateDmOnRelevantPostEnabled:
              description: >-
                Enable the relevant-post trigger: suggest a follow-up DM
                whenever the prospect posts something referenceable (e.g. an
                event they attended, a fact about them — not generic thought
                leadership). The trigger fires on post discovery; commenting on
                the post is not required.
              type: boolean
            generateDmOnRelevantPostAfterDaysCount:
              description: >-
                Minimum number of days that must pass since the last message in
                the DM thread before the relevant-post trigger is allowed to
                fire. Prevents over-messaging the same prospect when they post
                frequently.
              type: integer
              exclusiveMinimum: true
              maximum: 9007199254740991
              minimum: 0
            isGenerateDmOnTimeoutEnabled:
              description: >-
                Enable the timeout trigger: suggest a follow-up DM after N days
                of silence in the conversation, regardless of other triggers.
              type: boolean
            generateDmOnTimeoutAfterDaysCount:
              description: Number of days of silence before the timeout DM trigger fires.
              type: integer
              exclusiveMinimum: true
              maximum: 9007199254740991
              minimum: 0
      required:
        - id
        - name
        - userStyleId
        - userContextId
        - postMaxAgeDays
        - skipTeammatesLeads
        - isIndirectEngagementEnabled
        - postActivityFilter
        - connectingSettings
        - dmSettings
    UpdateResponseDto:
      type: object
      properties:
        status:
          type: string
          description: Response status
          enum:
            - success
        data:
          description: No response payload
          nullable: true
          enum:
            - null
          example: null
        message:
          type: string
          description: Success message
          example: Operation completed successfully
      required:
        - status
        - data
        - message
    ClientApiErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          description: Response status
          example: error
          enum:
            - error
        data:
          type: object
          description: Response data
          example: null
        message:
          type: string
          description: Error message
          example: An error occurred while processing the request
      required:
        - status
        - data
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key for authentication

````