API Documentation

Build with your Neurakal data

Connect reporting tools, scripts, and third-party applications to your account. The API is read-only: it cannot create discussions, run AI jobs, spend credits, or change your data.

Sign in to create an API key

Authentication

Create a personal API key in Integrations, choose its read permissions, and copy it into your private integration settings. Send the key in the Authorization header. Each key accesses only its owner's data. Neurakal integration credentials are not OpenRouter API keys.

API base URL

https://web.neurakal.com/api/v1
curl "https://web.neurakal.com/api/v1/forums" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Personal keys expire after 90 days and are shown only when created. Store credentials securely, use HTTPS in production, and never include tokens in URLs. Revoke a key in Integrations if it is exposed or no longer needed.

profile:read
Read your user ID, name, and email address.
forums:read
Read your discussions, personas, round summaries, arguments, and final decisions.

There are no default permissions. Select or request the scopes your integration needs. Every discussion endpoint is restricted to the authenticated user, including its nested resources.

Available endpoints

All paths below are relative to the API base URL. Replace {uuid} with a discussion UUID from the discussion list. Responses use JSON and never include passwords, OpenRouter keys, invitation credentials, execution tokens, or billing details.

GET /me

Read the connected account. Required scope: profile:read.

Response fields: id, name, email.

{
  "data": {
    "id": 42,
    "name": "Example User",
    "email": "[email protected]"
  }
}

GET /forums

List your discussions, newest update first. Required scope: forums:read. Paginated.

Response fields: uuid, topic, status, discussion_language, total_rounds, current_round, current_phase, run_mode, created_at, updated_at.

status (optional string)
Filter by an exact discussion status, for example draft, running, completed, or failed.
updated_since (optional date or timestamp)
Return discussions with updated_at on or after this value. This checks the discussion row, not independent edits to every round or argument.
curl --get "https://web.neurakal.com/api/v1/forums" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  --data-urlencode "status=completed" \
  --data-urlencode "updated_since=2026-11-01T00:00:00Z" \
  --data-urlencode "per_page=25"

GET /forums/{uuid}

Read one discussion. Required scope: forums:read.

Returns the same metadata fields as the discussion list, wrapped in a single data object. Use the nested endpoints below to retrieve its content.

GET /forums/{uuid}/agents

List discussion personas in their configured order. Required scope: forums:read. Paginated.

Response fields: id, role, name, persona, order_index, created_at, updated_at.

GET /forums/{uuid}/rounds

List rounds in round-number order, including summaries and reasoning reviews when available. Required scope: forums:read. Paginated.

Response fields: id, round_number, summary, reasoning_review, created_at, updated_at.

GET /forums/{uuid}/arguments

List arguments in creation order. Required scope: forums:read. Paginated.

Response fields: id, round_id, agent_id, type, content, created_at, updated_at.

round_id (optional positive integer): return only arguments from this round. Match agent_id to an agent ID from the personas endpoint.

GET /forums/{uuid}/decision

Read the final decision. Required scope: forums:read.

Response fields: id, content, created_at, updated_at.

Returns HTTP 200 with data: null when the discussion has no final decision yet.

{ "data": null }

Pagination and response format

All list endpoints accept page (a positive integer, default 1) and per_page (1-100, default 25). Single-resource endpoints return a data object; lists return a data array with pagination metadata.

This abbreviated example shows an empty list; non-empty data arrays contain the fields documented for that endpoint.

{
  "current_page": 1,
  "data": [],
  "last_page": 1,
  "next_page_url": null,
  "per_page": 25,
  "prev_page_url": null,
  "total": 0
}

Follow next_page_url until it is null. Pagination can shift while a discussion is running; re-fetch its nested resources as needed. The API is not a snapshot export or a change-event feed. Summary, argument, and decision content is source text, not pre-rendered HTML.

Key expiry and revocation

Personal API keys expire after 90 days. Create a separate key for each tool and grant only the read permissions it needs. Keep keys in server-side secrets or private tool configuration; never commit them to source control or bundle them in public frontend code.

Before a key expires, create a replacement in Settings / Integrations, update your tool to use the new key, then revoke the old key. Keys cannot be refreshed automatically.

Revoking a key immediately prevents further API access with that key. Other keys remain active. If a key is exposed, revoke it and create a replacement.

Errors and rate limits

The data API allows 60 authenticated requests per minute per user, shared across all their API keys. Creating and revoking keys is limited to 10 requests per minute per user. On HTTP 429, wait for the Retry-After interval before retrying.

401 - Unauthenticated
The API key is missing, invalid, expired, or revoked. Create a replacement key if it has expired or been revoked.
403 - Insufficient scope
The key does not include the required permission. Create a key with that scope.
404 - Not found
The discussion does not exist or belongs to another account.
422 - Validation error
A query parameter is invalid. Check the response errors object for field-specific messages.
429 - Too many requests
The request limit was reached. Back off rather than retrying immediately.

Data API errors use a message field, with an errors object containing field-specific messages on validation failures.

Browser integrations

Server-to-server integrations need no CORS setup. Browser integrations require the Neurakal administrator to allow their exact origin in INTEGRATION_ALLOWED_ORIGINS. Cross-origin cookies are not supported; send a Bearer token instead. There is no cross-origin browser access by default.