Skip to main content

Base URL

All API requests use the following base URL:
https://api.meshai.dev

Authentication

Include your API key as a Bearer token in the Authorization header:
curl https://api.meshai.dev/agents \
  -H "Authorization: Bearer msh_YOUR_API_KEY"
API keys start with msh_. Create keys in the dashboard at Settings → API Keys. See Authentication for key types, scopes, and signup/login endpoints.

Response Format

All responses use a consistent envelope:

Success

{
  "success": true,
  "data": { ... }
}

Success (Paginated)

{
  "success": true,
  "data": [ ... ],
  "meta": {
    "total": 150,
    "page": 1,
    "limit": 20
  }
}

Error

{
  "success": false,
  "error": "Human-readable error message",
  "code": "VALIDATION_ERROR"
}

Common Error Codes

HTTP StatusCodeDescription
400VALIDATION_ERRORInvalid request body or parameters
401UNAUTHORIZEDMissing or invalid API key
402PLAN_LIMIT_REACHEDAgent limit or feature not available on your plan
403FORBIDDENInsufficient permissions or policy violation
404NOT_FOUNDResource not found
409CONFLICTResource already exists (e.g., duplicate agent name)
429RATE_LIMITEDToo many requests — retry after the Retry-After header value
500INTERNAL_ERRORServer error — contact support

Pagination

List endpoints support pagination with page and limit query parameters:
curl "https://api.meshai.dev/agents?page=2&limit=50" \
  -H "Authorization: Bearer msh_YOUR_API_KEY"
ParameterTypeDefaultDescription
pageinteger1Page number (1-based)
limitinteger20Results per page (max 100)
The response meta object contains the total count for building pagination UI.

Rate Limits

PlanRequests/min
Starter60
Professional300
Enterprise1,000
Enterprise PlusCustom
Rate-limited responses include a Retry-After header (seconds).

Content Type

All POST/PATCH/PUT requests must include:
Content-Type: application/json