Trigger automation webhook
POST
/
v2
/
workflow
/
/
/
webhook
Trigger automation webhook
curl --request POST \
--url https://api.mintlify.com/v2/workflow/{projectId}/{workflowSchemaId}/webhook \
--header 'Authorization: Bearer <token>'{
"success": true,
"runId": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Use this endpoint to run a custom automation with a Webhook trigger. Each request queues a run that uses the automation’s saved prompt and reads the full repository history. This endpoint ignores request bodies. This endpoint only supports custom automations with a webhook trigger. Predefined automations and automations with any other trigger return a 404 response. To trigger a scheduled custom automation on demand instead, use Trigger automation.
Use cases
Section titled “Use cases”- CI/CD pipelines: Run a custom automation on every merge to
mainor after a release, without waiting for a scheduled run. - Release events: Run a custom automation from a release script when you cut a tag or publish a new SDK version.
- Internal tooling: Trigger automations from internal dashboards, Slack commands, or scheduled jobs you already run.
Get the webhook URL and auth header
Section titled “Get the webhook URL and auth header”Open the Automations page in your dashboard and click the settings button on a custom automation with a webhook trigger. The trigger card shows the full webhook URL and a Copy auth header action for the Authorization: Bearer <api-key> header template. Replace <api-key> with an unexpired organization API key with write access. Create or manage keys on the API keys page. Automations do not create, store, or rotate keys on your behalf.
Example
Section titled “Example”Trigger a webhook automation from a GitHub Action whenever code merges to main:
on:
push:
branches: [main]
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- run: |
curl -fsS -X POST \
"https://api.mintlify.com/v2/workflow/$PROJECT_ID/$WORKFLOW_ID/webhook" \
-H "Authorization: Bearer ${{ secrets.MINTLIFY_API_KEY }}"
env:
PROJECT_ID: ${{ vars.MINTLIFY_PROJECT_ID }}
WORKFLOW_ID: ${{ vars.MINTLIFY_WORKFLOW_ID }}Rate limits
Section titled “Rate limits”This endpoint shares a rate limit with Trigger update and Trigger automation: up to 10 requests per 10 seconds per organization. Each queued run consumes credits at the same rate as any other custom automation run. See Credit pricing.
Authorizations
Section titled “Authorizations”Authorization
string
header
required
The Authorization header expects a Bearer token. Use an admin API key. This is a server-side secret key. Generate one on the API keys page in your dashboard.
Path Parameters
Section titled “Path Parameters”projectId
string
required
Your project ID. Copy it from the API keys page in your dashboard.
workflowSchemaId
string
required
The ID of the automation to trigger. Copy it from the automation's settings panel on the Automations page in your dashboard.
Response
Section titled “Response”Automation run queued successfully.
success
boolean
runId
string
The ID of the queued automation run. Appears in the run history on the Automations page.
⌘I