> ## 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 a webhook trigger with event data.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/triglit/openapi.documented.yml post /v1/gateway/triggers/{triggerId}/webhook
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/{triggerId}/webhook:
    post:
      tags:
        - Triggers
      summary: Trigger webhook
      description: Triggers a webhook trigger with event data.
      operationId: publictriggers_triggerWebhook_v1
      parameters:
        - name: triggerId
          required: true
          in: path
          description: Trigger identifier
          schema:
            example: trg_abc123def456
            type: string
        - 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/TriggerWebhookDto'
      responses:
        '200':
          description: Webhook triggered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerWebhookResponseDto'
        '400':
          description: Invalid request or trigger is not a webhook trigger
        '401':
          description: API key não fornecida, inválida ou não encontrada.
        '403':
          description: Tipo de chave não permitido para este endpoint.
        '404':
          description: Trigger not found
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Triglit from 'triglit';


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


            const response = await
            client.triggers.triggerWebhook('trg_abc123def456');


            console.log(response.dedupeKey);
components:
  schemas:
    TriggerWebhookDto:
      type: object
      properties:
        eventData:
          type: object
          additionalProperties:
            nullable: true
    TriggerWebhookResponseDto:
      type: object
      properties:
        dedupeKey:
          type: string
          description: Deduplication key
          example: webhook_user_123_2024-01-15T10:30:00.000Z
      required:
        - dedupeKey
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Chave de API do tenant (publishable key ou secret key)

````