Skip to content
Merged
357 changes: 357 additions & 0 deletions admin-openapi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,357 @@
{
"openapi": "3.0.1",
"info": {
"title": "Mintlify Admin API",
"description": "An API for administrative operations including documentation updates and agent management.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.mintlify.com/v1"
}
],
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/admin/update/{domain}": {
"post": {
"summary": "Trigger update",
"description": "Triggers an update of your documentation site.",
"parameters": [
{
"name": "domain",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The domain identifier from your `domain.mintlify.app` URL. Can be found in the top left of your dashboard."
}
],
"responses": {
"200": {
"description": "Update triggered successfully"
}
}
}
},
"/admin/update/{domain}/status": {
"get": {
"summary": "Get update status",
"description": "Retrieves the status of documentation updates and other details about your docs.",
"parameters": [
{
"name": "domain",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The domain identifier from your `domain.mintlify.app` URL. Can be found in the top left of your dashboard."
}
],
"responses": {
"200": {
"description": "Update status retrieved successfully"
}
}
}
},
"/agent/job/{projectId}": {
"post": {
"summary": "Create agent job",
"description": "Creates a new agent job that can generate and edit documentation based on provided messages and branch information.",
"parameters": [
{
"name": "projectId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of your project. Can be retrieved from your dashboard."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"branch",
"messages"
],
"properties": {
"branch": {
"type": "string",
"description": "The name of the Git branch that the agent should work on, will be automatically created if it doesn't exist"
},
"messages": {
"type": "array",
"description": "A list of previous messages to provide to the agent.",
"items": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"enum": ["system", "user"],
"description": "The role of the message sender."
},
"content": {
"type": "string",
"description": "The content of the message."
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Agent job created successfully (streaming response). X-Session-Id Header is sent back in the response",
"headers": {
"X-Message-Id": {
"schema": {
"type": "string"
},
"description": "Message identifier for the created job"
}
},
"content": {
"text/plain": {
"schema": {
"type": "string",
"description": "Streaming response containing the agent job execution details and results."
}
}
}
}
}
}
},
"/agent/{projectId}/job/{id}": {
"get": {
"summary": "Get agent job by ID",
"description": "Retrieves the details and status of a specific agent job by its ID.",
"parameters": [
{
"name": "projectId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of your project. Can be retrieved from your dashboard."
},
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The unique identifier of the agent job to retrieve."
}
],
"responses": {
"200": {
"description": "Agent job details retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"sessionId": {
"type": "string",
"description": "The subdomain this session belongs to."
},
"subdomain": {
"type": "string",
"description": "The subdomain this session belongs to."
},
"branch": {
"type": "string",
"description": "Git branch name where changes were made.",
"nullable": true
},
"haulted": {
"type": "boolean",
"description": "Whether the session execution was halted."
},
"haultReason": {
"type": "string",
"enum": ["completed", "github_missconfigured", "error"],
"description": "Reason for session halt."
},
"pullRequestLink": {
"type": "string",
"description": "Link to the created pull request."
},
"messageToUser": {
"type": "string",
"description": "Message for the user about the session outcome."
},
"todos": {
"type": "array",
"description": "List of todo items from the session.",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Brief description of the task."
},
"status": {
"type": "string",
"enum": ["pending", "in_progress", "completed", "cancelled"],
"description": "Current status of the task."
},
"priority": {
"type": "string",
"enum": ["high", "medium", "low"],
"description": "Priority level of the task."
},
"id": {
"type": "string",
"description": "Unique identifier for the todo item."
}
}
}
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the session was created."
}
}
}
}
}
}
}
}
},
"/agent/{projectId}/jobs": {
"get": {
"summary": "Get all agent jobs",
"description": "Retrieves all agent jobs for the specified domain, including their status and details.",
"parameters": [
{
"name": "projectId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of your project. Can be retrieved from your dashboard."
}
],
"responses": {
"200": {
"description": "All agent jobs retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allSessions": {
"type": "array",
"description": "Array of all agent sessions for the domain.",
"items": {
"type": "object",
"properties": {
"sessionId": {
"type": "string",
"description": "The subdomain this session belongs to."
},
"subdomain": {
"type": "string",
"description": "The subdomain this session belongs to."
},
"branch": {
"type": "string",
"description": "Git branch name where changes were made.",
"nullable": true
},
"haulted": {
"type": "boolean",
"description": "Whether the session execution was halted."
},
"haultReason": {
"type": "string",
"enum": ["completed", "github_missconfigured", "error"],
"description": "Reason for session halt."
},
"pullRequestLink": {
"type": "string",
"description": "Link to the created pull request."
},
"messageToUser": {
"type": "string",
"description": "Message for the user about the session outcome."
},
"todos": {
"type": "array",
"description": "List of todo items from the session.",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Brief description of the task."
},
"status": {
"type": "string",
"enum": ["pending", "in_progress", "completed", "cancelled"],
"description": "Current status of the task."
},
"priority": {
"type": "string",
"enum": ["high", "medium", "low"],
"description": "Priority level of the task."
},
"id": {
"type": "string",
"description": "Unique identifier for the todo item."
}
}
}
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the session was created."
}
}
}
}
}
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"description": "The Authorization header expects a Bearer token. Create an [Admin API Key](https://dashboard.mintlify.com/settings/organization/api-keys) here."
}
}
}
}
6 changes: 2 additions & 4 deletions api-reference/agent/create-agent-job.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
---
openapi: POST /agent/job/{domain}
openapi: POST /agent/job/{projectId}
---

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 draft pull request is automatically created at the end of the job.

Check warning on line 7 in api-reference/agent/create-agent-job.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-reference/agent/create-agent-job.mdx#L7

In general, use active voice instead of passive voice ('are edited').

## Rate limits

The agent API has the following limits:

- 10,000 uses per key per month
- 10,000 requests per Mintlify organization per hour
- 10,000 requests per IP per day
- 100 uses per Mintlify project per hour

## Suggested usage

Expand Down
2 changes: 1 addition & 1 deletion api-reference/agent/get-agent-job.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
openapi: GET /agent/{domain}/job/{id}
openapi: GET /agent/{projectId}/job/{id}
---

## Usage
Expand Down
2 changes: 1 addition & 1 deletion api-reference/agent/get-all-jobs.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
openapi: GET /agent/{domain}/jobs
openapi: GET /agent/{projectId}/jobs
---

## Usage
Expand Down
Loading
Loading