Skip to main content
GET
/
agent
/
{projectId}
/
job
/
{id}
Get agent job
curl --request GET \
  --url https://api.mintlify.com/v2/agent/{projectId}/job/{id} \
  --header 'Authorization: Bearer <token>'
{
  "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"
}
This endpoint retrieves the current status and details of a specific agent job. Use it to poll for completion and retrieve the PR link once the agent creates one.

Job statuses

StatusDescription
activeThe job is currently running
completedThe job finished successfully
failedThe job encountered an error
archivedThe job has been archived

Polling recommendations

  • Poll every 5-10 seconds while the job is active
  • Stop polling once the status is completed, failed, or archived
  • The prLink field is populated once the agent creates a pull request

Response fields

FieldDescription
idUnique identifier for the job
statusCurrent status of the job
source.repositoryGitHub repository URL
source.refGit branch name where changes are made
modelAI model used for the job
prLinkURL of the created pull request (null until created)
createdAtTimestamp when the job was created
archivedAtTimestamp when the job was archived (null if active)

Authorizations

Authorization
string
header
required

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.

Path Parameters

projectId
string
required

Your project ID. Can be copied from the API keys page in your dashboard.

id
string
required

The unique identifier of the agent job to retrieve.

Response

Agent job details retrieved successfully.

id
string

Unique identifier for the agent job.

status
enum<string>

Current status of the agent job.

Available options:
active,
completed,
archived,
failed
source
object

Information about the source repository.

model
string

The AI model used for this job.

URL of the pull request created by the agent. Null until the PR is created.

createdAt
string<date-time>

Timestamp when the job was created.

archivedAt
string<date-time> | null

Timestamp when the job was archived. Null if still active.