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

# Trigger webhook triggers by event

> Finds and triggers all active webhook triggers matching the specified event and subTenantId (if provided). This is a helper endpoint to facilitate workflow initiation by event name instead of trigger ID.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/triglit/openapi.documented.yml post /v1/gateway/triggers/webhook/by-event
openapi: 3.0.0
info:
  title: Triglit
  description: Documentação da API do Triglit
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/gateway/triggers/webhook/by-event:
    post:
      tags:
        - Triggers
      summary: Trigger webhook triggers by event
      description: >-
        Finds and triggers all active webhook triggers matching the specified
        event and subTenantId (if provided). This is a helper endpoint to
        facilitate workflow initiation by event name instead of trigger ID.
      operationId: publictriggers_triggerWebhookByEvent_v1
      parameters:
        - name: X-API-Key
          in: header
          description: Chave de API do tenant (publishable key ou secret key)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerByEventDto'
      responses:
        '200':
          description: Webhook triggers triggered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerByEventResponseDto'
        '400':
          description: Invalid request
        '401':
          description: API key não fornecida, inválida ou não encontrada.
        '403':
          description: Tipo de chave não permitido para este endpoint.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Triglit from 'triglit';


            const client = new Triglit({
              apiKey: 'My API Key',
            });


            const response = await client.triggers.triggerByEvent({ event: 'x'
            });


            console.log(response.total);
components:
  schemas:
    TriggerByEventDto:
      type: object
      properties:
        event:
          type: string
          minLength: 1
        subTenantId:
          type: string
        eventData:
          type: object
          additionalProperties:
            nullable: true
      required:
        - event
    TriggerByEventResponseDto:
      type: object
      properties:
        triggers:
          description: List of triggered webhook triggers
          type: array
          items:
            $ref: '#/components/schemas/TriggerByEventResponseItemDto'
        total:
          type: number
          description: Total number of triggers found and triggered
          example: 3
      required:
        - triggers
        - total
    TriggerByEventResponseItemDto:
      type: object
      properties:
        triggerId:
          type: string
          description: Trigger identifier
          example: trg_abc123def456
        dedupeKey:
          type: string
          description: Deduplication key
          example: tenant_123:sub_456:trg_abc123def456:1705312200000
      required:
        - triggerId
        - dedupeKey
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Chave de API do tenant (publishable key ou secret key)

````