curl -X POST https://api.mintlify.com/v1/agent/your_project_id/job \
-H "Authorization: Bearer mint_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"branch": "agent-updates",
"messages": [
{
"role": "user",
"content": "Update the getting started guide to include installation instructions for npm, yarn, and pnpm"
}
],
"asDraft": false,
"model": "sonnet"
}'
Agent job created successfully (streaming response)
X-Message-Id: msg_abc123def456
Create an agent job to automatically edit your documentation
curl -X POST https://api.mintlify.com/v1/agent/your_project_id/job \
-H "Authorization: Bearer mint_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"branch": "agent-updates",
"messages": [
{
"role": "user",
"content": "Update the getting started guide to include installation instructions for npm, yarn, and pnpm"
}
],
"asDraft": false,
"model": "sonnet"
}'
Agent job created successfully (streaming response)
X-Message-Id: msg_abc123def456
This endpoint creates an agent job based on provided messages and branch information. The job executes asynchronously and returns a streaming response with the execution details and results. If a branch doesn’t exist, the agent creates one. If files are edited successfully, a pull request is automatically created at the end of the job.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mintlify/docs/llms.txt
Use this file to discover all available pages before exploring further.
mint_). Generate one on the API keys page in your dashboard.
sonnet for faster, cost-effective processing. Use opus for more capable, but slower processing.Possible values: sonnet, opuscurl -X POST https://api.mintlify.com/v1/agent/your_project_id/job \
-H "Authorization: Bearer mint_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"branch": "agent-updates",
"messages": [
{
"role": "user",
"content": "Update the getting started guide to include installation instructions for npm, yarn, and pnpm"
}
],
"asDraft": false,
"model": "sonnet"
}'
Agent job created successfully (streaming response)
X-Message-Id: msg_abc123def456