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

# Get Campaign Settings

> Returns all the settings of a campaign.

> [!NOTE]
>
> This endpoint uses the [Campaign Settings object](https://developer.lemlist.com/api-reference/objects-definitions/campaign-settings.md).

> [!NOTE]
>
> This endpoint requires at least the **Email Pro** plan.

The response is not wrapped in `data`.

* `general.labels`, `general.sequenceId`, `senders.espRouting` and
  `schedule.scheduleIds` are read-only.
* `senders.espMatching` gives the team value when the campaign does not set it.
* A campaign hidden from the user of the API key answers `404`. An API key not
  linked to a user acts as the first user of the team.


## OpenAPI

````yaml get /campaigns/{campaignId}/settings
openapi: 3.0.0
info:
  title: lemlist API
  version: 1.0.0
  description: >-
    Welcome to the lemlist Developer Documentation.


    lemlist is very customizable and open. You'll find on this page all the API
    and integration you can do with lemlist.


    # Rate Limit


    lemlist's API rate limits requests in order to prevent abuse and overload of
    our services.  

    Rate limits are applied on all routes and per API key performing the
    request.  

    The rate limits are **20** requests per **2** seconds.  

    The response provides any information you may need about it:


    | Header | Description |

    | --- | --- |

    | Retry-After | The number of seconds in which you can retry |

    | X-RateLimit-Limit | The maximum requests in that time |

    | X-RateLimit-Remaining | The number of remaining requests you can make |

    | X-RateLimit-Reset | The date when the rate limit will reset |


    _Example of values for the rate limit headers_


    ``` json

    {
        "Retry-After": 2,
        "X-RateLimit-Limit": 20,
        "X-RateLimit-Remaining": 7,
        "X-RateLimit-Reset" : "Tue Feb 16 2021 09:02:42 GMT+0100 (Central European Standard Time)"
    }

     ```

    # Definitions


    ## Team


    A team is the entity of lemlist that can handle users and billing.


    ## Credits


    Credits are the coins a team uses to enrich emails, LinkedIn URLs, etc. via
    the enrich route. Each enrichment feature needs a certain amount of credits
    to run.


    ## User


    You use a user account to connect to lemlist and send messages via the
    connected emails or LinkedIn account.


    ## Campaign


    A campaign is the entity to automate outreach. A campaign has multiple
    sequences composed of steps.


    ## Lead


    A lead is a person that you try to contact via a campaign.


    ## Activity


    An activity is the history of all the steps.


    ## Unsubscribe


    An unsubscribe occurs when a person decides they don't want to receive
    emails from you anymore.


    # Authentication


    All API routes use the dedicated subdomain `api.lemlist.com`.


    lemlist uses API keys to allow access to the API. You can get your lemlist
    API key at our [integration
    page](https://app.lemlist.com/settings/integrations).


    You need to add the `Authorization` header using the `Basic` authentication
    type. `login:password` **where the login is always empty and the password is
    the API key**.


    ⚠️ **Don't forget to add the semicolon (**`:`**) before your API key in curl
    command.**


    > To authorize, use this code: 
      

    ``` shell

    curl https://api.lemlist.com/api/team \
      --user ":YourApiKey"

     ```

    **Make sure to replace** **`YourApiKey`** **with your API key.**


    # Give feedback


    If you want to report a bug, ask for data, or share with us a use case,
    please fill this [form](https://lemlist.typeform.com/to/mfVlkyGf). It will
    help us centralize your needs!
servers:
  - url: https://api.lemlist.com/api
security:
  - basicAuth: []
tags:
  - name: Enrichment Providers
    description: >-
      The data providers lemlist can call to find an email or a phone.


      Internal providers are paid with lemlist credits and always available.
      External providers run on your own account: connect one by saving its API
      key, and it becomes available to your waterfalls. `GET
      /enrichments/providers` is the catalog of provider ids accepted by the
      waterfall endpoints.
  - name: Enrichment Waterfalls
    description: >-
      Control which data providers lemlist calls when enriching a contact, and
      in which order.


      A waterfall is an ordered list of providers for one enrichment `type`
      (`email` or `phone`). Providers are tried one after the other until one
      returns a result.


      Every team has exactly one default waterfall per type (`isDefault: true`).
      While its `editor` is `lemlist` it follows the lemlist behaviour:
      providers you connected with your own API key are tried first, then
      internal providers in a random order. Once a team member edits its
      provider list, `editor` becomes that user's id and the list is followed as
      is; resetting it hands it back to `lemlist`.


      Custom waterfalls (`isDefault: false`) carry `conditions` on the contact
      being enriched, keyed by contact property; every key present must match.
      When a contact is enriched, lemlist runs a single waterfall: the custom
      waterfall of the requested type whose conditions match the contact, or the
      default waterfall when none does. If several match, the one with the most
      condition keys wins, then the most recently updated. Only that waterfall
      runs; when it finds nothing, the enrichment ends without falling back to
      another one.
paths:
  /campaigns/{campaignId}/settings:
    parameters:
      - name: campaignId
        in: path
        required: true
        description: The unique identifier of the campaign
        example: cam_hNtZRPpyNP6HRp4PV
        schema:
          type: string
    get:
      tags:
        - Campaigns
      summary: Get Campaign Settings
      description: Returns all the settings of a campaign. Requires the Email Pro plan.
      parameters: []
      responses:
        '200':
          description: Success
          headers:
            Content-Type:
              schema:
                type: string
              example: application/json
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignSettings'
              example:
                campaignId: cam_hNtZRPpyNP6HRp4PV
                timezone: Europe/Paris
                senderStrategy: random
                general:
                  labels:
                    - id: lab_aHYwTgdfZU1GpO47A
                      name: Outbound
                  sequenceId: seq_4LUxRGgCy7MGaQq0c
                  sequenceSharing: false
                  unsubscribeMode: contact
                  addUnsubscribeLink: true
                  unsubscribeLinkText: Unsubscribe
                senders:
                  espMatching: true
                  espRouting:
                    gmail: gmail
                    outlook: outlook
                    other: other
                automation:
                  autoReview: false
                  autoReviewConditions:
                    - unverified
                tracking:
                  trackOpens: true
                  trackClicks: true
                  trackReplies: true
                onReplied:
                  createNewTask: false
                  campaignProgress: stop
                  propagateProgressToCompany: false
                  disableOutOfOffice: false
                onLinkClicked:
                  createNewTask: false
                  campaignProgress: continue
                  propagateProgressToCompany: false
                  specificLinks: []
                onMeetingBooked:
                  campaignProgress: stop
                  propagateProgressToCompany: true
                aiFeatures:
                  scoreReplies: true
                  onInterestedReply:
                    enabled: true
                    pauseAllCampaignsForLead: true
                    pauseCampaignForCompany: false
                    pauseAllCampaignsForCompany: false
                  onNotInterestedReply:
                    enabled: false
                    pauseAllCampaignsForLead: false
                    pauseCampaignForCompany: false
                    pauseAllCampaignsForCompany: false
                schedule:
                  isTimezoneBasedSchedule: false
                  timezoneBasedScheduleId: null
                  scheduleIds:
                    - skd_NHanXKczmWCI0tl1m
                  holidayCountries:
                    - FR
                  sendingPattern:
                    newLeadsPriorityRatio: 0.5
        '400':
          description: The campaign ID is not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignSettingsError'
              example:
                error: Wrong param campaign id
                code: WRONG_PARAM_CAMPAIGN_ID
        '401':
          description: The authentication you supplied is incorrect
          content:
            text/plain:
              example: The authentication you supplied is incorrect
        '402':
          description: The endpoint requires at least the Email Pro plan
          content:
            text/plain:
              example: route is available starting emailPro plan
        '404':
          description: Campaign not found, or hidden from the user of the API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignSettingsError'
              example:
                error: Campaign not found
                code: CAMPAIGN_NOT_FOUND
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignSettingsError'
              example:
                error: Route bad method
                code: ROUTE_BAD_METHOD
components:
  schemas:
    CampaignSettings:
      type: object
      description: All the settings of a campaign.
      required:
        - campaignId
        - timezone
        - senderStrategy
        - general
        - senders
        - automation
        - tracking
        - onReplied
        - onLinkClicked
        - onMeetingBooked
        - aiFeatures
        - schedule
      properties:
        campaignId:
          type: string
          description: The campaign ID.
        timezone:
          type: string
          nullable: true
          description: The campaign timezone, `null` when not set.
        senderStrategy:
          type: string
          pattern: ^(random|contactOwner|leadImporter|customField:.+)$
          description: >-
            How the campaign picks the sender of each lead: `random` (the sender
            pool), `contactOwner`, `leadImporter` or `customField:<fieldName>`.
        general:
          type: object
          description: Labels, sequence and unsubscribe link.
          properties:
            labels:
              type: array
              description: The labels of the campaign.
              items:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
            sequenceId:
              type: string
              description: The ID of the campaign sequence.
            sequenceSharing:
              type: boolean
              description: Whether the sequence has a public share link.
            unsubscribeMode:
              type: string
              enum:
                - variable
                - contact
              description: >-
                `variable`: the unsubscribe link of the email. `contact`: the
                whole contact.
            addUnsubscribeLink:
              type: boolean
              description: Whether emails end with an unsubscribe link.
            unsubscribeLinkText:
              type: string
              description: The text of the unsubscribe link.
          required:
            - labels
            - sequenceId
            - sequenceSharing
            - unsubscribeMode
            - addUnsubscribeLink
            - unsubscribeLinkText
        senders:
          type: object
          description: Sender matching.
          required:
            - espMatching
            - espRouting
          properties:
            espMatching:
              type: boolean
              description: >-
                Whether a lead gets a sender of the same email provider. The
                team value when the campaign does not set it.
            espRouting:
              type: object
              nullable: true
              description: >-
                The sender provider used for each lead provider. `null` when ESP
                matching is off.
              properties:
                gmail:
                  type: string
                  enum:
                    - any
                    - gmail
                    - outlook
                    - other
                outlook:
                  type: string
                  enum:
                    - any
                    - gmail
                    - outlook
                    - other
                other:
                  type: string
                  enum:
                    - any
                    - gmail
                    - outlook
                    - other
        automation:
          type: object
          description: Auto-review.
          required:
            - autoReview
            - autoReviewConditions
          properties:
            autoReview:
              type: boolean
              description: Whether auto-review (auto-launch) is enabled.
            autoReviewConditions:
              type: array
              items:
                type: string
                enum:
                  - deliverable
                  - risky
                  - unknown
                  - undeliverable
                  - unverified
              description: >-
                Email verification statuses that let auto-review launch a lead.
                A campaign that never set them launches its `unverified` leads.
        tracking:
          type: object
          description: Open, click and reply tracking.
          properties:
            trackOpens:
              type: boolean
              description: Whether email open tracking is enabled.
            trackClicks:
              type: boolean
              description: Whether link click tracking is enabled.
            trackReplies:
              type: boolean
              description: Whether reply tracking is enabled.
          required:
            - trackOpens
            - trackClicks
            - trackReplies
        onReplied:
          type: object
          description: What happens when a lead replies.
          properties:
            createNewTask:
              type: boolean
              description: Create a task when a lead replies.
            campaignProgress:
              type: string
              enum:
                - continue
                - pause
                - stop
              description: What happens to the lead on reply.
            propagateProgressToCompany:
              type: boolean
              description: Apply the same action to the other leads of the same company.
            disableOutOfOffice:
              type: boolean
              description: Whether out-of-office detection is disabled.
          required:
            - createNewTask
            - campaignProgress
            - propagateProgressToCompany
            - disableOutOfOffice
        onLinkClicked:
          type: object
          description: What happens when a lead clicks a tracked link.
          properties:
            createNewTask:
              type: boolean
              description: Create a task when a lead clicks a link.
            campaignProgress:
              type: string
              enum:
                - continue
                - pause
                - stop
              description: What happens to the lead on a link click.
            propagateProgressToCompany:
              type: boolean
              description: Apply the same action to the other leads of the same company.
            specificLinks:
              type: array
              maxItems: 50
              items:
                type: string
              description: 'Only these link URLs trigger the action. Empty: all links do.'
          required:
            - createNewTask
            - campaignProgress
            - propagateProgressToCompany
            - specificLinks
        onMeetingBooked:
          type: object
          description: What happens when a lead books a meeting.
          properties:
            campaignProgress:
              type: string
              enum:
                - continue
                - pause
                - stop
              description: What happens to the lead when a meeting is booked.
            propagateProgressToCompany:
              type: boolean
              description: Apply the same action to the other leads of the same company.
          required:
            - campaignProgress
            - propagateProgressToCompany
        aiFeatures:
          type: object
          description: AI reply handling.
          properties:
            scoreReplies:
              type: boolean
              description: Whether AI reply scoring is enabled.
            onInterestedReply:
              type: object
              description: AI action when a reply is interested.
              properties:
                enabled:
                  type: boolean
                  description: Whether this AI action is enabled.
                pauseAllCampaignsForLead:
                  type: boolean
                  description: Pause all the campaigns of the lead.
                pauseCampaignForCompany:
                  type: boolean
                  description: Pause this campaign for the leads of the same company.
                pauseAllCampaignsForCompany:
                  type: boolean
                  description: Pause all the campaigns of the leads of the same company.
              required:
                - enabled
                - pauseAllCampaignsForLead
                - pauseCampaignForCompany
                - pauseAllCampaignsForCompany
            onNotInterestedReply:
              type: object
              description: AI action when a reply is not interested.
              properties:
                enabled:
                  type: boolean
                  description: Whether this AI action is enabled.
                pauseAllCampaignsForLead:
                  type: boolean
                  description: Pause all the campaigns of the lead.
                pauseCampaignForCompany:
                  type: boolean
                  description: Pause this campaign for the leads of the same company.
                pauseAllCampaignsForCompany:
                  type: boolean
                  description: Pause all the campaigns of the leads of the same company.
              required:
                - enabled
                - pauseAllCampaignsForLead
                - pauseCampaignForCompany
                - pauseAllCampaignsForCompany
          required:
            - scoreReplies
            - onInterestedReply
            - onNotInterestedReply
        schedule:
          type: object
          description: >-
            Sending schedule options. Read and change the schedules themselves
            with the
            [Schedules](/api-reference/endpoints/schedules/get-campaign-schedules)
            endpoints.
          required:
            - isTimezoneBasedSchedule
            - timezoneBasedScheduleId
            - scheduleIds
            - holidayCountries
          properties:
            isTimezoneBasedSchedule:
              type: boolean
              description: Whether each lead gets the schedule of their own timezone.
            timezoneBasedScheduleId:
              type: string
              nullable: true
              description: >-
                The schedule used when `isTimezoneBasedSchedule` is on, `null`
                when none.
            scheduleIds:
              type: array
              items:
                type: string
              description: The schedules of the campaign.
            holidayCountries:
              type: array
              uniqueItems: true
              items:
                type: string
                enum:
                  - US
                  - FR
                  - GB
              description: Countries whose public holidays pause the sending.
            sendingPattern:
              type: object
              description: >-
                How the daily sending splits between new leads and leads already
                in the sequence.
              properties:
                newLeadsPriorityRatio:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: Share of the daily sending kept for new leads, from 0 to 1.
    CampaignSettingsError:
      type: object
      description: Error of the campaign settings endpoints.
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error message.
        code:
          type: string
          description: Machine-readable error code.
        details:
          type: object
          description: Only on `CAMPAIGN_SETTINGS_INVALID_INPUT`.
          properties:
            issues:
              type: array
              maxItems: 20
              description: >-
                Every refused field of the body, so that you can fix them all in
                one retry.
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: >-
                      The dotted path of the refused field, e.g.
                      `onReplied.campaignProgress`. Empty for the whole body.
                  code:
                    type: string
                    description: >-
                      The issue code, e.g. `invalid_value`, `unrecognized_keys`,
                      or `CAMPAIGN_SETTINGS_READ_ONLY_FIELD` for a field that
                      GET returns but PATCH does not take.
                  message:
                    type: string
                    description: What the field accepts.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

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