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

# Update a sequence

> Changes a sequence's settings. Send only the fields to change; the rest keep their values. Steps have their own endpoints.

`user_id` must be the sequence's author, the team owner or a team admin. No field except `policy` may be `null`; send `policy: null` to fall back to the team default policy. `sequence_type` cannot change once the sequence has steps (409). `schedule` replaces the whole schedule, so send all five of its fields; once set, it cannot be removed, because `schedule: null` is refused.

Safe to retry: sending the same body again leaves the same result. Counts toward the Sequencer writes rate limit.

Changes a sequence's settings. Send only the fields you want to change; everything else keeps its
value. Steps have their own endpoints.

`user_id` must be the sequence's author, the team owner or a team admin.

## Example

Cap new adds at 25 a day and pause an enrollment for a week when the prospect replies:

```bash theme={"system"}
curl -X PATCH https://client-api.salesfinity.co/v2/sequencer/sequences/6650c1f2a9b8c7d6e5f40123 \
  -H 'x-api-key: YOUR_API_KEY' -H 'content-type: application/json' \
  -d '{
    "user_id": "507f1f77bcf86cd799439011",
    "throttle_max_adds_per_day": 25,
    "primary_reply_action": "pause",
    "primary_reply_pause_duration": 604800
  }'
```

## Rules

* **No `null` except on `policy`.** `"policy": null` detaches the sequence's own policy so it falls back
  to the team default. Any other field sent as `null` is refused with 400.
* **`schedule` replaces the whole schedule.** Send all five fields. Once a sequence has a schedule it
  cannot be removed through the API, because `"schedule": null` is refused.
* **`sequence_type` cannot change while the sequence has steps** (409). Delete the steps first, or create
  a new sequence.
* **Mailboxes.** A member who is not a team admin can only set `email_account_ids` to shared mailboxes or
  mailboxes assigned to them (422 otherwise).

Sending the same body twice leaves the same result, so a retry is safe without an `Idempotency-Key`.

## When it fails

| Status | When |
| - | - |
| 400 | A field fails validation, a field other than `policy` is `null`, or the id is malformed. |
| 403 | The API key is invalid, `user_id` is not an active team member or has no active plan or seat, or `user_id` is not the author, the team owner or an admin. |
| 404 | The sequence is not on your team, or `policy` names a policy that is not. |
| 409 | `sequence_type` was changed on a sequence that has steps. |
| 422 | `email_account_ids` includes a mailbox `user_id` may not send from. |


## OpenAPI

