API Reference

Complete REST API reference for the CognitiveX platform. All endpoints use JSON for requests and responses.

Base URL

https://api.cognitivex.ai/v1

Authentication

All API requests require authentication via Bearer token in the Authorization header:

bash
curl -X POST https://api.cognitivex.ai/v1/memory/store \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "Your content here"}'

Get your API key from the dashboard.

Response Format

All successful responses return JSON with this structure:

json
{
  "success": true,
  "data": {
    // Response data here
  },
  "meta": {
    "timestamp": "2024-01-01T00:00:00Z",
    "requestId": "req_abc123"
  }
}

Error Format

Error responses include detailed information:

json
{
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Content is required",
    "details": {
      "field": "content"
    }
  }
}

Rate Limits

Rate limit information is included in response headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640000000

When rate limit is exceeded, you'll receive a 429 status code. See Authentication for plan limits.