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

# Trigger Bot

> Invoke your bot from any external platform by calling this API endpoint. The execution is asynchronous - the bot will be executed in the background.



## OpenAPI

````yaml POST /webhooks/{triggerId}/trigger
openapi: 3.0.3
info:
  title: lil'bots Webhook Triggers API
  description: API for triggering bot executions from external platforms
  version: 1.0.0
servers:
  - url: https://www.lilbots.io/api
    description: Production server
security:
  - triggerKeyHeader: []
paths:
  /webhooks/{triggerId}/trigger:
    post:
      summary: Trigger bot execution
      description: >-
        Invoke your bot from any external platform by calling this API endpoint.
        The execution is asynchronous - the bot will be executed in the
        background.
      operationId: triggerBot
      parameters:
        - name: triggerId
          in: path
          required: true
          description: The ID of the trigger
          schema:
            type: string
      requestBody:
        description: Any data that you want to send to your bot as inputs
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
              example:
                INPUT: VALUE
      responses:
        '200':
          description: Bot execution triggered successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  invocation:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The ID of the bot invocation
              example:
                success: true
                invocation:
                  id: inv_12345678
        '401':
          description: Unauthorized - Invalid trigger key
        '404':
          description: Not found - Invalid trigger ID
components:
  securitySchemes:
    triggerKeyHeader:
      type: apiKey
      in: header
      name: X-Key
      description: >-
        The key associated with the trigger. This key is displayed when you view
        the trigger in the UI.

````