````yaml PATCH /v2/sequencer/sequences/{id}
openapi: 3.0.1
info:
  title: Salesfinity API
  description: >-
    The Salesfinity API is a JSON-over-HTTPS REST API for the Salesfinity
    parallel dialer.

    Use it to manage contact lists and notes, run the Sequencer, read call logs
    and AI call

    scores, pull team and SDR analytics, and enrich phone numbers and email
    addresses. Webhook

    subscriptions are managed in the Salesfinity dashboard rather than through
    this API.


    ## Base URL


    All requests go to `https://client-api.salesfinity.co`. There is no separate
    sandbox host;

    see the developer portal for the recommended way to test safely.


    ## Authentication


    Every operation requires an API key sent in the `x-api-key` request header.
    Generate a key

    in the Salesfinity dashboard under **Settings → Connections → API &
    Webhooks**. A key is scoped to a

    single team, and every response is filtered to that team.


    ```bash

    curl https://client-api.salesfinity.co/v1/team \
      --header 'x-api-key: YOUR_API_KEY'
    ```


    ## Errors


    Every error the API returns is JSON with the same four fields, so a client
    can parse a

    failure the same way on every endpoint:


    ```json

    {
      "message": "Forbidden resource",
      "error": "Forbidden",
      "statusCode": 403,
      "request_id": "0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10"
    }

    ```


    `statusCode` matches the HTTP status. `error` is the stable reason phrase to
    branch on.

    `message` is human readable, and is an array of strings when request
    validation fails.

    `request_id` identifies the request in Salesfinity's logs; include it when
    you contact

    support. Note that a missing or invalid API key returns **403**, not 401.


    ## Request IDs


    Every response carries an `X-Request-Id` header, and an error body repeats
    it as

    `request_id`. To trace a request end to end, send your own `X-Request-Id`: 1
    to 128

    characters of letters, digits, `.`, `_`, `:` and `-`. Otherwise Salesfinity
    generates one.


    ## Request bodies


    Bodies are JSON. A field the operation does not define is rejected with
    **400**

    (`property <name> should not exist`). A body may be up to 10 MB on
    `/v1/contact-lists` and

    `/v2/sequencer`, and up to 1 MB everywhere else; a larger one gets **413**.


    Writes that record a person take a `user_id`: the team member the call acts
    as. On

    contact lists and notes, a `user_id` that is not on the team gets **400**.
    On the Sequencer

    it must be an active member, or the call gets **403**.


    ## Pagination


    List endpoints accept `page` (1-based) and `limit` query parameters.
    Defaults, maximums and

    the response envelope differ by endpoint family, so read the `limit`
    parameter and the

    response schema on the operation itself. Scored calls and every paged
    `/v2/sequencer`

    list return `{ data, pagination: { total, page, limit, pages } }`. Call logs
    return that shape

    when a `filters[...]` parameter is sent, and `{ data, pagination: { total,
    page, next } }`

    otherwise.


    ## Rate limits


    Limits are per team: every API key on a team shares them. Requests are
    counted per bucket in

    fixed one-minute windows that start on the minute.


    | Bucket | Routes | Requests per minute |

    |---|---|---|

    | Sequencer reads | `GET /v2/sequencer/*` | 600 |

    | Sequencer writes | `POST`, `PATCH`, `PUT` and `DELETE` on
    `/v2/sequencer/*` | 300 |

    | Heavy reads | `GET /v1/call-log` and `GET /v1/scored-calls` (the lists),
    `/v1/analytics/*`, `/v1/sequences` and `/v1/sequences/{id}` | 120 |

    | Everything else | All other endpoints | 1200 |


    Every response to an authenticated request carries `X-RateLimit-Limit`,

    `X-RateLimit-Remaining` and `X-RateLimit-Reset` (seconds until the window
    resets). Over the

    limit the API returns **429** with a `Retry-After` header giving the seconds
    to wait. These

    are the current limits; Salesfinity gives notice before lowering them.


    ## Idempotency


    `POST` endpoints outside the Sequencer are not idempotent: cap retries, and
    confirm state with

    a `GET` before retrying a create. Every `POST /v2/sequencer/*` endpoint
    except the three

    `/preview` endpoints accepts an `Idempotency-Key` header. Keys are kept for
    24 hours per team.

    A retry with the same key and the same request replays the original
    successful response. The

    same key with a different body or path returns **409**, and so does a retry
    while the first

    request is still running, which is safe to repeat after a moment. A request
    that fails frees

    its key, so a retry after a 5xx runs the write again: confirm state with a
    `GET` before

    retrying a create that failed with a 5xx.
  version: 1.0.0
  termsOfService: https://salesfinity.ai/terms
  contact:
    name: Salesfinity Support
    email: hello@salesfinity.co
    url: https://support.salesfinity.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://client-api.salesfinity.co
    description: Production. The only public Salesfinity API host.
security:
  - ApiKeyAuth: []
