> ## 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.

# Create a one-off task

> Creates a one-off task for one contact, outside any sequence.

It joins the assignee's queue beside sequence tasks with `origin: one_off`, and completing or skipping it never moves an enrollment. A `call` task is queued for the assignee's Sequencer dial list. Completing a one-off `manual_email` task sends a real email and needs a subject and a `body`, set here or at completion. The LinkedIn actions, `meeting` and `sms` are reminders only: nothing is dialed or sent for them.

`user_id` is recorded as the creator. `assignee_id` defaults to `user_id` and must be a member of the team. Returns the task with `contact` and `sequence` expanded.

A `manual_email` task can carry a `body`, which predrafts the email the rep will review and send. It is plain text: HTML is not rendered, and variables are not filled in. A `body` on any other action is refused with 422.

Not idempotent by itself: send an `Idempotency-Key` so a retry does not create a second task. To create one task for each of many contacts, use `POST /v2/sequencer/tasks/bulk`. Counts against the Sequencer writes [rate limit](/api-reference/rate-limits).

A one-off task is a to-do for one contact that belongs to no sequence. Use it for a follow-up a rep promised on a call, or for a channel the Sequencer does not automate.

## Choosing an action

| Action | What happens |
| - | - |
| `call` | Queued for the assignee's Sequencer dial list. Dispositioning the call in the dialer completes it. |
| `manual_email` | Completing it sends a real email. Set `subject` here or at completion. Send `body` here to draft the email up front, or at completion. |
| `generic` | A plain to-do, completed by hand. |
| `linkedin_connect`, `linkedin_message`, `linkedin_view`, `linkedin_interact`, `meeting`, `sms` | Reminders. Nothing is sent or dialed; complete them by hand. |

## Drafting the email

A `manual_email` task can carry the email up front, so the rep starts from your draft:

```json theme={"system"}
{
  "user_id": "507f1f77bcf86cd799439011",
  "contact": "66f9b1e0a2c3d4e5f6a7b8c9",
  "action": "manual_email",
  "due_at": "2026-10-16T15:00:00.000Z",
  "subject": "Following up on your pricing question",
  "body": "Hi Dana,\n\nHere are the three plans we talked about."
}
```

`body` is **plain text**, up to 20,000 characters. A blank line starts a new paragraph and a single line break
stays a line break. HTML is not rendered: `<p>Hi</p>` reaches the recipient as those characters. Variables
are not filled in: an email whose subject or body still has a `{{...}}` is not sent, and the task stays
`pending` with an `error_reason` such as `Not sent: fill in {{first_name}} first`. Write names out.

A `body` with any other action is refused with **422** (`Only a manual email task has an email body`).

## Good to know

