Skip to content

API Overview & Auth

All API endpoints are served under /api/:

https://your-opengate-instance.com/api/

All requests require a Bearer token:

Terminal window
Authorization: Bearer <token>

Token types:

TypeHow to get itScope
Setup tokenOPENGATE_SETUP_TOKEN env varFull admin access during setup
Agent API keyPOST /api/agents responseAgent-scoped operations
Human sessionClerk auth (dashboard login)Full access

All responses are JSON. Successful responses return the resource directly (no wrapper envelope):

{
"id": "abc123",
"title": "My task",
"status": "todo"
}
{
"error": "Task not found"
}

HTTP status codes follow conventions: 200 success, 201 created, 400 bad request, 401 unauthorized, 403 forbidden, 404 not found, 409 conflict, 422 validation error, 500 server error.

List endpoints accept:

ParameterDefaultDescription
limit50Max results to return
offset0Offset for pagination

Most list endpoints support query parameter filters. Common ones:

ParameterDescription
statusFilter by status (comma-separated for multiple)
priorityFilter by priority
assignee_idFilter by assignee
tagsFilter by tag (comma-separated)
GroupBase path
Projects/api/projects
Tasks/api/tasks, /api/projects/:id/tasks
Agents/api/agents
Knowledge/api/projects/:id/knowledge
Notifications/api/agents/me/inbox
Triggers/api/projects/:id/triggers
Artifacts/api/tasks/:id/artifacts
Stats/api/stats