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

# Update event trigger

> Update an existing event trigger on the specified agent. Only the fields supplied in the request body are changed; omitted fields keep their current value. Use `enabled` to pause (`false`) or resume (`true`) the trigger. As with creation, non-fatal prerequisite gaps are returned in the `warnings` array rather than failing the request.



## OpenAPI

````yaml patch /agents/{agent_id}/event-triggers/{trigger_id}
openapi: 3.0.3
info:
  version: 0.1.1
  title: Datagrid API
  description: Datagrid API
servers:
  - url: https://api.datagrid.com/v1
security:
  - BearerAuth: []
paths:
  /agents/{agent_id}/event-triggers/{trigger_id}:
    patch:
      tags:
        - Event Triggers
      summary: Update event trigger
      description: >-
        Update an existing event trigger on the specified agent. Only the fields
        supplied in the request body are changed; omitted fields keep their
        current value. Use `enabled` to pause (`false`) or resume (`true`) the
        trigger. As with creation, non-fatal prerequisite gaps are returned in
        the `warnings` array rather than failing the request.
      operationId: UpdateAgentEventTrigger
      parameters:
        - name: agent_id
          in: path
          required: true
          description: The ID of the agent that owns the event trigger.
          schema:
            type: string
        - name: trigger_id
          in: path
          required: true
          description: The ID of the event trigger to update.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentEventTriggerRequest'
      responses:
        '200':
          description: Updated event trigger
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentEventTriggerMutationResult'
        '400':
          description: >-
            Bad request. The body failed validation — e.g. an unknown property,
            a blank or over-long `trigger_event`, or an over-long
            `name`/`description`/`run_conditions`.
        '404':
          description: >-
            Not found. The requested agent or event trigger does not exist, or
            the authenticated API key does not have permission to access it.
        '429':
          description: >-
            Rate limit exceeded. The request has been throttled because the rate
            limit for this endpoint has been reached. Check the `Retry-After`
            response header and retry after the specified number of seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
components:
  schemas:
    UpdateAgentEventTriggerRequest:
      type: object
      description: >-
        Fields to update on the event trigger. Only supplied fields change;
        omitted fields keep their current value. `trigger_source` is set at
        creation and cannot be changed — to switch providers, delete the trigger
        and create a new one.
      properties:
        enabled:
          type: boolean
          description: Set to `true` to resume the trigger; `false` to pause it.
        trigger_event:
          type: string
          maxLength: 255
          description: >-
            Updated event in `"ResourceName:eventType"` format. Omit to leave
            the current event unchanged.
        name:
          type: string
          description: Updated name. Pass `null` to clear.
          maxLength: 255
          nullable: true
        description:
          type: string
          description: Updated description. Pass `null` to clear.
          maxLength: 1000
          nullable: true
        run_conditions:
          type: string
          description: Updated run conditions. Pass `null` to clear.
          maxLength: 3000
          nullable: true
        response_thread:
          $ref: '#/components/schemas/AgentEventTriggerResponseThread'
          nullable: true
    AgentEventTriggerMutationResult:
      allOf:
        - $ref: '#/components/schemas/AgentEventTrigger'
        - type: object
          required:
            - warnings
          properties:
            warnings:
              type: array
              description: >-
                Non-fatal issues surfaced while wiring up the trigger (e.g.
                Procore company/project/credential prerequisite gaps). An empty
                array means the trigger was configured with no issues. Each
                entry pairs a stable machine-readable `code` with a
                human-readable `message`.
              items:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    description: >-
                      Stable machine-readable identifier for the warning (e.g.
                      `procore_not_connected`, `registration_failed`). Safe to
                      branch on without parsing `message`.
                  message:
                    type: string
                    description: Human-readable explanation of the warning.
    RateLimitError:
      type: object
      description: >-
        Returned when the rate limit is exceeded. Rate limits are enforced per
        teamspace, endpoint path, and HTTP method over a 60-second sliding
        window. Each endpoint may have its own limit — check the
        X-RateLimit-Limit response header for the effective value.
      required:
        - error
        - message
        - retryable
        - status_code
      properties:
        status_code:
          type: integer
          description: The HTTP status code (429).
        statusCode:
          type: integer
          deprecated: true
          description: Deprecated. Use status_code instead.
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: The error code identifying this as a rate limit error.
        message:
          type: string
          description: A human-readable error message.
        mitigation:
          type: string
          description: Suggested action to resolve the error.
        retryable:
          type: boolean
          description: Whether the request can be retried after a delay.
        details:
          type: object
          properties:
            reason:
              type: string
              description: A detailed explanation of why the rate limit was exceeded.
    AgentEventTriggerResponseThread:
      type: string
      description: >-
        Controls how the agent's response conversation is threaded when the
        trigger fires. `create_new_thread_each_time` starts a fresh thread for
        every event; when omitted, responses reuse a single thread.
      enum:
        - create_new_thread_each_time
    AgentEventTrigger:
      type: object
      required:
        - object
        - id
        - enabled
        - trigger_source
        - trigger_event
        - name
        - description
        - run_conditions
        - response_thread
        - created_at
        - updated_at
      properties:
        object:
          type: string
          enum:
            - event_trigger
          description: The object type, always 'event_trigger'.
        id:
          type: string
          description: Unique identifier for the event trigger.
        enabled:
          type: boolean
          description: >-
            Whether the trigger is active. When `false` the agent does not run
            in response to the event until it is re-enabled.
        trigger_source:
          $ref: '#/components/schemas/AgentEventTriggerSource'
        trigger_event:
          type: string
          description: >-
            The event that fires the agent, in `"ResourceName:eventType"` format
            (e.g. `"Tasks:create"`, `"Project Users:update"`).
        name:
          type: string
          description: User-provided name for the App Event automation.
          nullable: true
        description:
          type: string
          description: User-provided description of what the App Event automation does.
          nullable: true
        run_conditions:
          type: string
          description: >-
            Optional natural-language conditions that must hold for the agent to
            run when the event fires. When null, the agent runs on every
            matching event.
          nullable: true
        response_thread:
          $ref: '#/components/schemas/AgentEventTriggerResponseThread'
          nullable: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the event trigger was created.
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the last modification to the event trigger.
    AgentEventTriggerSource:
      type: string
      description: >-
        The external provider that emits the event. Currently only Procore is
        supported.
      enum:
        - procore
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````