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

# Update Trigger Binding

> Take a binding online or offline, or change an agent's instruction.

Turning it online or changing the instruction also needs the target's
execute scope, as for create.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json patch /workspaces/{workspace_id}/triggers/{trigger_id}/bindings/{binding_id}
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/triggers/{trigger_id}/bindings/{binding_id}:
    patch:
      tags:
        - triggers
      summary: Update Trigger Binding
      description: |-
        Take a binding online or offline, or change an agent's instruction.

        Turning it online or changing the instruction also needs the target's
        execute scope, as for create.
      operationId: triggers-update_trigger_binding
      parameters:
        - name: trigger_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Trigger Id
        - name: binding_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Binding Id
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerBindingUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerBindingRead'
        '400':
          description: See detail.code
        '404':
          description: See detail.code
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    TriggerBindingUpdate:
      properties:
        status:
          anyOf:
            - $ref: '#/components/schemas/TriggerStatus'
            - type: 'null'
        instruction:
          anyOf:
            - type: string
              maxLength: 20000
              minLength: 1
              description: >-
                What the agent should do with each event. The event itself is
                added to the first message as data, never as instructions.
            - type: 'null'
          title: Instruction
          description: Agent bindings only.
      type: object
      title: TriggerBindingUpdate
    TriggerBindingRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        trigger_id:
          type: string
          format: uuid
          title: Trigger Id
        target_type:
          $ref: '#/components/schemas/TriggerTargetType'
        target_id:
          type: string
          format: uuid
          title: Target Id
          description: The workflow or agent preset ID
        target_name:
          type: string
          title: Target Name
          description: The workflow title or agent preset name
        instruction:
          anyOf:
            - type: string
            - type: 'null'
          title: Instruction
        status:
          $ref: '#/components/schemas/TriggerStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - trigger_id
        - target_type
        - target_id
        - target_name
        - instruction
        - status
        - created_at
        - updated_at
      title: TriggerBindingRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TriggerStatus:
      type: string
      enum:
        - online
        - offline
      title: TriggerStatus
      description: Whether a source, trigger or binding takes part in dispatch.
    TriggerTargetType:
      type: string
      enum:
        - workflow
        - agent
      title: TriggerTargetType
      description: What a trigger binding starts.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````

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