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

# Change or close a proactive task

> Changes what you send of a task; the rest stays. A new `schedule` moves its next run. `status: done` closes it, which needs no product; any other change needs AI CSM, as adding one does.



## OpenAPI

````yaml /api/statisfy-api.openapi.json patch /v1/digital_workers/{worker_id}/tasks/{task_id}
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}/tasks/{task_id}:
    patch:
      tags:
        - digital_workers
      summary: Change or close a proactive task
      description: >-
        Changes what you send of a task; the rest stays. A new `schedule` moves
        its next run. `status: done` closes it, which needs no product; any
        other change needs AI CSM, as adding one does.
      operationId: digital_workers_update_task
      parameters:
        - description: The worker's id, from GET /v1/digital_workers
          in: path
          name: worker_id
          required: true
          schema:
            type: string
        - description: The task's id, from GET /v1/digital_workers/{worker_id}/tasks
          in: path
          name: task_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                conditions:
                  anyOf:
                    - additionalProperties: true
                      type: object
                    - type: 'null'
                  default: null
                  description: >-
                    Narrows a book task to the accounts that match: the
                    `conditions` of an account segment, as in the worker's
                    `accounts.segment`. Null means the whole book. Book tasks
                    only
                  title: Conditions
                deadline:
                  anyOf:
                    - format: date-time
                      type: string
                    - type: 'null'
                  default: null
                  description: >-
                    A goal's deadline (ISO 8601; one without an offset is UTC):
                    once it passes, the worker stops checking the goal and its
                    status becomes needs_recheck. Goals only; null clears it
                  title: Deadline
                instructions:
                  default: null
                  description: >-
                    What the worker should do: added to its prompt every time
                    the task runs
                  maxLength: 10000
                  minLength: 1
                  title: Instructions
                  type: string
                schedule:
                  default: null
                  description: >-
                    When a recurring task runs, in UTC: a cron expression, or
                    daily or weekly at an hour. Recurring tasks only
                  discriminator:
                    mapping:
                      cadence: '#/components/schemas/CadenceSchedule'
                      cron: '#/components/schemas/CronSchedule'
                    propertyName: kind
                  oneOf:
                    - $ref: '#/components/schemas/CronSchedule'
                    - $ref: '#/components/schemas/CadenceSchedule'
                  title: Schedule
                status:
                  default: null
                  description: >-
                    open runs when due; done never runs again; needs_recheck is
                    a goal the worker reported blocked, or whose deadline
                    passed, for a person to look at
                  enum:
                    - open
                    - done
                    - needs_recheck
                  title: Status
                  type: string
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkerTask'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    CadenceSchedule:
      additionalProperties: false
      properties:
        cadence:
          enum:
            - daily
            - weekly
          title: Cadence
          type: string
        hour:
          default: 9
          description: The hour, 0 to 23 UTC
          maximum: 23
          minimum: 0
          title: Hour
          type: integer
        kind:
          const: cadence
          title: Kind
          type: string
        weekday:
          default: 0
          description: 'A weekly task''s day: 0 is Monday'
          maximum: 6
          minimum: 0
          title: Weekday
          type: integer
      required:
        - kind
        - cadence
      title: CadenceSchedule
      type: object
    CronSchedule:
      additionalProperties: false
      properties:
        expr:
          description: >-
            A five-field cron expression in UTC, such as `0 9 * * 1` (Mondays at
            09:00)
          maxLength: 255
          minLength: 1
          title: Expr
          type: string
        kind:
          const: cron
          title: Kind
          type: string
      required:
        - kind
        - expr
      title: CronSchedule
      type: object
    WorkerTask:
      properties:
        account_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The account an account task is about
          title: Account Id
        account_name:
          anyOf:
            - type: string
            - type: 'null'
          description: That account's name; null once it no longer exists
          title: Account Name
        conditions:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Narrows a book task to the accounts that match: the `conditions` of
            an account segment, as in the worker's `accounts.segment`. Null
            means the whole book
          title: Conditions
        created_at:
          description: ISO 8601 UTC
          title: Created At
          type: string
        deadline:
          anyOf:
            - type: string
            - type: 'null'
          description: A goal's deadline, ISO 8601 UTC
          title: Deadline
        id:
          title: Id
          type: string
        instructions:
          description: >-
            What the worker should do: added to its prompt every time the task
            runs
          title: Instructions
          type: string
        kind:
          description: >-
            one_off runs once, then is done; recurring runs on its `schedule`;
            goal is checked each time the worker runs while it is open, until
            the worker reports it achieved or blocked or its `deadline` passes
          enum:
            - one_off
            - recurring
            - goal
          title: Kind
          type: string
        next_run_at:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            When it is next due, ISO 8601 UTC; null when it is due whenever the
            worker next runs. It runs only while the worker's `outreach_enabled`
            is on
          title: Next Run At
        parked_at:
          anyOf:
            - type: string
            - type: 'null'
          description: Since when, ISO 8601 UTC
          title: Parked At
        parked_reason:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Why the worker isn't running it, such as a schedule or conditions
            that need repair, or a wait for its outreach budget; null when
            nothing holds it
          title: Parked Reason
        schedule:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            When a recurring task runs, in UTC: a cron expression, or daily or
            weekly at an hour
          title: Schedule
        scope:
          description: >-
            global is about your workspace and no one account; account is about
            the account in `account_id`; book is about each account the worker
            covers (its `accounts.segment`), once each period, narrowed by
            `conditions`
          enum:
            - global
            - account
            - book
          title: Scope
          type: string
        source:
          description: >-
            Who added it: human (a person, or a key), self (the worker, as a
            follow-up) or system (Statisfy: a default task, which you may
            change, or delete to opt out of it)
          enum:
            - human
            - self
            - system
          title: Source
          type: string
        status:
          description: >-
            open runs when due; done never runs again; needs_recheck is a goal
            the worker reported blocked, or whose deadline passed, for a person
            to look at
          enum:
            - open
            - done
            - needs_recheck
          title: Status
          type: string
        updated_at:
          description: ISO 8601 UTC
          title: Updated At
          type: string
        worker_id:
          title: Worker Id
          type: string
      required:
        - id
        - worker_id
        - kind
        - scope
        - account_id
        - account_name
        - instructions
        - schedule
        - deadline
        - conditions
        - status
        - source
        - next_run_at
        - parked_reason
        - parked_at
        - created_at
        - updated_at
      title: WorkerTask
      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.