tags:
  - name: Contact Lists
    description: >-
      Create, read, merge, and delete CSV contact lists, add or remove the
      contacts inside them, and put a list's contacts in its dialing queue.
  - name: Teams
    description: >-
      Read the team that owns the API key, including its members, licenses, and
      statuses.
  - name: Dispositions
    description: Read the default and custom call outcomes configured for the team.
  - name: Sequences
    description: >-
      Read the external CRM sequences that appear on the team's call logs, with
      call counts and first and last use. Not the Salesfinity Sequencer, which
      is the Sequencer Sequences group.
  - name: Call Logs
    description: >-
      Read the raw call history for the team, with filtering, sorting, and
      pagination.
  - name: Analytics
    description: Aggregated call metrics for the team, by contact list, and by SDR.
  - name: Snoozed Contacts
    description: Read and manage contacts that have been snoozed out of the dialing queue.
  - name: Follow-up Tasks
    description: Read follow-up tasks created from call outcomes.
  - name: Custom Fields
    description: Read the custom field mappings configured for the team.
  - name: Scored Calls
    description: Read AI-scored calls with per-facet scoring and coaching recommendations.
  - name: Notes
    description: >-
      Attach freeform notes to a person or company, list them, and pin the ones
      that matter.
  - name: Enrichment
    description: >-
      Look up phone numbers and work or personal email addresses for a LinkedIn
      profile, and check the team's remaining enrichment credits.
  - name: Sequencer Sequences
    description: >-
      Create, configure, enable and duplicate Sequencer cadences, and read their
      analytics. Distinct from the Sequences group, which lists sequence names
      observed on call logs from an external CRM.
  - name: Sequencer Steps
    description: The ordered steps that make up a cadence.
  - name: Sequencer Templates
    description: Reusable email subjects and bodies that email steps send from.
  - name: Sequencer Enrollments
    description: >-
      Contacts inside a sequence: where they are in the cadence, and the verbs
      that move them. Bulk verbs take up to 500 enrollments.
  - name: Sequencer Enrolment Runs
    description: >-
      Background enrollment of up to 5,000 contacts at a time, and the preview
      that shows what a batch would do.
  - name: Sequencer Tasks
    description: The rep task queue a cadence produces, plus standalone one-off tasks.
  - name: Sequencer Suppression
    description: >-
      The team do-not-contact list, checked when someone is enrolled and again
      before every email is sent.
  - name: Sequencer Policies
    description: 'Rules of engagement: what may be enrolled, and what happens at each step.'
  - name: Sequencer Settings
    description: Team-level sequencer settings and sending mailboxes. Read-only.
externalDocs:
  description: Salesfinity API documentation
  url: https://docs.salesfinity.ai
paths:
  /v2/sequencer/sequences/{id}:
    patch:
      tags:
        - Sequencer Sequences
      summary: Update a sequence
      description: >-
        Changes a sequence's settings. Send only the fields to change; the rest
        keep their values. Steps have their own endpoints.


        `user_id` must be the sequence's author, the team owner or a team admin.
        No field except `policy` may be `null`; send `policy: null` to fall back
        to the team default policy. `sequence_type` cannot change once the
        sequence has steps (409). `schedule` replaces the whole schedule, so
        send all five of its fields; once set, it cannot be removed, because
        `schedule: null` is refused.


        Safe to retry: sending the same body again leaves the same result.
        Counts toward the Sequencer writes rate limit.
      operationId: update-sequencer-sequence
      parameters:
        - name: id
          required: true
          in: path
          description: 24-character sequence id.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSequenceDTO'
      responses:
        '200':
          description: The updated sequence. `can_manage` is not included.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SequencerSequence'
              example:
                _id: 6650c1f2a9b8c7d6e5f40123
                team: 64f1a2b3c4d5e6f7a8b9c0d1
                user: 64f1a2b3c4d5e6f7a8b9c0d2
                name: Q4 outbound - VP Operations
                description: Call, email, follow-up task over five days
                tags:
                  - outbound
                  - q4
                enabled: true
                enabled_at: '2026-09-02T14:05:11.000Z'
                archived_at: null
                policy: null
                sequence_type: interval
                throttle_max_adds_per_day: 25
                throttle_capacity: 300
                throttle_paused: false
                transactional: false
                primary_reply_action: pause
                schedule:
                  timezone_source: prospect
                  timezone: America/New_York
                  days_of_week:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                  start_hour: 8
                  end_hour: 17
                email_account_ids: []
                track_opens: true
                track_links: true
                sequence_step_count: 3
                duration_in_days: 5
                automation_percentage: 33
                num_contacted_prospects: 118
                num_replied_prospects: 9
                reply_rate: 8
                deliver_count: 201
                open_count: 143
                click_count: 12
                reply_count: 10
                bounce_count: 3
                opt_out_count: 1
                failure_count: 0
                schedule_count: 260
                last_activity_at: '2026-10-02T16:41:00.000Z'
                created_at: '2026-08-28T10:12:44.000Z'
                updated_at: '2026-10-03T10:02:00.000Z'
                primary_reply_pause_duration: 604800
        '400':
          description: >-
            Bad Request. The body failed validation (`message` lists each
            failure), a field other than `policy` is `null`, or the sequence id
            is not a 24-character hexadecimal id.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: 'Fields cannot be null: description'
                error: Bad Request
                statusCode: 400
                request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        '403':
          description: >-
            Forbidden. Returned when any of these is true: the `x-api-key`
            header is missing, malformed, revoked or belongs to another team;
            `user_id` is not an active member of the key's team; `user_id` has
            no active plan or seat (`error` is then `NO_ACTIVE_PLAN`, not
            `Forbidden`); `user_id` is not the sequence's author, the team owner
            or a team admin.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: >-
                  Only the sequence owner or a team admin can change this
                  sequence
                error: Forbidden
                statusCode: 403
                request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        '404':
          description: >-
            Not Found. No sequence with this id on your team, or `policy` names
            a policy that is not on your team.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Sequence not found
                error: Not Found
                statusCode: 404
                request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        '409':
          description: >-
            Conflict. `sequence_type` was changed on a sequence that already has
            steps. Delete the steps first, or create a new sequence.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: sequence_type cannot be changed while the sequence has steps
                error: Conflict
                statusCode: 409
                request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        '422':
          description: >-
            Unprocessable Entity. `email_account_ids` includes a mailbox
            `user_id` may not send from.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: >-
                  One of the mailboxes selected is not available to you. Pick
                  from your own mailboxes or the shared ones.
                error: Unprocessable Entity
                statusCode: 422
                request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
