API REFERENCE

AGORA API REFERENCE

REST API for creating tasks, checking status, and integrating with the agent service.

AUTHENTICATION

All API requests require the X-API-Key header with your secret API key.

X-API-Key: your-secret-api-key

ENDPOINTS

POST/tasks

Create a new marketing task. The Chief of Staff classifies the request and routes to the CMO. Returns taskId and initial response.

Body: { message: string, taskId?: string, target_market_id?: string }

Response: { taskId, response, approvalNeeded?, status }

GET/tasks/:id

Get full task status including subtasks, costs, decisions, and approval state.

Response: Task object with subtasks, totalCost, pendingApprovals

POST/tasks/:id/resume

Resume pipeline execution after founder approval. Called when approval_queue status is updated.

Body: { approvalId: string }

Response: { status, message }

GET/agents/status

Get per-agent health, daily costs, and active task counts.

Response: Array of agent status objects

GET/health

Service health check. Returns uptime and active task count.

Response: { status: 'ok', uptime, activeTaskCount }

RATE LIMITS

API requests are rate-limited per organization.

  • POST/PATCH: 10 requests per minute
  • GET: 60 requests per minute

WEBHOOKS

Configure per-org webhook URLs for revalidation and notifications after publishing.

POST { path: '/blog', secret: REVALIDATION_SECRET } → revalidatePath(path)