Nexora

API Reference

Everything you need to integrate Nexora into your application. Authenticate users, create AI agents, send messages, and retrieve analytics programmatically.

Base URL

All API requests are made to the following base URL:

text
https://your-domain.com

Authentication

The Nexora API supports two authentication methods:

  • JWT Bearer Token -- Used for dashboard and management endpoints. Obtain tokens via the /api/auth/login endpoint.
  • API Key -- Used for the public chat API. Create API keys from your workspace settings. Pass via the Authorization header.
http
// Bearer token authentication
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

// API key authentication
Authorization: Bearer nxr_live_abc123...

Headers

Most management endpoints require the X-Workspace-ID header to scope requests to a specific workspace.

http
Content-Type: application/json
Authorization: Bearer <token>
X-Workspace-ID: your-workspace-id

Rate Limits

API requests are rate-limited to 100 requests per minute per IP address. If you exceed this limit you will receive a 429 Too Many Requests response. Implement exponential back-off in your integration to handle rate limiting gracefully.

Error Format

All errors follow a consistent JSON structure:

json
{
  "error": "Unauthorized",
  "message": "Invalid or expired token",
  "statusCode": 401
}

Quick Start

Here is a quick example showing how to authenticate and list your agents:

bash
# 1. Login to get an access token
curl -X POST https://your-domain.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "your-password"}'

# 2. List agents in a workspace
curl https://your-domain.com/api/agents \
  -H "Authorization: Bearer <access_token>" \
  -H "X-Workspace-ID: <workspace_id>"

Explore the API

Dive into each section to see endpoints, parameters, and example responses.