curl --request POST \
--url https://api.mintlify.com/v1/agent/{projectId}/job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch": "<string>",
"messages": [
{
"role": "system",
"content": "<string>"
}
],
"asDraft": true,
"model": "sonnet"
}
'"<string>"Creates a new agent job that can generate and edit documentation based on provided messages and branch information.
curl --request POST \
--url https://api.mintlify.com/v1/agent/{projectId}/job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"branch": "<string>",
"messages": [
{
"role": "system",
"content": "<string>"
}
],
"asDraft": true,
"model": "sonnet"
}
'"<string>"The Authorization header expects a Bearer token. Create an Admin API Key here.
The name of the Git branch that the agent should work on, will be automatically created if it doesn't exist
A list of messages to provide to the agent. A default system prompt is always prepended automatically, so you typically only need to include user messages.
Show child attributes
Control whether the pull request is created in draft or non-draft mode. When true, creates a draft pull request. When false, creates a regular (non-draft) pull request ready for review.
The AI model to use for the agent job. Use sonnet for faster, cost-effective processing. Use opus for more capable, but slower processing.
sonnet, opus Agent job created successfully (streaming response). X-Session-Id Header is sent back in the response
Streaming response containing the agent job execution details and results.
Was this page helpful?