curl -X GET https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123 \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123',
headers={
'Authorization': 'Bearer mint_your_api_key_here'
}
)
data = response.json()
print(data)
{
"sessionId": "session_abc123",
"subdomain": "your-docs",
"branch": "agent-updates",
"haulted": true,
"haultReason": "completed",
"pullRequestLink": "https://github.com/your-org/your-repo/pull/123",
"messageToUser": "Successfully updated the getting started guide with installation instructions.",
"todos": [
{
"content": "Update installation section",
"status": "completed",
"priority": "high",
"id": "todo_1"
},
{
"content": "Add code examples",
"status": "completed",
"priority": "medium",
"id": "todo_2"
}
],
"createdAt": "2024-03-15T10:30:00.000Z"
}
Agent
Get Agent Job
Retrieve the details and status of a specific agent job
GET
/
v1
/
agent
/
{projectId}
/
job
/
{id}
curl -X GET https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123 \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123',
headers={
'Authorization': 'Bearer mint_your_api_key_here'
}
)
data = response.json()
print(data)
{
"sessionId": "session_abc123",
"subdomain": "your-docs",
"branch": "agent-updates",
"haulted": true,
"haultReason": "completed",
"pullRequestLink": "https://github.com/your-org/your-repo/pull/123",
"messageToUser": "Successfully updated the getting started guide with installation instructions.",
"todos": [
{
"content": "Update installation section",
"status": "completed",
"priority": "high",
"id": "todo_1"
},
{
"content": "Add code examples",
"status": "completed",
"priority": "medium",
"id": "todo_2"
}
],
"createdAt": "2024-03-15T10:30:00.000Z"
}
This endpoint retrieves the details and status of a specific agent job by its unique identifier. Use this to check the progress, status, and results of a previously created agent job.
Authentication
Requires an admin API key (prefixed withmint_). Generate one on the API keys page in your dashboard.
Path Parameters
string
required
The unique identifier of the agent job to retrieve.
Response
The response includes information such as:- Job execution status and completion state
- Branch information and pull request details
- Session metadata and timestamps
string
The unique session identifier.
string
The subdomain this session belongs to.
string
Git branch name where changes were made.
boolean
Whether the session execution was halted.
string
Reason for session halt. Possible values:
completed, github_missconfigured, error.string
Link to the created pull request.
string
Message for the user about the session outcome.
array
string
Timestamp when the session was created (ISO 8601 format).
curl -X GET https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123 \
-H "Authorization: Bearer mint_your_api_key_here"
const response = await fetch(
'https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123',
{
method: 'GET',
headers: {
'Authorization': 'Bearer mint_your_api_key_here',
},
}
);
const data = await response.json();
console.log(data);
import requests
response = requests.get(
'https://api.mintlify.com/v1/agent/your_project_id/job/session_abc123',
headers={
'Authorization': 'Bearer mint_your_api_key_here'
}
)
data = response.json()
print(data)
{
"sessionId": "session_abc123",
"subdomain": "your-docs",
"branch": "agent-updates",
"haulted": true,
"haultReason": "completed",
"pullRequestLink": "https://github.com/your-org/your-repo/pull/123",
"messageToUser": "Successfully updated the getting started guide with installation instructions.",
"todos": [
{
"content": "Update installation section",
"status": "completed",
"priority": "high",
"id": "todo_1"
},
{
"content": "Add code examples",
"status": "completed",
"priority": "medium",
"id": "todo_2"
}
],
"createdAt": "2024-03-15T10:30:00.000Z"
}