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

# Trigger automation with webhook

> This endpoint triggers an [Automation](/automations/getting-started) with a [Webhook](/automations/triggers#webhook) as the trigger.



## OpenAPI

````yaml post /webhook/automation/{automation_id}
openapi: 3.0.0
info:
  title: Thoughtly API
  version: 1.0.0
  contact:
    name: Thoughtly Support
    email: support@thoughtly.com
    url: https://thoughtly.com
servers:
  - url: https://api.thoughtly.com
    description: Production server
security:
  - ApiKeyAuth: []
    TeamIdAuth: []
paths:
  /webhook/automation/{automation_id}:
    post:
      tags:
        - webhooks
      summary: Trigger automation with webhook
      description: >-
        This endpoint triggers an [Automation](/automations/getting-started)
        with a [Webhook](/automations/triggers#webhook) as the trigger.
      parameters:
        - name: automation_id
          in: path
          required: true
          schema:
            type: string
          description: >-
            The unique ID of the automation associated with the webhook. Only
            Automations using the [Webhook
            trigger](/automations/triggers#webhook) are supported.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: >-
                The body of the request can be any arbitrary JSON object. There
                are no required fields, and you can send any data your external
                system needs to trigger the automation and pass it into
                downstream actions.


                While an Automation is in **Draft Mode**, this data will be used
                to update the test values for the automation. In **Live Mode**,
                this data will trigger the automation to process the data in
                real-time.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
      security: []
components:
  schemas:
    GenericResponse:
      type: object
      properties:
        error:
          type: object
          nullable: true
          description: >-
            An object containing error details, if any. This field will be
            populated if the API request fails or encounters an error. If the
            request is successful, this field will be null or omitted.
        data:
          type: object
          additionalProperties: true
          description: >-
            Contains the response data for the successful request. This field
            will vary based on the specific API endpoint being called and
            contains the main data returned from the API. For example, it may
            include information about a created contact, agent, or webhook
            subscription.
      required:
        - data
      description: >-
        The generic response format for all API requests. This structure ensures
        consistency in how success and error information is returned to the
        caller.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-token
      description: >-
        API key for the user making the request. This can be found via the
        [Developer Settings](https://app.thoughtly.com/settings/developer) page
        in the dashboard.
    TeamIdAuth:
      type: apiKey
      in: header
      name: team_id
      description: >-
        Team identifier, used to scope requests to a specific team. This can be
        found via the [Developer
        Settings](https://app.thoughtly.com/settings/developer) page in the
        dashboard.

````