Skip to main content

API Overview

The AgentGate API provides programmatic access to all AgentGate functionality.

Base URL

https://agentgate.mynewapi.com
All API requests must use HTTPS.

Authentication

Authenticate using your organization API key in the Authorization header:
Authorization: Bearer org_live_xxxxxxxxxxxxxxxx
See Authentication for details on obtaining and managing API keys.

Request Format

  • Use Content-Type: application/json for request bodies
  • Request bodies must be valid JSON
  • Dates use ISO 8601 format
curl -X POST https://agentgate.mynewapi.com/v1/work-orders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"taskPrompt": "...", "workspaceSource": {...}}'

Response Format

All responses are JSON:
{
  "data": {
    // Response payload
  }
}
Error responses:
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable message",
    "details": {}
  }
}

Pagination

List endpoints support pagination:
ParameterDescriptionDefault
limitResults per page20
offsetNumber of results to skip0
Response includes pagination info:
{
  "data": [...],
  "total": 100,
  "limit": 20,
  "offset": 0
}

Rate Limits

See Rate Limits for details. Headers included in responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705316100

API Endpoints

Work Orders

MethodEndpointDescription
POST/v1/work-ordersCreate a work order
GET/v1/work-orders/{id}Get work order details

Runs

MethodEndpointDescription
GET/v1/runsList runs
GET/v1/runs/{id}Get run details
POST/v1/runs/{id}/cancelCancel a run

Credits

MethodEndpointDescription
GET/v1/creditsGet credit balance
GET/v1/credits/usageGet usage history

Webhooks

MethodEndpointDescription
GET/v1/webhooksList webhooks
POST/v1/webhooksCreate a webhook
GET/v1/webhooks/{id}Get webhook details
PATCH/v1/webhooks/{id}Update a webhook
DELETE/v1/webhooks/{id}Delete a webhook
POST/v1/webhooks/{id}/testTest a webhook

Templates

MethodEndpointDescription
GET/v1/templatesList templates
POST/v1/templatesCreate a template
GET/v1/templates/{id}Get template details
PUT/v1/templates/{id}Update a template
DELETE/v1/templates/{id}Delete a template

SDKs

Official SDKs are available for: SDKs handle authentication, retries, and provide typed interfaces.

Playground

Use the interactive playground on each endpoint page to test API calls directly in the documentation.
You’ll need to enter your API key to use the playground.