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

# Author the campaign sequence

> **Destructive.** It sends, publishes, launches or deletes. Get a person to confirm before calling it.

Replace a campaign's sequence with the steps you describe. This is how you write a campaign: give an ordered list of steps and the graph is compiled, validated and saved.

Each step is one action — CONNECT, MESSAGE, EMAIL, INMAILS, ENGAGEMENT, FOLLOW, WITHDRAW, QUALIFIER, GPT, ASSIGN_TAG, TASK … — with a `delay` measured from the previous step. A TRIGGER step branches on a condition (If_Replied, If_Connected, If_Email_Opened, …); it must be the last entry in its list, and the steps that follow go under `yes` or `no`. An omitted branch simply ends there.

On a campaign that is already ACTIVE this is DESTRUCTIVE: leads are re-evaluated against the new graph, some are moved to different steps, and pending actions can be cancelled or rescheduled. `flow_audit` reports exactly what moved. On a DRAFTED campaign nothing is at stake.

Call `reference` with topic "sequence_steps" first if you are unsure which fields a step type needs.



## OpenAPI

````yaml /api-v2/openapi.json post /flow_set
openapi: 3.1.0
info:
  title: LinkedCamp API
  version: 2.0.0
  description: >-
    Version 2 of the LinkedCamp API. Every endpoint is a POST to `/{endpoint}`
    with its arguments as a JSON object, and returns JSON.
servers:
  - url: https://api.linkedcamp.com/v2
security:
  - ApiKey: []
  - Bearer: []
tags:
  - name: Account
  - name: Notifications
  - name: Reference
  - name: Campaigns
  - name: Campaign audience
  - name: Sequences
  - name: Blocked dates
  - name: Leads
  - name: Lead notes
  - name: Activities
  - name: Tags
  - name: Blacklist
  - name: Conversations
  - name: Messages
  - name: Saved replies
  - name: Templates
  - name: Merge fields
  - name: Personalised images
  - name: LinkedIn accounts
  - name: Email accounts
  - name: AI agents
  - name: Knowledge base
  - name: Personas
  - name: Analytics
  - name: Posts
  - name: Posting schedule
  - name: Tasks
  - name: Appointments
  - name: Reminders
  - name: Automations
