API Reference
Complete reference for all Mindra Platform API endpoints.
Base URL
https://api.mindra.co
Authentication
All API requests require authentication using an API key in the Authorization header:
Authorization: Bearer mk_your_api_key
See Authentication Guide for details.
API Version
Current API version: v1
All endpoints are prefixed with /v1:
https://api.mindra.co/v1/orchestrate
https://api.mindra.co/v1/agents
https://api.mindra.co/v1/executions/:id
Endpoints Overview
Orchestration
POST /v1/orchestrate- Execute multi-agent orchestration
Agents
GET /v1/agents- List all available agentsGET /v1/agents/:id- Get agent detailsPOST /v1/agents- Register custom agent
Executions
GET /v1/executions/:id- Get execution statusGET /v1/executions- List your executionsPOST /v1/executions/:id/cancel- Cancel execution
Wallet
GET /v1/wallet- Get wallet balancePOST /v1/wallet/topup- Top up with credit cardGET /v1/wallet/crypto/address- Get crypto deposit addressGET /v1/wallet/transactions- List transactions
API Keys
GET /v1/api-keys- List API keysPOST /v1/api-keys- Create API keyPATCH /v1/api-keys/:id- Update API keyDELETE /v1/api-keys/:id- Delete API key
Health & Status
GET /health- Health checkGET /v1/auth/test- Test authentication
Request Format
Headers
All requests must include:
Authorization: Bearer mk_your_api_key
Content-Type: application/json
Optional headers:
X-Request-ID: unique_request_id # For request tracing
X-Idempotency-Key: unique_key # For idempotent operations
Request Body
JSON format for POST/PATCH requests:
{
"query": "Your instruction",
"context": {
"key": "value"
}
}
Response Format
Success Response
HTTP Status: 200 OK or 202 Accepted
{
"executionId": "exec_abc123",
"status": "PENDING",
"data": {...}
}
Error Response
HTTP Status: 4xx or 5xx
{
"error": "ERROR_CODE",
"message": "Human-readable error message",
"details": "Additional information",
"requestId": "req_abc123"
}
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST | 400 | Malformed request body |
UNAUTHORIZED | 401 | Invalid or missing API key |
FORBIDDEN | 403 | Insufficient permissions |
INSUFFICIENT_BALANCE | 402 | Wallet balance too low |
NOT_FOUND | 404 | Resource not found |
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
SERVICE_UNAVAILABLE | 503 | Temporary unavailability |
Rate Limits
| Tier | Requests/Minute | Requests/Day |
|---|---|---|
| Developer | 100 | 10,000 |
| Business | 500 | 100,000 |
| Enterprise | Custom | Custom |
Response headers include rate limit information:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1699632000
Pagination
List endpoints support pagination:
GET /v1/executions?page=2&limit=50
Parameters:
page(default: 1) - Page numberlimit(default: 20, max: 100) - Items per page
Response includes pagination metadata:
{
"data": [...],
"pagination": {
"page": 2,
"limit": 50,
"total": 237,
"pages": 5,
"hasNext": true,
"hasPrev": true
}
}
Filtering & Sorting
List endpoints support filtering and sorting:
GET /v1/executions?status=COMPLETED&sort=-createdAt
Common filters:
status- Filter by statusvertical- Filter by agent verticalstartDate/endDate- Date range
Sort format:
sort=field- Ascendingsort=-field- Descending (prefix with-)
Idempotency
POST requests support idempotency using the X-Idempotency-Key header:
curl -X POST https://api.mindra.co/v1/orchestrate \
-H "Authorization: Bearer $API_KEY" \
-H "X-Idempotency-Key: unique_key_123" \
-d '{...}'
If you retry with the same key within 24 hours, you'll receive the same response (cached).
Webhooks
Configure webhooks to receive event notifications:
{
"query": "...",
"webhook": {
"url": "https://your-app.com/webhooks/mindra",
"events": ["execution.completed", "execution.failed"],
"secret": "your_webhook_secret"
}
}
Webhook events:
execution.started- Execution beganexecution.completed- Execution finished successfullyexecution.failed- Execution failedagent.started- Individual agent startedagent.completed- Individual agent completed
Webhook payload:
{
"event": "execution.completed",
"executionId": "exec_abc123",
"timestamp": "2025-11-10T10:30:00Z",
"signature": "sha256=...",
"data": {...}
}
Verify signatures:
import hmac
import hashlib
def verify_webhook(payload, signature, secret):
expected = hmac.new(
secret.encode(),
payload.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)
SDKs
Official SDKs available:
Node.js
npm install @mindra/sdk
import { Mindra } from '@mindra/sdk';
const mindra = new Mindra({ apiKey: process.env.MINDRA_API_KEY });
const execution = await mindra.orchestrate({
query: 'Create an email campaign...',
context: {...}
});
Python
pip install mindra-sdk
from mindra import Mindra
mindra = Mindra(api_key=os.getenv('MINDRA_API_KEY'))
execution = mindra.orchestrate(
query='Create an email campaign...',
context={...}
)
Go
go get github.com/mindra-co/mindra-go
import "github.com/mindra-co/mindra-go"
client := mindra.NewClient(os.Getenv("MINDRA_API_KEY"))
execution, err := client.Orchestrate(ctx, &mindra.OrchestrationRequest{
Query: "Create an email campaign...",
Context: map[string]interface{}{...},
})
API Endpoints
Explore detailed documentation for each endpoint:
- Orchestration - Execute multi-agent workflows
- Agents - Manage agents
- Executions - Track execution status
- Wallet - Manage payments and billing
Testing
Sandbox Environment
Test your integration safely:
https://sandbox-api.mindra.co
Sandbox features:
- No charges applied
- Simulated agent responses
- Same API structure as production
- Separate API keys (prefix:
mk_test_)
Example: Sandbox Request
curl -X POST https://sandbox-api.mindra.co/v1/orchestrate \
-H "Authorization: Bearer mk_test_your_sandbox_key" \
-d '{
"query": "Test query",
"context": {}
}'
Support
- Documentation: docs.mindra.co
- API Status: status.mindra.co
- Support: info@mindra.co
Start with: Orchestration API →