components:
  schemas:
    UpdateSequenceDTO:
      type: object
      properties:
        name:
          type: string
          maxLength: 200
          description: Sequence name, 1 to 200 characters.
          example: Q4 outbound - VP Operations
        description:
          type: string
          maxLength: 2000
          description: Up to 2,000 characters.
        tags:
          type: array
          items:
            type: string
            maxLength: 50
          maxItems: 20
          description: Up to 20 labels for filtering, each up to 50 characters.
        sequence_type:
          type: string
          enum:
            - interval
            - date
          default: interval
          description: >-
            `interval`: each step waits `interval_seconds` after the previous
            one. `date`: each step comes due on a fixed `date`. Cannot be
            changed once the sequence has steps.
        policy:
          type: string
          description: >-
            Rules-of-engagement policy id; it must be on your team (404
            otherwise). Send `null` to detach the sequence's policy so it falls
            back to the team default. A 24-character hexadecimal ID.
          nullable: true
        throttle_max_adds_per_day:
          type: number
          description: >-
            Most new enrollments this sequence accepts per owner per day,
            counted from midnight in the schedule's timezone. Further adds that
            day are refused with `throttle_daily`. Whole number. Omit for no
            cap.
          minimum: 0
        throttle_capacity:
          type: number
          description: >-
            Most live (`pending`, `active` or `paused`) enrollments this
            sequence holds per owner. Further adds are refused with
            `throttle_capacity`. Whole number. Omit for no cap.
          minimum: 0
        throttle_paused:
          type: boolean
          description: >-
            When `true`, adding people to the sequence is refused with 422 while
            it keeps running for those already in it.
        transactional:
          type: boolean
          description: >-
            Marks the sequence transactional. Enrollment then **skips the
            suppression list entirely**, and sends ignore `unsubscribed` and
            `manual` suppression entries; an address suppressed as `bounced`,
            `complained` or `dnc` is still never emailed. Only for mail a
            recipient asked for.
        track_opens:
          type: boolean
          default: true
          description: Adds an open-tracking pixel to this sequence's emails.
        track_links:
          type: boolean
          default: true
          description: Rewrites links in this sequence's emails to track clicks.
        primary_reply_action:
          type: string
          enum:
            - finish
            - continue
            - pause
          default: finish
          description: >-
            What a reply that reads as interested, a meeting request, or unclear
            does to the enrollment: `finish` ends it, `continue` carries on,
            `pause` pauses it. Other replies are handled the same way in every
            sequence: an out-of-office reply pauses the enrollment until the
            return date, an auto-reply is ignored, an unsubscribe request opts
            the person out, and a not-interested or wrong-person reply finishes
            the enrollment.
        primary_reply_pause_duration:
          type: number
          description: >-
            Seconds to pause for when `primary_reply_action` is `pause`; the
            enrollment then resumes on its own. Omit, or send 0, to pause until
            someone resumes it. Whole number.
          minimum: 0
        schedule:
          $ref: '#/components/schemas/SequenceScheduleDTO'
        email_account_ids:
          description: >-
            Mailbox ids this sequence sends from (see `GET
            /v2/sequencer/email-accounts`). Omit, or send an empty array, to
            send from the mailboxes assigned to the sequence's author, or from
            the team's shared mailboxes when the author has none. A member who
            is not a team admin may only pick shared mailboxes or mailboxes
            assigned to them (422 otherwise).
          type: array
          items:
            type: number
          maxItems: 100
        user_id:
          type: string
          description: >-
            The team member making the change. Must be the sequence's author,
            the team owner or a team admin, and have an active plan or seat. A
            24-character hexadecimal ID.
          example: 507f1f77bcf86cd799439011
      required:
        - user_id
      example:
        user_id: 507f1f77bcf86cd799439011
        throttle_max_adds_per_day: 25
        primary_reply_action: pause
        primary_reply_pause_duration: 604800
    SequencerSequence:
      type: object
      description: >-
        A Sequencer sequence (a cadence). `can_manage` is returned by list and
        get only; `step_type_counts` and `enrollment_counts` by list only.
      properties:
        _id:
          type: string
          description: 24-character hexadecimal id.
          example: 507f1f77bcf86cd799439011
        team:
          type: string
          description: The team that owns the sequence (24-character id).
        name:
          type: string
          description: Sequence name.
        description:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
          description: Free-text labels for filtering.
        enabled:
          type: boolean
          description: >-
            Whether the sequence is running. New and duplicated sequences start
            `false`.
        sequence_type:
          type: string
          enum:
            - interval
            - date
          description: >-
            `interval`: each step waits `interval_seconds` after the previous
            one. `date`: each step comes due on its own `date`.
        user:
          type: string
          description: >-
            Author's team member id. Only the author, the team owner or an admin
            can change the sequence. On `GET /v2/sequencer/sequences` this field
            arrives expanded, as an object with `_id`, `first_name`, `last_name`
            and `email`, not as a string.
        policy:
          type: string
          nullable: true
          description: >-
            Rules-of-engagement policy id, or null (or absent) when the sequence
            uses the team default policy.
        transactional:
          type: boolean
          description: >-
            Whether the sequence is transactional: enrollment skips the
            suppression list, and sends skip only `unsubscribed` and `manual`
            suppression entries.
        throttle_capacity:
          type: integer
          nullable: true
          description: >-
            Most live (`pending`, `active` or `paused`) enrollments per owner.
            Absent when there is no cap.
        throttle_max_adds_per_day:
          type: integer
          nullable: true
          description: Most new enrollments per owner per day. Absent when there is no cap.
        throttle_paused:
          type: boolean
          description: >-
            When `true`, adding people is refused while the sequence keeps
            running for those already in it.
        track_opens:
          type: boolean
          description: Whether emails carry an open-tracking pixel.
        track_links:
          type: boolean
          description: Whether links in emails are rewritten to track clicks.
        sequence_step_count:
          type: integer
          description: >-
            Number of steps. Updated whenever a step is added, changed or
            deleted.
        duration_in_days:
          type: integer
          description: >-
            Sum of the steps' `interval_seconds`, rounded up to whole days.
            Always 0 on a `date` sequence.
        num_contacted_prospects:
          type: integer
          description: >-
            Distinct people reached: sent or delivered an email, or a completed
            call or task. Rebuilt every 15 minutes.
        num_replied_prospects:
          type: integer
          description: Distinct people who replied. Rebuilt every 15 minutes.
        open_count:
          type: integer
          description: >-
            Number of opens, counted as events, not people. Rebuilt every 15
            minutes.
        click_count:
          type: integer
          description: >-
            Number of link clicks, counted as events, not people. Rebuilt every
            15 minutes.
        reply_count:
          type: integer
          description: >-
            Number of replies, counted as events, not people. Rebuilt every 15
            minutes.
        bounce_count:
          type: integer
          description: >-
            Number of bounces, counted as events, not people. Rebuilt every 15
            minutes.
        opt_out_count:
          type: integer
          description: >-
            Number of opt-outs, counted as events, not people. Rebuilt every 15
            minutes.
        deliver_count:
          type: integer
          description: >-
            Number of deliveries, counted as events, not people. Rebuilt every
            15 minutes.
        enabled_at:
          type: string
          format: date-time
          description: When the sequence was last enabled. Absent if it never has been.
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the sequence was archived in the dashboard, or null. Archived
            sequences are left out of the list and cannot be enabled or enrolled
            into; the API has no archive endpoint.
        primary_reply_action:
          type: string
          enum:
            - finish
            - continue
            - pause
          description: >-
            What a reply that reads as interested, a meeting request, or unclear
            does to the enrollment.
        primary_reply_pause_duration:
          type: integer
          description: >-
            Seconds an enrollment pauses for when `primary_reply_action` is
            `pause`. Absent means the pause lasts until someone resumes it.
        schedule:
          type: object
          description: >-
            The sequence's own sending window. Absent when the sequence uses the
            team default schedule.
          properties:
            timezone_source:
              type: string
              enum:
                - prospect
                - account
            timezone:
              type: string
              description: IANA timezone name.
            days_of_week:
              type: array
              items:
                type: integer
              description: 0 is Sunday.
            start_hour:
              type: integer
            end_hour:
              type: integer
        email_account_ids:
          type: array
          items:
            type: integer
          description: >-
            Mailbox ids the sequence sends from. Empty means the author's
            assigned mailboxes, or the team's shared ones when the author has
            none.
        failure_count:
          type: integer
          description: Number of failed sends, counted as events. Rebuilt every 15 minutes.
        schedule_count:
          type: integer
          description: >-
            Number of times a step ran and produced work: emails sent plus tasks
            created. Rebuilt every 15 minutes.
        reply_rate:
          type: integer
          description: >-
            `num_replied_prospects` as a percentage of
            `num_contacted_prospects`, 0 to 100, rounded. 0 while nobody has
            been contacted.
        automation_percentage:
          type: integer
          description: Share of steps that are `auto_email`, 0 to 100, rounded.
        last_activity_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When anything last happened in the sequence (an email, a task, a
            reply). Null for a sequence that has done nothing.
        step_type_counts:
          type: object
          description: >-
            List only. How many steps of each type the sequence has. Every type
            is always present.
          properties:
            auto_email:
              type: integer
            manual_email:
              type: integer
            call:
              type: integer
            task:
              type: integer
        enrollment_counts:
          type: object
          description: >-
            List only. Live count of the sequence's enrollments in each state,
            plus `total`. Every state is always present.
          properties:
            pending:
              type: integer
            active:
              type: integer
            paused:
              type: integer
            finished:
              type: integer
            bounced:
              type: integer
            opted_out:
              type: integer
            failed:
              type: integer
            total:
              type: integer
              description: All enrollments in the sequence, in any state.
          required:
            - pending
            - active
            - paused
            - finished
            - bounced
            - opted_out
            - failed
            - total
        can_manage:
          type: boolean
          description: >-
            Whether the member the request acted as may change this sequence.
            API reads act as the team owner, so this is `true` on every API
            read; it does not tell you whether a given `user_id` may edit.
            Returned by list and get only.
        created_at:
          type: string
          format: date-time
          description: When the sequence was created.
        updated_at:
          type: string
          format: date-time
          description: When it last changed.
      example:
        _id: 6650c1f2a9b8c7d6e5f40123
        team: 64f1a2b3c4d5e6f7a8b9c0d1
        user: 64f1a2b3c4d5e6f7a8b9c0d2
        name: Q4 outbound - VP Operations
        description: Call, email, follow-up task over five days
        tags:
          - outbound
          - q4
        enabled: true
        enabled_at: '2026-09-02T14:05:11.000Z'
        archived_at: null
        policy: null
        sequence_type: interval
        throttle_max_adds_per_day: 50
        throttle_capacity: 300
        throttle_paused: false
        transactional: false
        primary_reply_action: finish
        schedule:
          timezone_source: prospect
          timezone: America/New_York
          days_of_week:
            - 1
            - 2
            - 3
            - 4
            - 5
          start_hour: 8
          end_hour: 17
        email_account_ids: []
        track_opens: true
        track_links: true
        sequence_step_count: 3
        duration_in_days: 5
        automation_percentage: 33
        num_contacted_prospects: 118
        num_replied_prospects: 9
        reply_rate: 8
        deliver_count: 201
        open_count: 143
        click_count: 12
        reply_count: 10
        bounce_count: 3
        opt_out_count: 1
        failure_count: 0
        schedule_count: 260
        last_activity_at: '2026-10-02T16:41:00.000Z'
        created_at: '2026-08-28T10:12:44.000Z'
        updated_at: '2026-10-02T16:41:00.000Z'
        can_manage: true
    Error:
      type: object
      title: Error
      description: >-
        The error envelope returned by every Salesfinity API error response. The
        shape is identical across all status codes and all endpoints, and
        `request_id` is present on every error the API returns.
      required:
        - message
        - error
        - statusCode
        - request_id
      properties:
        message:
          description: >-
            Human-readable description of the failure. A string for most errors,
            and an array of strings when request validation fails, with one
            entry per field that did not validate.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: Forbidden resource
        error:
          type: string
          description: >-
            Stable HTTP reason phrase for the status code, such as `Forbidden`.
            One exception: a 403 from a `/v2/sequencer` write whose `user_id`
            has no active plan or seat carries `NO_ACTIVE_PLAN` here. Branch on
            this rather than on `message`.
          example: Forbidden
        statusCode:
          type: integer
          format: int32
          description: >-
            HTTP status code, repeated in the body so it survives transports
            that drop it.
          example: 403
        request_id:
          type: string
          description: >-
            Identifies the request in Salesfinity's logs; the same value as the
            `X-Request-Id` response header. Include it when you contact support.
          example: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        errors:
          type: array
          items:
            type: string
          description: >-
            Present on a few Sequencer errors, such as a rules-of-engagement
            policy whose rules fail the catalog check: one entry per problem.
            Other fields an upstream service sends are passed through unchanged
            too.
        code:
          type: string
          description: >-
            A machine-readable reason, present on a few Sequencer errors.
            `unknown_variables`: a template, a step's name or a step's note
            holds a token that is not a variable; `unknown` lists each one.
        unknown:
          type: array
          description: >-
            Present when `code` is `unknown_variables`: one entry per distinct
            token that was refused.
          items:
            $ref: '#/components/schemas/SequencerUnknownVariable'
      example:
        message: Forbidden resource
        error: Forbidden
        statusCode: 403
        request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
    SequenceScheduleDTO:
      type: object
      properties:
        timezone_source:
          type: string
          enum:
            - prospect
            - account
          description: >-
            `prospect`: each contact's own timezone when it has a valid one,
            otherwise `timezone`. `account`: always `timezone`.
        timezone:
          type: string
          description: >-
            IANA timezone name, for example `America/New_York`. Used for every
            contact under `account`, and for contacts without a valid timezone
            under `prospect`. Also sets where the day starts for
            `throttle_max_adds_per_day`.
          maxLength: 100
          example: America/New_York
        days_of_week:
          description: Open days, from 0 (Sunday) to 6 (Saturday). 1 to 7 distinct values.
          example:
            - 1
            - 2
            - 3
            - 4
            - 5
          type: array
          items:
            type: number
            minimum: 0
            maximum: 6
          maxItems: 7
          uniqueItems: true
        start_hour:
          type: number
          minimum: 0
          maximum: 23
          description: First open hour, 0 to 23, in local time. Whole number.
          example: 8
        end_hour:
          type: number
          minimum: 0
          maximum: 23
          description: >-
            Hour the window closes, 0 to 23, in local time; must be greater than
            `start_hour`. The window runs from `start_hour` up to, not
            including, `end_hour`. Whole number.
          example: 17
      description: >-
        When the sequence may act. Send all five fields together: a partial
        schedule is rejected with 400. Omit `schedule` to use the team's default
        schedule, or, when the team has none, Monday to Friday, 8 to 17, in each
        prospect's timezone (UTC when unknown). A step that comes due outside
        the window waits for the next open hour.
      example:
        timezone_source: prospect
        timezone: America/New_York
        days_of_week:
          - 1
          - 2
          - 3
          - 4
          - 5
        start_hour: 8
        end_hour: 17
    SequencerUnknownVariable:
      type: object
      description: >-
        A token in double braces that is not a variable, or cannot be used where
        it was written.
      properties:
        token:
          type: string
          description: The token as written, braces included, such as `{{fisrt_name}}`.
        key:
          type: string
          description: What is inside the braces, lower-cased, without the fallback.
        reason:
          type: string
          enum:
            - not_a_variable
            - empty
            - fallback_too_long
            - unbalanced
            - not_allowed_here
          description: >-
            `not_a_variable`: not a built-in variable, not a custom field your
            team has, and not an AI line (a misspelt AI line such as `{{
            ai:opener }}` lands here too). `empty`: nothing to read, as in
            `{{}}`, `{{ |x}}` or `{{custom.}}`. `fallback_too_long`: the
            fallback is over 64 characters. `unbalanced`: braces that do not
            pair up, as in `{{first_name` or `{{first_name}}}`.
            `not_allowed_here`: a step's name or note only, for an AI line, or
            for any variable in an email step's name.
        suggestion:
          type: object
          nullable: true
          description: >-
            The closest variable, within 2 edits: built-in variables first, then
            your team's custom fields. Null when nothing is close, which is
            common for a `custom.<field>`.
          properties:
            key:
              type: string
              description: The variable's key, such as `first_name`.
            label:
              type: string
              description: Its name in the app, such as `First name`.
        message:
          type: string
          description: >-
            A sentence to show a person, such as `fisrt_name isn't a variable.
            Did you mean First name?`.
        field:
          type: string
          enum:
            - display_name
            - task_note
          description: 'Step writes only: the field the token is in.'
      required:
        - token
        - key
        - reason
        - suggestion
        - message
  headers:
    X-Request-Id:
      description: >-
        Identifies the request in Salesfinity's logs, and matches `request_id`
        in an error body. Echoes the `X-Request-Id` you sent when it is 1 to 128
        characters of letters, digits, `.`, `_`, `:` and `-`; otherwise
        Salesfinity generates one.
      schema:
        type: string
      example: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
    X-RateLimit-Limit:
      description: >-
        Requests allowed per minute in the rate-limit bucket this request
        counted against. Limits are per team: every API key on the team shares
        them.
      schema:
        type: integer
      example: 300
    X-RateLimit-Remaining:
      description: Requests left in the current one-minute window for this bucket.
      schema:
        type: integer
        minimum: 0
      example: 0
    X-RateLimit-Reset:
      description: >-
        Seconds until the current window ends and the bucket resets. At least 1
        and at most 60.
      schema:
        type: integer
        minimum: 0
      example: 12
    Retry-After:
      description: >-
        Seconds to wait before retrying: the time left in the current one-minute
        window. At least 1 and at most 60.
      schema:
        type: integer
        minimum: 0
      example: 12
  responses:
    TooManyRequests:
      description: >-
        Too Many Requests. The team has used its per-minute budget for this
        rate-limit bucket; the limit is shared by every API key on the team.
        Wait the number of seconds in the `Retry-After` header (never more than
        60), then retry. The request was refused before it ran, so retrying it
        is safe even for a write. Pace bulk work with the
        `X-RateLimit-Remaining` and `X-RateLimit-Reset` headers. See
        /api-reference/rate-limits.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Rate limit of 300 requests per minute exceeded. Retry in 12s.
            error: Too Many Requests
            statusCode: 429
            request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
    InternalServerError:
      description: >-
        Internal Server Error. Something went wrong on the Salesfinity side.
        Retry with exponential backoff. If it persists, contact
        hello@salesfinity.co with the `request_id` from the body, the request
        path and the timestamp. The contact-list, snoozed-contact and note
        routes do not validate an ID in the path, and the analytics routes do
        not validate `user_ids`: an ID that is not a 24-character hexadecimal
        string returns 500 there, and retrying does not help, so check the ID
        first.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Internal server error
            error: Internal Server Error
            statusCode: 500
            request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
    BadGateway:
      description: >-
        Bad Gateway. The Salesfinity service behind this endpoint (the
        Sequencer, or the enrichment service) could not be reached. Retry with
        exponential backoff; for a write, confirm state with a GET before
        retrying a create.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Sequencer service unreachable
            error: Bad Gateway
            statusCode: 502
            request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
    GatewayTimeout:
      description: >-
        Gateway Timeout. The Sequencer did not answer within 55 seconds. The
        work may still have finished, and a failed request frees its
        Idempotency-Key, so confirm state with a GET before retrying a create;
        retry reads with backoff.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Sequencer service timed out
            error: Gateway Timeout
            statusCode: 504
            request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Team-scoped API key generated in the Salesfinity dashboard under
        Settings → Connections → API & Webhooks. A missing or invalid key
        returns HTTP 403.

````

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