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

# Handle incoming webhook

> **Enterprise feature.**

Trigger a tool execution from an external webhook (Stripe, GitHub, etc.).

The request body becomes the tool's input payload.
Returns 202 Accepted immediately and executes the tool asynchronously.

Also handles webhook challenge/verification patterns inline:
- **monday.com, Slack:** POST body `{ challenge: "..." }` → echoes challenge as JSON
- **Generic:** POST body `{ verification_token: "...", type: "verification" }` → echoes token as JSON




## OpenAPI

````yaml /openapi.yaml post /hooks/{toolId}
openapi: 3.0.0
info:
  title: superglue AI API
  version: 1.0.0
  description: API for running superglue AI tools
  contact:
    name: superglue AI Support
    email: stefan@superglue.ai
servers:
  - url: https://api.superglue.ai/v1
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /hooks/{toolId}:
    post:
      tags:
        - Webhooks
      summary: Handle incoming webhook
      description: >
        **Enterprise feature.**


        Trigger a tool execution from an external webhook (Stripe, GitHub,
        etc.).


        The request body becomes the tool's input payload.

        Returns 202 Accepted immediately and executes the tool asynchronously.


        Also handles webhook challenge/verification patterns inline:

        - **monday.com, Slack:** POST body `{ challenge: "..." }` → echoes
        challenge as JSON

        - **Generic:** POST body `{ verification_token: "...", type:
        "verification" }` → echoes token as JSON
      operationId: triggerWebhook
      parameters:
        - name: toolId
          in: path
          required: true
          schema:
            type: string
          description: ID of the tool to trigger
          example: handle-stripe-webhook
        - name: mode
          in: query
          required: false
          schema:
            type: string
            enum:
              - prod
              - dev
            default: prod
          description: >
            Execution mode for system resolution. Use "dev" to execute with
            sandbox/dev system credentials.
          example: prod
      requestBody:
        required: false
        description: Webhook payload from the external service. Becomes the tool's input.
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              example:
                id: evt_1234
                type: customer.created
                data:
                  object:
                    id: cus_abc123
                    email: user@example.com
      responses:
        '202':
          description: Webhook accepted, tool execution started
          headers:
            X-Trace-Id:
              schema:
                type: string
              description: Trace ID for this request
          content:
            application/json:
              schema:
                type: object
                required:
                  - runId
                  - status
                  - toolId
                properties:
                  runId:
                    type: string
                    description: ID of the created run
                    example: 7f3e9c1a-2b4d-4e8f-9a3b-1c5d7e9f2a4b
                  status:
                    type: string
                    enum:
                      - accepted
                    example: accepted
                  toolId:
                    type: string
                    description: ID of the triggered tool
                    example: handle-stripe-webhook
        '400':
          description: Tool is archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Tool not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            message:
              type: string
              example: Invalid input parameters
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: Static API Key
      description: >
        Static API key authentication using Bearer token scheme.

        Include your API key in the Authorization header: `Authorization: Bearer
        YOUR_API_KEY`


        Alternatively, you can use the `token` query parameter to authenticate.


        API keys can be generated in your superglue dashboard.

````