curl --request POST \
--url https://api.mintlify.com/v2/agent/{projectId}/job/{id}/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'{
"id": "<string>",
"status": "active",
"source": {
"repository": "<string>",
"ref": "<string>"
},
"model": "<string>",
"prLink": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z"
}Send a follow-up message to an existing agent job session for multi-turn conversations.
curl --request POST \
--url https://api.mintlify.com/v2/agent/{projectId}/job/{id}/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'{
"id": "<string>",
"status": "active",
"source": {
"repository": "<string>",
"ref": "<string>"
},
"model": "<string>",
"prLink": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z"
}active to receive messagescompleted or failed job returns an errorasync function sendFollowUp(projectId, jobId, message, apiKey) {
const response = await fetch(
`https://api.mintlify.com/v2/agent/${projectId}/job/${jobId}/message`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ prompt: message })
}
);
return response.json();
}
// Usage
const result = await sendFollowUp(
'my-project-id',
'job-123',
'Please also update the API reference to include the new parameter',
'mint_xxx'
);
The Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.
The unique identifier of the agent job to send a message to.
The message content to send to the agent.
Message sent successfully. The agent processes it in the background.
Unique identifier for the agent job.
Current status of the agent job.
active, completed, archived, failed Information about the source repository.
Show child attributes
The AI model used for this job.
URL of the pull request created by the agent. Null until the PR is created.
Timestamp when the job was created.
Timestamp when the job was archived. Null if still active.
Was this page helpful?