paths:
  /flow_set:
    post:
      tags:
        - Sequences
      summary: Author the campaign sequence
      description: >-
        **Destructive.** It sends, publishes, launches or deletes. Get a person
        to confirm before calling it.


        Replace a campaign's sequence with the steps you describe. This is how
        you write a campaign: give an ordered list of steps and the graph is
        compiled, validated and saved.


        Each step is one action — CONNECT, MESSAGE, EMAIL, INMAILS, ENGAGEMENT,
        FOLLOW, WITHDRAW, QUALIFIER, GPT, ASSIGN_TAG, TASK … — with a `delay`
        measured from the previous step. A TRIGGER step branches on a condition
        (If_Replied, If_Connected, If_Email_Opened, …); it must be the last
        entry in its list, and the steps that follow go under `yes` or `no`. An
        omitted branch simply ends there.


        On a campaign that is already ACTIVE this is DESTRUCTIVE: leads are
        re-evaluated against the new graph, some are moved to different steps,
        and pending actions can be cancelled or rescheduled. `flow_audit`
        reports exactly what moved. On a DRAFTED campaign nothing is at stake.


        Call `reference` with topic "sequence_steps" first if you are unsure
        which fields a step type needs.
      operationId: flow_set
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                campaignId:
                  type: string
                  description: Campaign id, from `campaign_list` or `campaign_create`.
                steps:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - CONNECT
                          - MESSAGE
                          - INMAILS
                          - VOICE
                          - EMAIL
                          - ENGAGEMENT
                          - FOLLOW
                          - FOLLOW_COMPANY
                          - EVENT
                          - EVENT_MESSAGE
                          - GROUP_MESSAGE
                          - WITHDRAW
                          - TASK
                          - API
                          - GPT
                          - FINDER
                          - QUALIFIER
                          - SEND_TO_CAMPAIGN
                          - ASSIGN_TAG
                          - TRIGGER
                        description: >-
                          Step kind. LinkedIn: CONNECT, MESSAGE, INMAILS, VOICE,
                          ENGAGEMENT, FOLLOW, FOLLOW_COMPANY, EVENT,
                          EVENT_MESSAGE, GROUP_MESSAGE, WITHDRAW. Email: EMAIL.
                          Flow control: TRIGGER (branch), QUALIFIER (persona
                          gate), ASSIGN_TAG, SEND_TO_CAMPAIGN, TASK, API, GPT,
                          FINDER.
                      delay:
                        type: integer
                        minimum: 0
                        maximum: 365
                        description: >-
                          How long to wait AFTER the previous step before
                          running this one. Default 1 for actions, per-trigger
                          default for TRIGGER.
                      delayType:
                        type: string
                        enum:
                          - days
                          - hours
                          - minutes
                        description: Unit for `delay`. Default "days".
                      note:
                        type: string
                        maxLength: 300
                        description: >-
                          CONNECT only: the invitation note (LinkedIn caps this
                          at 300 characters, or 200 without Premium).
                      shortNote:
                        type: string
                        maxLength: 200
                        description: >-
                          CONNECT only: fallback note used when the account has
                          hit its long-note allowance.
                      subject:
                        type: string
                        description: 'EMAIL / INMAILS only: subject line.'
                      message:
                        type: string
                        description: >-
                          Body for MESSAGE, EMAIL, INMAILS, VOICE,
                          GROUP_MESSAGE, EVENT_MESSAGE. Supports
                          {{firstName}}-style merge fields.
                      connectWithoutMessage:
                        type: boolean
                        description: >-
                          CONNECT only: send a bare invitation with no note.
                          Higher accept rates, no personalisation.
                      useCredits:
                        type: boolean
                        description: >-
                          INMAILS only: spend InMail credits when the lead is
                          not Open Profile.
                      attachment:
                        type: object
                        properties:
                          url:
                            type: string
                            description: Publicly reachable URL of the file.
                          name:
                            type: string
                            description: >-
                              File name shown to the recipient, e.g.
                              "case-study.pdf".
                          type:
                            type: string
                            description: MIME type, e.g. "application/pdf".
                          size:
                            type: number
                            description: File size in bytes.
                        required:
                          - url
                        additionalProperties: false
                        description: >-
                          File to attach to the message. Must already be hosted
                          at a publicly reachable URL the platform can fetch.
                      abTestingEnabled:
                        type: boolean
                        description: >-
                          Split traffic between the A copy above and the B copy
                          below.
                      bNote:
                        type: string
                        maxLength: 300
                        description: Variant B invitation note.
                      bShortNote:
                        type: string
                        maxLength: 200
                        description: Variant B short-form invitation note.
                      bSubject:
                        type: string
                        description: Variant B subject.
                      bMessage:
                        type: string
                        description: Variant B body.
                      bConnectWithoutMessage:
                        type: boolean
                        description: Variant B sends a bare invitation with no note.
                      bAttachment:
                        type: object
                        properties:
                          url:
                            type: string
                            description: Publicly reachable URL of the file.
                          name:
                            type: string
                            description: >-
                              File name shown to the recipient, e.g.
                              "case-study.pdf".
                          type:
                            type: string
                            description: MIME type, e.g. "application/pdf".
                          size:
                            type: number
                            description: File size in bytes.
                        required:
                          - url
                        additionalProperties: false
                        description: >-
                          File to attach to the message. Must already be hosted
                          at a publicly reachable URL the platform can fetch.
                      postsToLike:
                        type: integer
                        minimum: 0
                        maximum: 10
                        description: 'ENGAGEMENT: how many recent posts to like.'
                      commentsToAdd:
                        type: integer
                        minimum: 0
                        maximum: 10
                        description: 'ENGAGEMENT: how many posts to comment on.'
                      skillsToEndorse:
                        type: integer
                        minimum: 0
                        maximum: 10
                        description: 'ENGAGEMENT: how many skills to endorse.'
                      followCompanyUrl:
                        type: string
                        description: >-
                          FOLLOW_COMPANY: the LinkedIn company page URL to
                          follow.
                      eventUrl:
                        type: string
                        description: 'EVENT: the LinkedIn event URL to invite the lead to.'
                      newCampaignId:
                        type: string
                        description: >-
                          SEND_TO_CAMPAIGN: id of the campaign to move the lead
                          into.
                      tagId:
                        type: string
                        description: 'ASSIGN_TAG: id of the tag to apply (see `tag_list`).'
                      tags:
                        type: array
                        items:
                          type: string
                        description: Tag ids to apply when this step completes.
                      provider:
                        type: string
                        enum:
                          - OPENAI
                          - ANTHROPIC
                          - GEMINI
                          - GROK
                          - DEEPSEEK
                        description: 'GPT step: which connected AI provider to call.'
                      model:
                        type: string
                        description: >-
                          GPT step: model id, e.g. "gpt-4o" or
                          "claude-sonnet-4-5".
                      instructions:
                        type: string
                        description: >-
                          GPT step: the prompt used to draft the personalised
                          opener.
                      personaId:
                        type: string
                        description: >-
                          QUALIFIER: id of the persona to score the lead against
                          (required).
                      mismatchAction:
                        type: string
                        enum:
                          - NONE
                          - TAG
                          - MARK_NOT_QUALIFIED
                          - REMOVE_FROM_CAMPAIGN
                        description: >-
                          QUALIFIER: what to do with a lead that fails the
                          persona. Default MARK_NOT_QUALIFIED.
                      mismatchTagIds:
                        type: array
                        items:
                          type: string
                        description: >-
                          QUALIFIER: tags applied on mismatch when
                          mismatchAction is TAG.
                      mismatchNext:
                        type: string
                        enum:
                          - CONTINUE
                          - STOP
                        description: >-
                          QUALIFIER: whether a mismatched lead continues down
                          the flow. Default STOP.
                      title:
                        type: string
                        description: 'TASK: title of the manual task created for your team.'
                      trigger:
                        type: string
                        enum:
                          - If_Replied
                          - If_Connected
                          - If_Interested
                          - If_InMail_Open
                          - If_Email_Exists
                          - If_Email_Opened
                          - If_Email_Bounced
                          - If_Link_Clicked
                          - If_Visited_Profile
                          - CUSTOM
                        description: >-
                          TRIGGER only: the condition to branch on. One of
                          If_Replied, If_Connected, If_Interested,
                          If_InMail_Open, If_Email_Exists, If_Email_Opened,
                          If_Email_Bounced, If_Link_Clicked, If_Visited_Profile,
                          CUSTOM.
                      prompt:
                        type: string
                        description: >-
                          TRIGGER with trigger="CUSTOM": the classification
                          prompt for the AI Decision Maker.
                      branches:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: >-
                                Branch label, and it is what the engine routes
                                on — use the exact value the trigger emits,
                                which `reference` lists. A label it does not
                                recognise silently never fires.
                            description:
                              type: string
                              description: >-
                                Note for whoever reads the sequence later. Not
                                shown to a prospect and it affects no routing.
                          required:
                            - name
                          additionalProperties: false
                        description: >-
                          TRIGGER with trigger="CUSTOM": the two branch labels
                          the model picks between.
                      'yes':
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - CONNECT
                                - MESSAGE
                                - INMAILS
                                - VOICE
                                - EMAIL
                                - ENGAGEMENT
                                - FOLLOW
                                - FOLLOW_COMPANY
                                - EVENT
                                - EVENT_MESSAGE
                                - GROUP_MESSAGE
                                - WITHDRAW
                                - TASK
                                - API
                                - GPT
                                - FINDER
                                - QUALIFIER
                                - SEND_TO_CAMPAIGN
                                - ASSIGN_TAG
                                - TRIGGER
                              description: >-
                                Step kind. LinkedIn: CONNECT, MESSAGE, INMAILS,
                                VOICE, ENGAGEMENT, FOLLOW, FOLLOW_COMPANY,
                                EVENT, EVENT_MESSAGE, GROUP_MESSAGE, WITHDRAW.
                                Email: EMAIL. Flow control: TRIGGER (branch),
                                QUALIFIER (persona gate), ASSIGN_TAG,
                                SEND_TO_CAMPAIGN, TASK, API, GPT, FINDER.
                            delay:
                              type: integer
                              minimum: 0
                              maximum: 365
                              description: >-
                                How long to wait AFTER the previous step before
                                running this one. Default 1 for actions,
                                per-trigger default for TRIGGER.
                            delayType:
                              type: string
                              enum:
                                - days
                                - hours
                                - minutes
                              description: Unit for `delay`. Default "days".
                            note:
                              type: string
                              maxLength: 300
                              description: >-
                                CONNECT only: the invitation note (LinkedIn caps
                                this at 300 characters, or 200 without Premium).
                            shortNote:
                              type: string
                              maxLength: 200
                              description: >-
                                CONNECT only: fallback note used when the
                                account has hit its long-note allowance.
                            subject:
                              type: string
                              description: 'EMAIL / INMAILS only: subject line.'
                            message:
                              type: string
                              description: >-
                                Body for MESSAGE, EMAIL, INMAILS, VOICE,
                                GROUP_MESSAGE, EVENT_MESSAGE. Supports
                                {{firstName}}-style merge fields.
                            connectWithoutMessage:
                              type: boolean
                              description: >-
                                CONNECT only: send a bare invitation with no
                                note. Higher accept rates, no personalisation.
                            useCredits:
                              type: boolean
                              description: >-
                                INMAILS only: spend InMail credits when the lead
                                is not Open Profile.
                            attachment:
                              type: object
                              properties:
                                url:
                                  type: string
                                  description: Publicly reachable URL of the file.
                                name:
                                  type: string
                                  description: >-
                                    File name shown to the recipient, e.g.
                                    "case-study.pdf".
                                type:
                                  type: string
                                  description: MIME type, e.g. "application/pdf".
                                size:
                                  type: number
                                  description: File size in bytes.
                              required:
                                - url
                              additionalProperties: false
                              description: >-
                                File to attach to the message. Must already be
                                hosted at a publicly reachable URL the platform
                                can fetch.
                            abTestingEnabled:
                              type: boolean
                              description: >-
                                Split traffic between the A copy above and the B
                                copy below.
                            bNote:
                              type: string
                              maxLength: 300
                              description: Variant B invitation note.
                            bShortNote:
                              type: string
                              maxLength: 200
                              description: Variant B short-form invitation note.
                            bSubject:
                              type: string
                              description: Variant B subject.
                            bMessage:
                              type: string
                              description: Variant B body.
                            bConnectWithoutMessage:
                              type: boolean
                              description: Variant B sends a bare invitation with no note.
                            bAttachment:
                              type: object
                              properties:
                                url:
                                  type: string
                                  description: Publicly reachable URL of the file.
                                name:
                                  type: string
                                  description: >-
                                    File name shown to the recipient, e.g.
                                    "case-study.pdf".
                                type:
                                  type: string
                                  description: MIME type, e.g. "application/pdf".
                                size:
                                  type: number
                                  description: File size in bytes.
                              required:
                                - url
                              additionalProperties: false
                              description: >-
                                File to attach to the message. Must already be
                                hosted at a publicly reachable URL the platform
                                can fetch.
                            postsToLike:
                              type: integer
                              minimum: 0
                              maximum: 10
                              description: 'ENGAGEMENT: how many recent posts to like.'
                            commentsToAdd:
                              type: integer
                              minimum: 0
                              maximum: 10
                              description: 'ENGAGEMENT: how many posts to comment on.'
                            skillsToEndorse:
                              type: integer
                              minimum: 0
                              maximum: 10
                              description: 'ENGAGEMENT: how many skills to endorse.'
                            followCompanyUrl:
                              type: string
                              description: >-
                                FOLLOW_COMPANY: the LinkedIn company page URL to
                                follow.
                            eventUrl:
                              type: string
                              description: >-
                                EVENT: the LinkedIn event URL to invite the lead
                                to.
                            newCampaignId:
                              type: string
                              description: >-
                                SEND_TO_CAMPAIGN: id of the campaign to move the
                                lead into.
                            tagId:
                              type: string
                              description: >-
                                ASSIGN_TAG: id of the tag to apply (see
                                `tag_list`).
                            tags:
                              type: array
                              items:
                                type: string
                              description: Tag ids to apply when this step completes.
                            provider:
                              type: string
                              enum:
                                - OPENAI
                                - ANTHROPIC
                                - GEMINI
                                - GROK
                                - DEEPSEEK
                              description: 'GPT step: which connected AI provider to call.'
                            model:
                              type: string
                              description: >-
                                GPT step: model id, e.g. "gpt-4o" or
                                "claude-sonnet-4-5".
                            instructions:
                              type: string
                              description: >-
                                GPT step: the prompt used to draft the
                                personalised opener.
                            personaId:
                              type: string
                              description: >-
                                QUALIFIER: id of the persona to score the lead
                                against (required).
                            mismatchAction:
                              type: string
                              enum:
                                - NONE
                                - TAG
                                - MARK_NOT_QUALIFIED
                                - REMOVE_FROM_CAMPAIGN
                              description: >-
                                QUALIFIER: what to do with a lead that fails the
                                persona. Default MARK_NOT_QUALIFIED.
                            mismatchTagIds:
                              type: array
                              items:
                                type: string
                              description: >-
                                QUALIFIER: tags applied on mismatch when
                                mismatchAction is TAG.
                            mismatchNext:
                              type: string
                              enum:
                                - CONTINUE
                                - STOP
                              description: >-
                                QUALIFIER: whether a mismatched lead continues
                                down the flow. Default STOP.
                            title:
                              type: string
                              description: >-
                                TASK: title of the manual task created for your
                                team.
                            trigger:
                              type: string
                              enum:
                                - If_Replied
                                - If_Connected
                                - If_Interested
                                - If_InMail_Open
                                - If_Email_Exists
                                - If_Email_Opened
                                - If_Email_Bounced
                                - If_Link_Clicked
                                - If_Visited_Profile
                                - CUSTOM
                              description: >-
                                TRIGGER only: the condition to branch on. One of
                                If_Replied, If_Connected, If_Interested,
                                If_InMail_Open, If_Email_Exists,
                                If_Email_Opened, If_Email_Bounced,
                                If_Link_Clicked, If_Visited_Profile, CUSTOM.
                            prompt:
                              type: string
                              description: >-
                                TRIGGER with trigger="CUSTOM": the
                                classification prompt for the AI Decision Maker.
                            branches:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    description: >-
                                      Branch label, and it is what the engine
                                      routes on — use the exact value the
                                      trigger emits, which `reference` lists. A
                                      label it does not recognise silently never
                                      fires.
                                  description:
                                    type: string
                                    description: >-
                                      Note for whoever reads the sequence later.
                                      Not shown to a prospect and it affects no
                                      routing.
                                required:
                                  - name
                                additionalProperties: false
                              description: >-
                                TRIGGER with trigger="CUSTOM": the two branch
                                labels the model picks between.
                            'yes':
                              type: array
                              items:
                                description: Same shape as the enclosing item.
                              description: >-
                                TRIGGER only: steps to run when the condition is
                                met. Omit to end the flow on this branch.
                            'no':
                              type: array
                              items:
                                description: Same shape as the enclosing item.
                              description: >-
                                TRIGGER only: steps to run when the condition is
                                NOT met. Omit to end the flow on this branch.
                          required:
                            - type
                          additionalProperties: false
                        description: >-
                          TRIGGER only: steps to run when the condition is met.
                          Omit to end the flow on this branch.
                      'no':
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - CONNECT
                                - MESSAGE
                                - INMAILS
                                - VOICE
                                - EMAIL
                                - ENGAGEMENT
                                - FOLLOW
                                - FOLLOW_COMPANY
                                - EVENT
                                - EVENT_MESSAGE
                                - GROUP_MESSAGE
                                - WITHDRAW
                                - TASK
                                - API
                                - GPT
                                - FINDER
                                - QUALIFIER
                                - SEND_TO_CAMPAIGN
                                - ASSIGN_TAG
                                - TRIGGER
                              description: >-
                                Step kind. LinkedIn: CONNECT, MESSAGE, INMAILS,
                                VOICE, ENGAGEMENT, FOLLOW, FOLLOW_COMPANY,
                                EVENT, EVENT_MESSAGE, GROUP_MESSAGE, WITHDRAW.
                                Email: EMAIL. Flow control: TRIGGER (branch),
                                QUALIFIER (persona gate), ASSIGN_TAG,
                                SEND_TO_CAMPAIGN, TASK, API, GPT, FINDER.
                            delay:
                              type: integer
                              minimum: 0
                              maximum: 365
                              description: >-
                                How long to wait AFTER the previous step before
                                running this one. Default 1 for actions,
                                per-trigger default for TRIGGER.
                            delayType:
                              type: string
                              enum:
                                - days
                                - hours
                                - minutes
                              description: Unit for `delay`. Default "days".
                            note:
                              type: string
                              maxLength: 300
                              description: >-
                                CONNECT only: the invitation note (LinkedIn caps
                                this at 300 characters, or 200 without Premium).
                            shortNote:
                              type: string
                              maxLength: 200
                              description: >-
                                CONNECT only: fallback note used when the
                                account has hit its long-note allowance.
                            subject:
                              type: string
                              description: 'EMAIL / INMAILS only: subject line.'
                            message:
                              type: string
                              description: >-
                                Body for MESSAGE, EMAIL, INMAILS, VOICE,
                                GROUP_MESSAGE, EVENT_MESSAGE. Supports
                                {{firstName}}-style merge fields.
                            connectWithoutMessage:
                              type: boolean
                              description: >-
                                CONNECT only: send a bare invitation with no
                                note. Higher accept rates, no personalisation.
                            useCredits:
                              type: boolean
                              description: >-
                                INMAILS only: spend InMail credits when the lead
                                is not Open Profile.
                            attachment:
                              type: object
                              properties:
                                url:
                                  type: string
                                  description: Publicly reachable URL of the file.
                                name:
                                  type: string
                                  description: >-
                                    File name shown to the recipient, e.g.
                                    "case-study.pdf".
                                type:
                                  type: string
                                  description: MIME type, e.g. "application/pdf".
                                size:
                                  type: number
                                  description: File size in bytes.
                              required:
                                - url
                              additionalProperties: false
                              description: >-
                                File to attach to the message. Must already be
                                hosted at a publicly reachable URL the platform
                                can fetch.
                            abTestingEnabled:
                              type: boolean
                              description: >-
                                Split traffic between the A copy above and the B
                                copy below.
                            bNote:
                              type: string
                              maxLength: 300
                              description: Variant B invitation note.
                            bShortNote:
                              type: string
                              maxLength: 200
                              description: Variant B short-form invitation note.
                            bSubject:
                              type: string
                              description: Variant B subject.
                            bMessage:
                              type: string
                              description: Variant B body.
                            bConnectWithoutMessage:
                              type: boolean
                              description: Variant B sends a bare invitation with no note.
                            bAttachment:
                              type: object
                              properties:
                                url:
                                  type: string
                                  description: Publicly reachable URL of the file.
                                name:
                                  type: string
                                  description: >-
                                    File name shown to the recipient, e.g.
                                    "case-study.pdf".
                                type:
                                  type: string
                                  description: MIME type, e.g. "application/pdf".
                                size:
                                  type: number
                                  description: File size in bytes.
                              required:
                                - url
                              additionalProperties: false
                              description: >-
                                File to attach to the message. Must already be
                                hosted at a publicly reachable URL the platform
                                can fetch.
                            postsToLike:
                              type: integer
                              minimum: 0
                              maximum: 10
                              description: 'ENGAGEMENT: how many recent posts to like.'
                            commentsToAdd:
                              type: integer
                              minimum: 0
                              maximum: 10
                              description: 'ENGAGEMENT: how many posts to comment on.'
                            skillsToEndorse:
                              type: integer
                              minimum: 0
                              maximum: 10
                              description: 'ENGAGEMENT: how many skills to endorse.'
                            followCompanyUrl:
                              type: string
                              description: >-
                                FOLLOW_COMPANY: the LinkedIn company page URL to
                                follow.
                            eventUrl:
                              type: string
                              description: >-
                                EVENT: the LinkedIn event URL to invite the lead
                                to.
                            newCampaignId:
                              type: string
                              description: >-
                                SEND_TO_CAMPAIGN: id of the campaign to move the
                                lead into.
                            tagId:
                              type: string
                              description: >-
                                ASSIGN_TAG: id of the tag to apply (see
                                `tag_list`).
                            tags:
                              type: array
                              items:
                                type: string
                              description: Tag ids to apply when this step completes.
                            provider:
                              type: string
                              enum:
                                - OPENAI
                                - ANTHROPIC
                                - GEMINI
                                - GROK
                                - DEEPSEEK
                              description: 'GPT step: which connected AI provider to call.'
                            model:
                              type: string
                              description: >-
                                GPT step: model id, e.g. "gpt-4o" or
                                "claude-sonnet-4-5".
                            instructions:
                              type: string
                              description: >-
                                GPT step: the prompt used to draft the
                                personalised opener.
                            personaId:
                              type: string
                              description: >-
                                QUALIFIER: id of the persona to score the lead
                                against (required).
                            mismatchAction:
                              type: string
                              enum:
                                - NONE
                                - TAG
                                - MARK_NOT_QUALIFIED
                                - REMOVE_FROM_CAMPAIGN
                              description: >-
                                QUALIFIER: what to do with a lead that fails the
                                persona. Default MARK_NOT_QUALIFIED.
                            mismatchTagIds:
                              type: array
                              items:
                                type: string
                              description: >-
                                QUALIFIER: tags applied on mismatch when
                                mismatchAction is TAG.
                            mismatchNext:
                              type: string
                              enum:
                                - CONTINUE
                                - STOP
                              description: >-
                                QUALIFIER: whether a mismatched lead continues
                                down the flow. Default STOP.
                            title:
                              type: string
                              description: >-
                                TASK: title of the manual task created for your
                                team.
                            trigger:
                              type: string
                              enum:
                                - If_Replied
                                - If_Connected
                                - If_Interested
                                - If_InMail_Open
                                - If_Email_Exists
                                - If_Email_Opened
                                - If_Email_Bounced
                                - If_Link_Clicked
                                - If_Visited_Profile
                                - CUSTOM
                              description: >-
                                TRIGGER only: the condition to branch on. One of
                                If_Replied, If_Connected, If_Interested,
                                If_InMail_Open, If_Email_Exists,
                                If_Email_Opened, If_Email_Bounced,
                                If_Link_Clicked, If_Visited_Profile, CUSTOM.
                            prompt:
                              type: string
                              description: >-
                                TRIGGER with trigger="CUSTOM": the
                                classification prompt for the AI Decision Maker.
                            branches:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    description: >-
                                      Branch label, and it is what the engine
                                      routes on — use the exact value the
                                      trigger emits, which `reference` lists. A
                                      label it does not recognise silently never
                                      fires.
                                  description:
                                    type: string
                                    description: >-
                                      Note for whoever reads the sequence later.
                                      Not shown to a prospect and it affects no
                                      routing.
                                required:
                                  - name
                                additionalProperties: false
                              description: >-
                                TRIGGER with trigger="CUSTOM": the two branch
                                labels the model picks between.
                            'yes':
                              type: array
                              items:
                                description: Same shape as the enclosing item.
                              description: >-
                                TRIGGER only: steps to run when the condition is
                                met. Omit to end the flow on this branch.
                            'no':
                              type: array
                              items:
                                description: Same shape as the enclosing item.
                              description: >-
                                TRIGGER only: steps to run when the condition is
                                NOT met. Omit to end the flow on this branch.
                          required:
                            - type
                          additionalProperties: false
                        description: >-
                          TRIGGER only: steps to run when the condition is NOT
                          met. Omit to end the flow on this branch.
                    required:
                      - type
                    additionalProperties: false
                  minItems: 1
                  description: >-
                    The full sequence, in order. This replaces whatever is
                    currently saved.
                title:
                  type: string
                  description: Label for this flow version, shown in flow history.
              required:
                - campaignId
                - steps
              additionalProperties: false
      responses:
        '200':
          description: >-
            The result, as JSON. Writes answer `{ "ok": true, "message": ...,
            "data": ... }`.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: >-
            The body is not valid JSON, an argument is invalid, or the request
            was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No API key, or the key was rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Your plan, permissions or access tier don't include this, or a
            record belongs to another account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: A record named in the arguments does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            The request was valid but the operation was refused, such as
            launching a campaign that is not ready.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The service failed or could not be reached. Reads are safe to retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '504':
          description: >-
            The operation timed out. A write may still complete; read it back
            before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - UNAUTHENTICATED
                - FORBIDDEN
                - PLAN_REQUIRED
                - VALIDATION
                - INVALID_JSON
                - NOT_FOUND
                - METHOD_NOT_ALLOWED
                - UPSTREAM
                - TOOL_ERROR
            message:
              type: string
            hint:
              type: string
              description: What to do about it, when there is something to do.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Your LinkedCamp API key.
    Bearer:
      type: http
      scheme: bearer
      description: Your LinkedCamp API key as a bearer token.

````

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