Skip to main content
Trigger an autopilot analysis to determine if a pull request requires documentation updates. The autopilot agent will analyze the PR changes and create a suggestion if documentation updates are needed.

Endpoint

POST https://api.mintlify.com/v1/autopilot/:subdomain/suggestions/check

Authentication

This endpoint requires an admin API key. Include it in the Authorization header as a Bearer token.

Path parameters

Request body

Response

Example request

curl -X POST https://api.mintlify.com/v1/autopilot/my-docs/suggestions/check \
  -H "Authorization: Bearer mint_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "owner": "your-org",
    "repo": "your-repo",
    "pullRequestNumber": 123
  }'

Example response

{
  "status": "queued"
}

How it works

When you trigger a PR check:
  1. The autopilot agent fetches the pull request details from GitHub
  2. It analyzes the PR changes using an agentic workflow with access to:
    • Your documentation repository files
    • The code repository files
    • The PR diff and metadata
  3. If documentation updates are needed, it creates a suggestion in your autopilot dashboard
  4. You can review and act on the suggestion from your dashboard

Error responses

Notes

  • The Mintlify GitHub App must be installed on the repository owner’s organization
  • The analysis runs asynchronously - the endpoint returns immediately with a queued status
  • Check your autopilot dashboard to see the results of the analysis
  • This endpoint is automatically called by the GitHub webhook when PRs are merged to watched repositories