API Reference

Cortex API

Programmatic access to your agents, memory, and knowledge. Build custom workflows, integrations, and automations on top of Cortex.

Base URLhttps://api.launchcortex.ai/v1

Authentication

All API requests require an API key passed in the Authorization header. API keys are scoped per organization and prefixed with ctx_.

Authorization: Bearer ctx_your_api_key_here

Your API key

Paste your key here to auto-fill code examples and enable live request testing. Your key is never stored or sent to our servers.

Endpoints

All endpoints are authenticated and scoped to your organization. Click any endpoint to expand details, view code examples, and send live test requests.

Agents

Manage your deployed agents.

Memory

Read and manage the active memory facts your agent has learned from conversations.

Knowledge Hub

Access and update the structured knowledge documents built during onboarding.

Organization

Manage your organizational structure, teams, and members.

Skills

Enable and disable skills for an agent. Skills extend what your agent can do — browse the web, search memory, query data sources, and more.

Webhooks

Subscribe to real-time events and receive signed HTTP POST notifications when key actions occur in your organization.

Response Format

All responses are JSON. List endpoints return paginated data. Single-resource and action endpoints return a data object.

Success — list

{
  "data": [...],
  "pagination": {
    "offset": 0,
    "limit": 50,
    "total": 124
  }
}

Success — single object

{
  "data": {
    "id": "dep_abc123",
    "agent_name": "Support Bot",
    "status": "active",
    ...
  }
}

Error response

{
  "error": {
    "code": "not_found",
    "message": "Agent not found.",
    "status": 404
  }
}

Error codes

CodeHTTP StatusDescription
unauthorized401Authentication required. Provide a valid Bearer token.
forbidden403You do not have permission to access this resource.
not_found404The requested resource was not found.
bad_request400Invalid request parameters.
rate_limit_exceeded429Too many requests. Please slow down.
internal_error500An unexpected error occurred.

Rate Limits

Rate limits are enforced per API key. Every response includes rate limit headers so you can track your usage.

PlanRequests / minute
Individual60
Team120
EnterpriseCustom

Rate limit headers are included on every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1709500800

Webhooks

Subscribe to real-time events and receive signed HTTP POST notifications to your endpoint when key actions occur. Manage subscriptions via the Webhooks endpoints in the API.

Event types

agent.status_changedFired when an agent goes online or offline.
memory.fact_createdFired when a new fact is extracted from conversation.
memory.fact_promotedFired when a fact graduates to a new tier or scope.
deployment.provisionedFired when a new agent deployment is completed.

Payload shape

Every event is delivered as an HTTP POST with a JSON body:

{
  "event": "agent.status_changed",
  "org_id": "org_jkl012",
  "timestamp": "2025-03-01T10:00:00.000Z",
  "data": { ... }
}

Signature verification

Every delivery includes three headers. Use X-Cortex-Signature to verify the payload was sent by Cortex using the signing secret returned when you created the subscription. The secret is shown only once — store it securely.

X-Cortex-Event: agent.status_changed
X-Cortex-Signature: sha256=<hmac-sha256-hex>
X-Cortex-Timestamp: 2025-03-01T10:00:00.000Z

To verify: compute HMAC-SHA256(secret, rawBody) and compare it to the hex value after sha256= in the header.

// Node.js example
const crypto = require('crypto');

function verify(secret, rawBody, signatureHeader) {
  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(rawBody)
    .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signatureHeader),
  );
}

SDKs & Libraries

Official client libraries are on the way. In the meantime, the API is accessible from any HTTP client.

Coming soon

TypeScript / JavaScript

Node.js and browser compatible

Python

asyncio-compatible client

Example — list agents:

curl https://api.launchcortex.ai/v1/agents \
  -X GET \
  -H "Authorization: Bearer ctx_your_api_key_here"

Ready to build?

Generate your API key in the dashboard, then explore the full documentation for guides, concepts, and integration walkthroughs.