Skip to main content
POST
Trigger Autopilot webhook
Use this endpoint to start an Autopilot run from your own tools. Each request queues a run that follows the prompt in the request body, using the same context, skills, and review settings as Autopilot’s other runs. Autopilot must be enabled for the project.

Use cases

Autopilot already watches your connected repositories. Use the webhook for changes that happen outside them:
  • Feature launches: Update the docs when a feature flag rolls out to everyone or a beta becomes generally available.
  • Support tools: Send a docs request when your support team tags a ticket as a docs gap.
  • Internal tooling: Send docs requests from internal dashboards or scheduled jobs you already run.

Get the webhook URL and auth header

Open the Autopilot page in your dashboard. The Webhook section 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.

Example

Ask Autopilot to update the docs when a beta feature becomes generally available:

What happens after a request

Autopilot works on the prompt like any other run. When it opens or updates a pull request, it assigns reviewers and notifies your team the same way it does for code changes. Each run appears as its own thread on the Autopilot page. If Autopilot is paused, the run waits until you resume Autopilot.

Rate limits and credits

This endpoint shares a rate limit with Trigger update, Trigger automation, and Trigger automation webhook: up to 10 requests per 10 seconds per organization. A run costs 250 credits when it opens or updates a pull request. See Autopilot credits.

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

projectId
string
required

Your project ID. Copy it from the API keys page in your dashboard.

Body

application/json
prompt
string
required

Instructions for Autopilot, such as what changed and what to update in your docs.

Maximum string length: 20000

Response

Autopilot run queued successfully.

success
boolean

Always true when the run is queued.

runId
string

The ID of the queued Autopilot run.