* `due_at` is an absolute instant. Convert the rep's local date and time yourself. Up to 5 minutes in the past is accepted; anything earlier is refused.
* `user_id` is recorded as the creator and `assignee_id` holds the task. The creator, the assignee or a team admin can later edit or cancel it.
* Send an `Idempotency-Key`. Without one, a retried request creates a second task.
* For the same task across many contacts, use [Create one-off tasks in bulk](https://docs.salesfinity.ai/api-reference/endpoint/bulk-create-sequencer-tasks.md).


## OpenAPI

````yaml POST /v2/sequencer/tasks
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/tasks:
    post:
      tags:
        - Sequencer Tasks
      summary: Create a one-off task
      description: >-
        Creates a one-off task for one contact, outside any sequence.


        It joins the assignee's queue beside sequence tasks with `origin:
        one_off`, and completing or skipping it never moves an enrollment. A
        `call` task is queued for the assignee's Sequencer dial list. Completing
        a one-off `manual_email` task sends a real email and needs a subject and
        a `body`, set here or at completion. The LinkedIn actions, `meeting` and
        `sms` are reminders only: nothing is dialed or sent for them.


        `user_id` is recorded as the creator. `assignee_id` defaults to
        `user_id` and must be a member of the team. Returns the task with
        `contact` and `sequence` expanded.


        A `manual_email` task can carry a `body`, which predrafts the email the
        rep will review and send. It is plain text: HTML is not rendered, and
        variables are not filled in. A `body` on any other action is refused
        with 422.


        Not idempotent by itself: send an `Idempotency-Key` so a retry does not
        create a second task. To create one task for each of many contacts, use
        `POST /v2/sequencer/tasks/bulk`. Counts against the Sequencer writes
        [rate limit](/api-reference/rate-limits).
      operationId: create-sequencer-task
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaskDTO'
      responses:
        '201':
          description: The created task, with `contact` and `sequence` expanded.
          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/SequencerTask'
              example:
                _id: 66fe01b7c3e4b5a6d7e8fa10
                team: 64b7f0c2e4b0a1b2c3d4e5f0
                user: 64b7f0c2e4b0a1b2c3d4e5f1
                created_by: 64b7f0c2e4b0a1b2c3d4e5f1
                contact:
                  _id: 66f9b1e0a2c3d4e5f6a7b8c9
                  first_name: Theresa
                  last_name: Webb
                  email: theresa.webb@acme.com
                  account: Acme, LLC
                  account_key: acme
                  title: VP of Sales
                  timezone: America/Chicago
                  phone_numbers:
                    - type: direct
                      number: '+15125550142'
                      do_not_call: false
                  last_touched_at: '2026-09-30T15:12:04.000Z'
                origin: one_off
                standalone: true
                action: linkedin_connect
                subject: Connect after the webinar
                note: Mention her question about territory planning.
                due_at: '2026-10-06T16:00:00.000Z'
                priority: medium
                state: pending
                held_at: null
                sending_claimed_at: null
                outcome_applied_at: null
                created_at: '2026-10-03T16:02:11.000Z'
                updated_at: '2026-10-03T16:02:11.000Z'
        '400':
          description: >-
            Validation failed. Check the request body and query parameters
            against the schema on this operation. `message` lists every field
            that failed validation. `assignee_id` that is not a member of the
            team returns `Tasks can only be assigned to a member of your team`.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message:
                  - due_at cannot be in the past
                error: Bad Request
                statusCode: 400
                request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        '403':
          description: >-
            Forbidden. Either the `x-api-key` header is missing, malformed,
            revoked or belongs to another team, or the acting member was
            refused: `user_id` is not an active member of the key's team (`The
            acting user is not an active member of this team`), or has no active
            plan or seat (`error` is `NO_ACTIVE_PLAN`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: The acting user is not an active member of this team
                error: Forbidden
                statusCode: 403
                request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        '404':
          description: >-
            Not Found. `contact` is not a contact on your team (`Contact not
            found on this team`). The API does not confirm that records on other
            teams exist.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Contact not found on this team
                error: Not Found
                statusCode: 404
                request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          description: >-
            Unprocessable Entity. `body` was sent with an action other than
            `manual_email`. Nothing is created.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Only a manual email task has an email body
                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:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Makes this write safe to retry. Send a unique value, such as a UUID, and
        send the same value again when you retry the same request. A retry with
        the same key and the same request (method, path including the query
        string, and JSON body) returns the original successful response without
        acting twice. The same key with a different body or path returns 409,
        and so does a retry while the first request is still running; that one
        is safe to repeat after a moment. A request that fails frees its key, so
        a retry runs the write again: after a 5xx on a create, confirm with a
        GET before retrying. Keys are kept for 24 hours and are scoped to your
        team.
      schema:
        type: string
      example: 8f14e45f-ea3b-4d1c-9c2a-1b0d3f6a2e77
  schemas:
    CreateTaskDTO:
      type: object
      properties:
        user_id:
          type: string
          description: >-
            The team member this call acts as. Must be an active member of the
            team the API key belongs to. Recorded as the task's creator.
          example: 507f1f77bcf86cd799439011
        action:
          type: string
          enum:
            - call
            - manual_email
            - generic
            - linkedin_connect
            - linkedin_message
            - linkedin_view
            - linkedin_interact
            - meeting
            - sms
          description: >-
            What the task asks for. `call` is placed on the assignee's Sequencer
            dial list. Completing `manual_email` sends a real email. `generic`
            is a plain to-do. `linkedin_connect`, `linkedin_message`,
            `linkedin_view`, `linkedin_interact`, `meeting` and `sms` are
            reminders: nothing is sent or dialed for them.
        due_at:
          format: date-time
          type: string
          description: >-
            ISO 8601 instant, at most 365 days ahead. A time up to 5 minutes in
            the past is accepted, to absorb clock skew and latency; anything
            earlier returns `due_at cannot be in the past`. Convert the rep's
            local date and time to an instant yourself.
        priority:
          type: string
          enum:
            - high
            - medium
            - low
          default: medium
          description: Priority band. Defaults to `medium`.
        assignee_id:
          type: string
          description: >-
            Who holds the task, as a team member id. Must be a member of the
            team. Defaults to `user_id`.
        subject:
          type: string
          maxLength: 998
          description: >-
            Short title. For a `manual_email` task, also the email's subject
            line.
        note:
          type: string
          maxLength: 2000
          description: Instructions for whoever works the task.
        body:
          type: string
          maxLength: 20000
          description: >-
            Up to 20,000 characters. A draft email for a `manual_email` task:
            the rep sees it in the composer and sends it as it is or edited.
            Plain text: a blank line starts a new paragraph and a single line
            break stays a line break. HTML is not rendered; tags reach the
            recipient exactly as typed. Variables are not filled in: an email
            whose subject or body still has a `{{...}}` is not sent, and the
            task stays `pending` with an `error_reason` such as `Not sent: fill
            in {{first_name}} first`. A `body` with any other action is refused
            with 422. `null` is the same as leaving it out.
        contact:
          type: string
          description: >-
            The contact the task is about: a 24-character contact id on your
            team. An id from another team returns 404.
      required:
        - user_id
        - action
        - due_at
        - contact
      example:
        user_id: 64b7f0c2e4b0a1b2c3d4e5f1
        contact: 66f9b1e0a2c3d4e5f6a7b8c9
        action: linkedin_connect
        due_at: '2026-10-06T16:00:00Z'
        priority: medium
        subject: Connect after the webinar
        note: Mention her question about territory planning.
    SequencerTask:
      type: object
      description: >-
        A task in a rep's queue. `contact`, `sequence`, `sequence_step` and
        `user` are documented as ids, but responses expand some of them into
        objects, as each property says.
      properties:
        _id:
          type: string
          description: 24-character hexadecimal id.
          example: 507f1f77bcf86cd799439011
        team:
          type: string
          description: Team id.
        user:
          type: string
          description: >-
            Assignee, as a team member id. `GET /v2/sequencer/tasks` with the
            default `sort=due` expands it to an object with `_id`, `first_name`,
            `last_name`, `email` and `image`.
        contact:
          type: string
          description: >-
            The contact the task is about. Every task response expands it to an
            object: `_id` plus whichever of these are set: `first_name`,
            `last_name`, `email`, `linkedin_username`, `account` (company),
            `account_key`, `title`, `phone_numbers`, `timezone`, `website`,
            `email_domain`, `last_touched_at`, `last_touch`, `channel_stats`,
            `crm_facts`.
        sequence:
          type: string
          nullable: true
          description: >-
            The sequence that created the task. Absent on a one-off task. Every
            task response expands it to `_id` and `name`.
        sequence_state:
          type: string
          nullable: true
          description: The enrollment the task belongs to. Absent on a one-off task.
        sequence_step:
          type: string
          nullable: true
          description: >-
            The step that created the task. Absent on a one-off task. `GET
            /v2/sequencer/tasks` expands it to `_id`, `order`, `step_type` and
            `display_name`, and `GET /v2/sequencer/tasks/{id}` adds `task_note`;
            other responses return the id.
        origin:
          type: string
          enum:
            - sequence
            - one_off
          description: >-
            `sequence`: created by a sequence step or a reaction. `one_off`:
            created by a rep.
        created_by:
          type: string
          description: Who created a one-off task. Absent on sequence tasks.
        standalone:
          type: boolean
          description: >-
            True for tasks outside the cadence: every one-off task, and to-dos a
            reaction created. Completing or skipping one never moves an
            enrollment.
        action:
          type: string
          enum:
            - call
            - manual_email
            - generic
            - linkedin_connect
            - linkedin_message
            - linkedin_view
            - linkedin_interact
            - meeting
            - sms
          description: >-
            What the task asks for. Sequence steps create `call`, `manual_email`
            and `generic`; the LinkedIn actions, `meeting` and `sms` occur only
            on one-off tasks.
        state:
          type: string
          enum:
            - pending
            - held
            - completed
            - skipped
            - expired
            - cancelled
          description: >-
            `pending`: open. `held`: waiting while the enrollment is paused; it
            cannot be completed or skipped until it returns to `pending`.
            `completed` and `skipped`: resolved by a person. `expired`: skipped
            automatically at `autoskip_at`. `cancelled`: withdrawn, because the
            enrollment ended underneath it or a one-off task was cancelled.
        priority:
          type: string
          enum:
            - high
            - medium
            - low
          description: Priority band, copied from the step or set on a one-off task.
        subject:
          type: string
          nullable: true
          description: >-
            Short title: the step's display name on a sequence task, or what the
            creator entered on a one-off task.
        note:
          type: string
          nullable: true
          description: >-
            Instructions for the rep: the step's task note, or the one-off
            task's note. A `note` sent on completion replaces it.
        body:
          type: string
          description: >-
            The draft email of a `manual_email` task, in plain text: the step's
            template filled in when the step came due, a draft personalization
            wrote, or one sent through this API. A task drafted before
            `body_format` existed may hold HTML. After a send, the body that was
            sent.
        body_format:
          type: string
          enum:
            - text
            - html
          description: >-
            `text` on every draft written now. Absent on older tasks, whose
            `body` may be HTML.
        personalization:
          type: object
          nullable: true
          description: >-
            Present when AI personalization ran for this task's email: when, any
            `flags` worth checking before sending, and the `evidence` the draft
            relies on.
          properties:
            generated_at:
              type: string
              format: date-time
              description: When the draft was generated.
            flags:
              type: array
              items:
                type: string
              description: >-
                Anything to check before sending: `thin_evidence` (nothing
                specific to this person was found) or `too_long` (the rewrite
                came out far longer than the template). When an email could not
                be personalized at all, the task has no `personalization`; the
                timeline event records `fallback_template`, and
                `budget_exhausted` when the team's daily personalization budget
                was used up.
            evidence:
              type: array
              description: The facts the draft relies on, each with where it came from.
              items:
                type: object
                properties:
                  claim:
                    type: string
                    description: A fact the draft uses.
                  source:
                    type: string
                    description: Where the fact came from.
        attachments:
          type: array
          description: >-
            Files sent with the email. On a `manual_email` task from a sequence,
            the files its template had when the task was made; `[]` on other
            tasks. Read-only here: completing the task sends them.
          items:
            type: object
            properties:
              attachment:
                type: string
                description: The file's id (24 characters).
              file_name:
                type: string
              content_type:
                type: string
                description: Media type, such as `application/pdf`.
              file_size:
                type: integer
                description: Size in bytes.
              url:
                type: string
                description: A permanent link that redirects to the file.
        due_at:
          type: string
          format: date-time
          description: When the task is due.
        autoskip_at:
          type: string
          format: date-time
          description: >-
            When an untouched task is skipped automatically, moving to
            `expired`. Set from the step's auto-skip delay; absent when the step
            has none.
          nullable: true
        completed_at:
          type: string
          format: date-time
          description: When the task was completed or skipped.
          nullable: true
        held_at:
          type: string
          format: date-time
          description: >-
            When the task went `held` with its paused enrollment; null
            otherwise.
          nullable: true
        call_log:
          type: string
          nullable: true
          description: >-
            The call that resolved a call task: from a disposition in the
            dialer, or from `call_log` on complete.
        outcome_applied_at:
          type: string
          format: date-time
          description: >-
            When the outcome of the call that resolved this task was applied to
            the enrollment.
          nullable: true
        contact_list:
          type: string
          nullable: true
          description: >-
            The Sequencer dial list a pending call task is placed on; null or
            absent when it is not on one.
        contact_list_item:
          type: string
          nullable: true
          description: The task's row in that dial list.
        sending_claimed_at:
          type: string
          format: date-time
          description: >-
            Set while the email of a `manual_email` task is being sent. The task
            stays `pending` until the send is confirmed; a failed send clears
            this.
          nullable: true
        error_reason:
          type: string
          description: >-
            Why the sequencer handed this email to the rep instead of sending
            it, such as `Waiting for you: no first name`, or why its last send
            failed. Cleared when a new send starts.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    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
    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:
    Conflict:
      description: >-
        Conflict. The `Idempotency-Key` was already used for a different request
        (another body or path): send a new key. Or the first request with that
        key is still running: retry with the same key after a moment to get its
        response. Some operations also return 409 when the record's current
        state rules the action out, as their descriptions say; that one will not
        succeed on an identical retry.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: >-
              This Idempotency-Key was already used with a different request
              body.
            error: Conflict
            statusCode: 409
            request_id: 0f6d3c52-9f3e-4c1a-a4b8-2b1f7e5d9c10
    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.