Skip to content
Navigation

Update an automation

Patches an automation and recomputes its next fire time — on every write, not only a schedule change, so re-enabling one re-arms it. Pass threadId: null to forget the bound thread so the next fire starts a fresh one. Authorization: organization admin (plus space:contribute for a new named spaceId, for the caller and for the owner).

PATCH
https://api.cloudraker.com/organization/automations/{automationId}
Try it
Path parameters
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Path parameters

  • automationId
    string
    required

Request body JSON required

  • name
    optional
    string
    maxLength: 80 · minLength: 1
  • description
    optional
    string
    maxLength: 400
  • playbookId
    optional
    string
    maxLength: 128 · minLength: 1
  • prompt
    optional
    string

    The user message injected into the thread when the automation fires.

    maxLength: 4000 · minLength: 1
  • fileIds
    optional
    array of
    string
    minLength: 1
  • spaceId
    optional
    string
    maxLength: 128 · minLength: 1
  • threadPolicy
    optional
    reuse
    or
    new
  • schedule
    optional

    One of the following:

    • object
      • kind
        string
        required
      • expression
        string
        required
      • timezone
        string
        required
    • object
      • kind
        string
        required
      • at
        string
        required
        format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • object
      • kind
        string
        required
  • enabled
    optional
    boolean
  • triggerEnabled
    optional
    boolean
  • threadId
    optional
    null

Returns

200

The updated automation.

JSON
  • automation
    object
    required
    • _id
      string
      required
    • name
      string
      required
    • kind
      agent_task
      required
    • enabled
      boolean
      required
    • playbookId
      string
      required
    • prompt
      string
      required
    • spaceId
      string
      required
    • threadPolicy
      reuse
      or
      new
      required
    • runAs
      string
      required
    • createdBy
      string
      required
    • organizationId
      string
      required
    • schedule
      required

      One of the following:

      • object
        • kind
          string
          required
        • expression
          string
          required
        • timezone
          string
          required
      • object
        • kind
          string
          required
        • at
          string
          required
          format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
      • object
        • kind
          string
          required
    • nextRunAt
      string | null
      required
    • trigger
      object
      required
      • enabled
        boolean
        required
      • secretPreview
        string
        required
      • secretRotatedAt
        optional
        string
    • createdAt
      string
      required
    • updatedAt
      string
      required
    • runtimeStatus
      idle
      or
      disabled
      or
      needs_input
      or
      blocked
      or
      error
      required
    • cadence
      string
      required
    • triggerRef
      string
      required
    • description
      optional
      string
    • fileIds
      optional
      array of
      string
    • threadId
      optional
      string
    • lastFiredAt
      optional
      string
    • lastRunStatus
      optional
      started
      or
      success
      or
      busy
      or
      needs_input
      or
      blocked
      or
      error
    • lastRunId
      optional
      string
    • originThreadId
      optional
      string

400

Validation Error
JSON
  • success
    false
    required
  • error
    array of
    unknown
    required
  • data
    unknown
    required

404

Agents disabled, unknown automation, or space not contributable.

Type to search…

↑↓ navigate↵ selectEsc close