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

# Try a worker's outreach on one account

> Runs one proactive session of the worker for one account, with its open proactive tasks, live or under `changes` (the settings PATCH takes, but `outreach`: a 422, since it applies only when sending) or a saved `version_id`, and returns whether it would write and the emails it would send, addressed by name. Nothing is sent, saved or claimed: its tasks stay as they are. A worker with no open task is a 409. Outreach is part of AI CSM. A session takes ten seconds to a few minutes.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/digital_workers/{worker_id}/preview_outreach
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/digital_workers/{worker_id}/preview_outreach:
    post:
      tags:
        - digital_workers
      summary: Try a worker's outreach on one account
      description: >-
        Runs one proactive session of the worker for one account, with its open
        proactive tasks, live or under `changes` (the settings PATCH takes, but
        `outreach`: a 422, since it applies only when sending) or a saved
        `version_id`, and returns whether it would write and the emails it would
        send, addressed by name. Nothing is sent, saved or claimed: its tasks
        stay as they are. A worker with no open task is a 409. Outreach is part
        of AI CSM. A session takes ten seconds to a few minutes.
      operationId: digital_workers_preview_outreach
      parameters:
        - description: The worker's id, from GET /v1/digital_workers
          in: path
          name: worker_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                account_id:
                  description: >-
                    The account it reaches out to, from GET
                    /v1/objects/account/records
                  maxLength: 255
                  minLength: 1
                  title: Account Id
                  type: string
                changes:
                  $ref: '#/components/schemas/WorkerChanges'
                  default: null
                  description: >-
                    Settings to try instead of the live ones, as PATCH
                    /v1/digital_workers/{worker_id} takes them, without
                    `status`. Nothing is saved
                  title: Changes
                version_id:
                  anyOf:
                    - maxLength: 64
                      type: string
                    - type: 'null'
                  default: null
                  description: Try a saved version instead
                  title: Version Id
              required:
                - account_id
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutreachPreview'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkerChanges:
      additionalProperties: false
      description: >-
        A change to try before it goes live: the settings PATCH takes, without
        ``status``.
      properties:
        accounts:
          $ref: '#/components/schemas/AccountsChange'
          default: null
          title: Accounts
        assignment:
          $ref: '#/components/schemas/AssignmentChange'
          default: null
          title: Assignment
        autonomy:
          $ref: '#/components/schemas/AutonomyChange'
          default: null
          title: Autonomy
        channels:
          $ref: '#/components/schemas/ChannelsChange'
          default: null
          title: Channels
        description:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: 'Its job, in plain words: every conversation it has opens with this'
          title: Description
        knowledge_base_ids:
          default: null
          description: >-
            The knowledge bases it searches when it answers, by id from GET
            /v1/knowledge_bases: replaced whole, [] clears them
          items:
            type: string
          maxItems: 100
          title: Knowledge Base Ids
          type: array
        name:
          default: null
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        outreach:
          $ref: '#/components/schemas/OutreachChange'
          default: null
          title: Outreach
        persona:
          $ref: '#/components/schemas/PersonaChange'
          default: null
          title: Persona
        skill_keys:
          default: null
          description: >-
            The skills it can use, by key from GET /v1/skills: replaced whole,
            [] clears them. A skill added must be one that list holds, and must
            not run in a sub-agent, which a worker never starts
          items:
            maxLength: 255
            minLength: 1
            type: string
          maxItems: 50
          title: Skill Keys
          type: array
        third_party_tools:
          $ref: '#/components/schemas/ThirdPartyToolsChange'
          default: null
          description: >-
            The MCP servers and API Tools vendors connected to your workspace
            that it may use, and which of their tools. Each one's approval
            policy is set in the app and kept as it is
          title: Third Party Tools
        tools:
          anyOf:
            - items:
                $ref: '#/components/schemas/WorkerToolkitIn'
              maxItems: 50
              type: array
            - type: 'null'
          default: null
          description: >-
            The built-in tools it may use, by toolkit (GET
            /v1/digital_workers/toolkits). Null: every tool of every built-in
            toolkit. Replaced whole; null goes back to every tool
          title: Tools
      title: WorkerChanges
      type: object
    OutreachPreview:
      properties:
        acted:
          description: >-
            Whether it would write: false when it judged the account needs
            nothing now
          title: Acted
          type: boolean
        emails:
          description: What it would send; empty is an answer, not a failure
          items:
            $ref: '#/components/schemas/PreviewedEmail'
          title: Emails
          type: array
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: Why the session stopped short, when it did
          title: Error
        summary:
          description: Its reasoning, whether or not it would write
          title: Summary
          type: string
        turns:
          title: Turns
          type: integer
        untested:
          description: >-
            The parts of `changes` a session never reads: they take effect once
            live
          items:
            type: string
          title: Untested
          type: array
      required:
        - acted
        - emails
        - summary
        - turns
        - error
        - untested
      title: OutreachPreview
      type: object
    AccountsChange:
      additionalProperties: false
      properties:
        segment:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            The accounts it covers: an account segment, the JSON the app's
            account filter builder saves (`entity` 4, the account, and its
            `conditions`). Null covers none. GET
            /v1/digital_workers/{worker_id}/accounts lists what it selects
          title: Segment
      required:
        - segment
      title: AccountsChange
      type: object
    AssignmentChange:
      additionalProperties: false
      properties:
        owner_field:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          default: null
          description: An account owner field's key; null clears it
          title: Owner Field
        people:
          default: null
          description: Teammates' person ids, replaced whole
          items:
            maxLength: 255
            minLength: 1
            type: string
          maxItems: 100
          title: People
          type: array
        strategy:
          default: null
          enum:
            - smart
            - round_robin
            - unassigned
          title: Strategy
          type: string
        to:
          default: null
          enum:
            - account_owner
            - people
          title: To
          type: string
        when_teammate_answers:
          default: null
          enum:
            - keep_owner
            - take_if_unowned
            - take
          title: When Teammate Answers
          type: string
      title: AssignmentChange
      type: object
    AutonomyChange:
      additionalProperties: false
      properties:
        channels:
          additionalProperties:
            anyOf:
              - enum:
                  - auto
                  - review
                type: string
              - type: 'null'
          default: null
          description: >-
            Each channel named follows this mode instead of `default`; null
            makes it follow `default` again. Channels left out are kept
          propertyNames:
            enum:
              - portal
              - in_app_sdk
              - email
              - slack
              - teams
              - ticket
          title: Channels
          type: object
        default:
          default: null
          description: >-
            auto sends on its own and holds a reply for a person when it judges
            one should look; review holds every reply for a person
          enum:
            - auto
            - review
          title: Default
          type: string
      title: AutonomyChange
      type: object
    ChannelsChange:
      additionalProperties: false
      properties:
        email:
          $ref: '#/components/schemas/EmailChannelChange'
          default: null
          title: Email
        in_app_sdk:
          $ref: '#/components/schemas/ChatChannelChange'
          default: null
          title: In App Sdk
        portal:
          $ref: '#/components/schemas/ChatChannelChange'
          default: null
          title: Portal
        slack:
          $ref: '#/components/schemas/SlackChannelChange'
          default: null
          title: Slack
        teams:
          $ref: '#/components/schemas/TeamsChannelChange'
          default: null
          title: Teams
        ticket:
          $ref: '#/components/schemas/TicketChannelChange'
          default: null
          title: Ticket
      title: ChannelsChange
      type: object
    OutreachChange:
      additionalProperties: false
      properties:
        audiences:
          default: null
          description: >-
            Who it writes to, in groups: each a contact segment (`entity` 10,
            the contact, and its `conditions`) with how it treats the people in
            it: sparing (only when it matters), working (its everyday contacts)
            or never. `key` is the audience's lasting id: rename `name` freely.
            Replaced whole
          items:
            $ref: '#/components/schemas/AudienceConfig'
          maxItems: 20
          title: Audiences
          type: array
        exclude_emails:
          default: null
          description: Addresses it never writes to, lower case. Replaced whole
          items:
            maxLength: 320
            minLength: 3
            type: string
          maxItems: 1000
          title: Exclude Emails
          type: array
        max_cc:
          default: null
          description: >-
            How many more of a customer's contacts it may copy on one email, 0
            to 10
          maximum: 10
          minimum: 0
          title: Max Cc
          type: integer
        quota:
          $ref: '#/components/schemas/OutreachQuotaChange'
          default: null
          description: >-
            Ceilings it never goes over: emails per customer a week and a month,
            to one person a week (counting every sender's email, campaigns too),
            and sends a minute, an hour and a day. Numbers left out are kept
          title: Quota
        sender_email:
          anyOf:
            - maxLength: 320
              minLength: 3
              type: string
            - type: 'null'
          default: null
          description: >-
            The address its outreach is sent from: its
            `channels.email.company_address` or one of its
            `channels.email.addresses`. Null sends from the first of those that
            can send. null clears it
          title: Sender Email
      title: OutreachChange
      type: object
    PersonaChange:
      additionalProperties: false
      properties:
        ai_disclosure:
          default: null
          enum:
            - transparent
            - branded
            - hybrid
          title: Ai Disclosure
          type: string
        greeting:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: null clears it
          title: Greeting
        guardrails:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: null clears it
          title: Guardrails
        voice:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: null clears it
          title: Voice
      title: PersonaChange
      type: object
    ThirdPartyToolsChange:
      additionalProperties: false
      properties:
        api_tools:
          default: null
          description: >-
            Replaced whole; [] removes every vendor. A vendor it keeps keeps its
            approval policy
          items:
            $ref: '#/components/schemas/ThirdPartyVendorIn'
          maxItems: 50
          title: Api Tools
          type: array
        mcp_servers:
          default: null
          description: >-
            Replaced whole; [] removes every server. A server it keeps keeps its
            approval policy
          items:
            $ref: '#/components/schemas/ThirdPartyServerIn'
          maxItems: 50
          title: Mcp Servers
          type: array
      title: ThirdPartyToolsChange
      type: object
    WorkerToolkitIn:
      additionalProperties: false
      properties:
        excluded:
          description: Tools it may not use
          items:
            maxLength: 255
            minLength: 1
            type: string
          maxItems: 500
          title: Excluded
          type: array
        tool_settings:
          anyOf:
            - additionalProperties:
                additionalProperties: true
                type: object
              propertyNames:
                maxLength: 255
                minLength: 1
              type: object
            - type: 'null'
          default: null
          description: >-
            Settings of the tools that take them, by tool name; left out keeps
            the stored ones
          title: Tool Settings
        toolkit:
          description: The toolkit's key, from GET /v1/digital_workers/toolkits
          maxLength: 255
          minLength: 1
          title: Toolkit
          type: string
        tools:
          anyOf:
            - const: all
              type: string
            - items:
                maxLength: 255
                minLength: 1
                type: string
              maxItems: 500
              type: array
          default: all
          description: '"all", or the names of the tools it may use'
          title: Tools
      required:
        - toolkit
      title: WorkerToolkitIn
      type: object
    PreviewedEmail:
      properties:
        body:
          description: HTML, as it would be sent
          title: Body
          type: string
        subject:
          title: Subject
          type: string
        to_email:
          anyOf:
            - type: string
            - type: 'null'
          title: To Email
        to_name:
          anyOf:
            - type: string
            - type: 'null'
          title: To Name
        to_person_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The contact's person id
          title: To Person Id
      required:
        - to_person_id
        - to_name
        - to_email
        - subject
        - body
      title: PreviewedEmail
      type: object
    EmailChannelChange:
      additionalProperties: false
      properties:
        acknowledge:
          default: null
          title: Acknowledge
          type: boolean
        acknowledgement:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: What it tells the customer when a reply waits for a person
          title: Acknowledgement
        addresses:
          default: null
          description: Replaced whole
          items:
            maxLength: 320
            minLength: 3
            type: string
          maxItems: 20
          title: Addresses
          type: array
        company_address:
          anyOf:
            - maxLength: 320
              minLength: 3
              type: string
            - type: 'null'
          default: null
          description: null clears it
          title: Company Address
        enabled:
          default: null
          title: Enabled
          type: boolean
        forwarding:
          default: null
          title: Forwarding
          type: boolean
        shared_mailboxes:
          default: null
          description: Replaced whole
          items:
            maxLength: 320
            minLength: 3
            type: string
          maxItems: 20
          title: Shared Mailboxes
          type: array
        take_in_unknown_senders:
          default: null
          description: >-
            Whether mail to it from a sender it can't place (no account, or an
            account no worker covers) shows on the board for a person to answer;
            it never answers that mail itself. Unset, it is on for a support
            worker and off for any other
          title: Take In Unknown Senders
          type: boolean
        watch_mailboxes:
          default: null
          title: Watch Mailboxes
          type: boolean
      title: EmailChannelChange
      type: object
    ChatChannelChange:
      additionalProperties: false
      properties:
        acknowledgement:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: What it tells the customer when a reply waits for a person
          title: Acknowledgement
        enabled:
          default: null
          title: Enabled
          type: boolean
      title: ChatChannelChange
      type: object
    SlackChannelChange:
      additionalProperties: false
      properties:
        acknowledge:
          default: null
          title: Acknowledge
          type: boolean
        acknowledgement:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: What it tells the customer when a reply waits for a person
          title: Acknowledgement
        enabled:
          default: null
          title: Enabled
          type: boolean
        grouping:
          default: null
          enum:
            - thread
            - topic
          title: Grouping
          type: string
      title: SlackChannelChange
      type: object
    TeamsChannelChange:
      additionalProperties: false
      properties:
        acknowledge:
          default: null
          title: Acknowledge
          type: boolean
        acknowledgement:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: What it tells the customer when a reply waits for a person
          title: Acknowledgement
        enabled:
          default: null
          title: Enabled
          type: boolean
      title: TeamsChannelChange
      type: object
    TicketChannelChange:
      additionalProperties: false
      properties:
        create_tickets:
          additionalProperties:
            enum:
              - never
              - not_deflected
              - always
            type: string
          default: null
          description: >-
            Which channels' conversations also get a ticket in the system:
            not_deflected when the worker hands the conversation to a person,
            always for every one. A channel left out (or never) gets none.
            Channels left out are kept
          propertyNames:
            enum:
              - email
              - slack
              - teams
              - portal
              - in_app_sdk
          title: Create Tickets
          type: object
        enabled:
          default: null
          title: Enabled
          type: boolean
        group_ids:
          default: null
          description: >-
            It answers only tickets in these groups (Salesforce: queues), by id
            from the system's `groups`; empty is every group. Replaced whole
          items:
            maxLength: 255
            minLength: 1
            type: string
          maxItems: 200
          title: Group Ids
          type: array
        system:
          default: null
          description: >-
            The ticketing system it answers tickets in: zendesk or salesforce,
            one GET /v1/digital_workers/ticketing_options lists. One at a time;
            null while none is chosen. Changing it starts that system's groups,
            tags and tickets afresh
          maxLength: 255
          minLength: 1
          title: System
          type: string
        tags:
          default: null
          description: >-
            It answers only tickets with one of these tags (not Salesforce);
            empty is every ticket. Replaced whole
          items:
            maxLength: 255
            minLength: 1
            type: string
          maxItems: 200
          title: Tags
          type: array
      title: TicketChannelChange
      type: object
    AudienceConfig:
      additionalProperties: false
      description: >-
        One audience: a contact segment plus how this worker treats the people

        it matches.


        ``key`` is the audience's stable identity — a short slug, unique within

        the worker, stamped on every hold the worker writes under it and named
        by

        the quarter's golds; rename ``name`` freely, never the key. ``segment``
        is

        the same loose Segment JSONB the account book uses (entity + nested

        condition groups), over the CONTACT entity. ``treatment`` is the closed

        set the gate, the cadence and the guidance key on; ``guidance`` is the

        admin's own words for writing to these people, which the worker reads

        where it decides — the agentic half, next to the governed half.
      properties:
        guidance:
          default: ''
          maxLength: 1000
          title: Guidance
          type: string
        key:
          pattern: ^[a-z0-9][a-z0-9_-]{0,31}$
          title: Key
          type: string
        name:
          maxLength: 80
          minLength: 1
          title: Name
          type: string
        segment:
          additionalProperties: true
          title: Segment
          type: object
        treatment:
          enum:
            - sparing
            - working
            - never
          title: Treatment
          type: string
      required:
        - key
        - name
        - treatment
        - segment
      title: AudienceConfig
      type: object
    OutreachQuotaChange:
      additionalProperties: false
      properties:
        per_customer_per_month:
          anyOf:
            - maximum: 100000
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          description: 'null: Statisfy''s default'
          title: Per Customer Per Month
        per_customer_per_week:
          anyOf:
            - maximum: 100000
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          description: 'null: Statisfy''s default'
          title: Per Customer Per Week
        per_person_per_week:
          anyOf:
            - maximum: 100000
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          description: 'null: Statisfy''s default'
          title: Per Person Per Week
        sends_per_day:
          anyOf:
            - maximum: 100000
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          description: 'null: Statisfy''s default'
          title: Sends Per Day
        sends_per_hour:
          anyOf:
            - maximum: 100000
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          description: 'null: Statisfy''s default'
          title: Sends Per Hour
        sends_per_minute:
          anyOf:
            - maximum: 100000
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          description: 'null: Statisfy''s default'
          title: Sends Per Minute
      title: OutreachQuotaChange
      type: object
    ThirdPartyVendorIn:
      additionalProperties: false
      properties:
        guidance:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: What it is told about when and how to use this vendor
          title: Guidance
        tools:
          description: >-
            The vendor's actions it may call, as GET /v1/agents/toolkits names
            them (`<vendor>__<action>`) or by the action's own name
          items:
            maxLength: 255
            minLength: 1
            type: string
          maxItems: 500
          title: Tools
          type: array
        vendor:
          description: >-
            The vendor's key: its toolkit key in GET /v1/agents/toolkits, after
            api_tools__
          maxLength: 255
          minLength: 1
          title: Vendor
          type: string
      required:
        - vendor
        - tools
      title: ThirdPartyVendorIn
      type: object
    ThirdPartyServerIn:
      additionalProperties: false
      properties:
        guidance:
          anyOf:
            - maxLength: 10000
              type: string
            - type: 'null'
          default: null
          description: What it is told about when and how to use this server
          title: Guidance
        server:
          description: >-
            The MCP server's key: its toolkit key in GET /v1/agents/toolkits,
            after mcp_3p__
          maxLength: 255
          minLength: 1
          title: Server
          type: string
        tools:
          description: >-
            The server's tools it may call, as GET /v1/agents/toolkits names
            them (`<server>__<tool>`) or by the tool's own name
          items:
            maxLength: 255
            minLength: 1
            type: string
          maxItems: 500
          title: Tools
          type: array
      required:
        - server
        - tools
      title: ThirdPartyServerIn
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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