Overview

Programmatic access to your Nairi organization. Manage agents, conversations, artifacts, vaults, and more.

The Nairi REST API lets you manage your organization's agents, run conversations, and configure artifacts (rules, MCP configs, skills, vaults, env vars, scheduled jobs) programmatically.

Base URL

All endpoints are served from:

https://api.nairi.ai

Authentication

Every request must include a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

You can generate API keys from your organization's settings in the Nairi dashboard.

Treat API keys like passwords. Never commit them to source control or share them publicly. If a key is compromised, revoke it from the dashboard.

Quick start

New to the API? The Quickstart walks through the full end-to-end flow — configure an agent, deploy it, and drive a conversation — with copy-paste code in bash, TypeScript, Ruby, Python, and Go.

What you can do

ID format

All resource IDs are 26-character ULIDs (lexicographically sortable, encoding both time and randomness). Most resources prefix the ULID with a short type tag so the kind of resource is obvious at a glance.

cci_01KEQ6963XS96YDP3NF9NKB7QJ
PrefixResource
cci_Agents (container integrations)
ccr_Agent resource assignments
cev_Agent environment variables
aar_Rules
amc_MCP configs
ask_Skills
vlt_Vaults
sec_Vault secrets
ai_Anthropic integrations
cc_Connected channels
sj_Scheduled jobs
job_ or j_Jobs (conversations). Newer jobs use job_. Older ones use j_. Treat both as valid.
cmsg_Conversation messages

Treat all IDs as opaque strings. Invalid IDs return 400 Bad Request.

Error handling

All errors share a consistent JSON shape:

{
  "error": "error message here"
}

Common status codes

StatusMeaning
200Success
201Created
202Accepted (async operation queued)
204No Content (successful delete)
400Bad Request. Invalid input or validation failure
401Unauthorized. Missing or invalid API key
404Not Found
500Internal Server Error

Conversation errors

When an agent fails to process a message:

  1. The user message's status is set to failed.

  2. A new system role message is appended with details. The content follows the format:

    nairid encountered error: <details>

Common scenarios:

  • The agent is disconnected or unreachable.
  • Task execution failure.

To detect errors, either poll the user message and check status: "failed", or list all messages and look for role: "system".

Versioning

The current API version is v1, served under the /api/public/v1/ prefix. Breaking changes will be released under a new version path. Non-breaking additions may roll out without notice.

On this page