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

# Update trigger

<Snippet file="api/Triggers/update-trigger.mdx" />


## OpenAPI

````yaml PATCH /v1/triggers/{trigger_id}
openapi: 3.1.0
info:
  title: Adapter API
  description: Connect and sync data from any SaaS tool.
  version: 0.1.0
servers:
  - url: https://api.adapter.com
security:
  - ApiKeyAuth: []
tags:
  - name: connections
    description: Manage OAuth connections to data sources.
paths:
  /v1/triggers/{trigger_id}:
    patch:
      tags:
        - Triggers
      summary: Update trigger
      operationId: update_trigger
      parameters:
        - name: trigger_id
          in: path
          required: true
          schema:
            type: string
            title: Trigger Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerResponse'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthenticationErrorModel'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionDeniedErrorModel'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorModel'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityErrorModel'
          description: Unprocessable Content
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorModel'
          description: Internal Server Error
components:
  schemas:
    TriggerUpdateRequest:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
            - type: 'null'
          title: Name
          description: Replace the display name; pass null to clear it.
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
          description: >-
            Set true to re-enable a trigger, including one that was disabled
            automatically — this resets consecutive_failures to 0.
        filter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filter
        delivery:
          anyOf:
            - $ref: '#/components/schemas/WebhookDelivery'
            - type: 'null'
        kind:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Kind
          description: >-
            Replace the kind list — a list, or a single id as shorthand. Use '*'
            for any kind.
        entity_observation_fuzzy:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Entity Observation Fuzzy
          description: >-
            Accept fuzzy-matched entity observations in addition to exact
            matches. Only applies to 'observed'-action triggers on entity kinds.
      type: object
      title: TriggerUpdateRequest
    TriggerResponse:
      properties:
        id:
          type: string
          title: Id
        user_id:
          type: string
          title: User Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name, if you set one.
        kind:
          items:
            type: string
          type: array
          title: Kind
          description: Kind ids this trigger fires for; ['*'] means any kind.
        action:
          type: string
          title: Action
        filter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filter
        entity_observation_fuzzy:
          type: boolean
          title: Entity Observation Fuzzy
          description: >-
            Whether fuzzy-matched entity observations are accepted in addition
            to exact matches.
          default: false
        delivery:
          additionalProperties: true
          type: object
          title: Delivery
        enabled:
          type: boolean
          title: Enabled
        secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Secret
          description: >-
            Webhook signing secret, returned only in the create response — store
            it. Each delivery carries an 'Adapter-Signature: v1=<hex>' header;
            verify it by computing HMAC-SHA256 over '<Adapter-Timestamp
            header>.<raw request body>' with this secret and comparing hex
            digests. Reject deliveries whose timestamp is older than your replay
            window.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        last_fired_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Fired At
          description: >-
            When this trigger last matched an event and delivery was attempted,
            including failed deliveries.
        last_status:
          anyOf:
            - type: string
              enum:
                - delivered
                - failed
            - type: 'null'
          title: Last Status
          description: >-
            Outcome of your most recent delivery. Null until the trigger first
            fires.
        consecutive_failures:
          type: integer
          title: Consecutive Failures
          description: >-
            Consecutive events that failed to deliver, counted once per event
            after its final retry. Resets to 0 on success. At 50 the trigger is
            disabled automatically.
          default: 0
        auto_disabled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Auto Disabled At
          description: >-
            Set when the trigger was disabled automatically after 50 consecutive
            events failed to deliver. Fix your endpoint, then update the trigger
            with enabled=true to resume.
      type: object
      required:
        - id
        - user_id
        - kind
        - action
        - delivery
        - enabled
      title: TriggerResponse
    AuthenticationErrorModel:
      properties:
        error_code:
          type: string
          const: authentication_error
          title: Error Code
          default: authentication_error
        message:
          type: string
          title: Message
          default: Invalid or missing credentials.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: AuthenticationErrorModel
    PermissionDeniedErrorModel:
      properties:
        error_code:
          type: string
          const: permission_denied
          title: Error Code
          default: permission_denied
        message:
          type: string
          title: Message
          default: You do not have permission to perform this action.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: PermissionDeniedErrorModel
    NotFoundErrorModel:
      properties:
        error_code:
          type: string
          const: not_found
          title: Error Code
          default: not_found
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - message
      title: NotFoundErrorModel
    UnprocessableEntityErrorModel:
      properties:
        error_code:
          type: string
          const: unprocessable_entity
          title: Error Code
          default: unprocessable_entity
        message:
          type: string
          title: Message
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      required:
        - message
      title: UnprocessableEntityErrorModel
    InternalServerErrorModel:
      properties:
        error_code:
          type: string
          const: internal_server_error
          title: Error Code
          default: internal_server_error
        message:
          type: string
          title: Message
          default: An unexpected error occurred.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
      type: object
      title: InternalServerErrorModel
    WebhookDelivery:
      properties:
        kind:
          type: string
          const: webhook
          title: Kind
          default: webhook
        url:
          type: string
          title: Url
          description: Target URL to POST events to.
          examples:
            - https://example.com/hooks/adapter
      type: object
      required:
        - url
      title: WebhookDelivery
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Pass your `pk_live_...` API key as a Bearer token.

````