DoubleX AgentesDocs

API reference › Basics

API overview

Base URL, authentication, request and response format, streaming and conventions of the HTTP API.

The DoubleX Agentes API is the same one the app uses. With it you create and configure agents, talk to them with streaming, call models directly, use connector tools, feed the Brain, manage skills and triggers, and download the files in Creations.

Base URL#

https://doublex.ai/api

Every route in this reference is relative to that address: GET /api/agents means GET https://doublex.ai/api/agents.

Authentication#

Send an API key in the Authorization header:

Terminal
curl https://doublex.ai/api/me -H "Authorization: Bearer $DOUBLEX_API_KEY"

The key acts as the person who owns it. Each route applies the same access rules as the app: you see and change only what that person sees and changes.

Requests#

  • Bodies in JSON, with Content-Type: application/json. The exception is uploading files to the Brain, which uses multipart/form-data.
  • Text in UTF-8.
  • Fields a route doesn't recognize are ignored.
  • Dates in ISO 8601, in UTC (2026-10-27T14:03:11.482Z).

Responses#

Successful responses are JSON, with the resource inside a key named after it:

JSON
{ "agent": { "id": "agt_8f3a2b1c9d0e", "name": "CRM Analyst", "...": "..." } }

Lists come in an array named in the plural ({ "agents": [...] }) and include everything you can see, with no pagination. Actions with nothing to return respond { "ok": true }.

New fields may appear in responses at any time. Ignore the ones you don't recognize.

Errors have the format { "error": "message" }, sometimes with a stable code. See Errors and limits.

Streaming (NDJSON)#

Routes that generate text with AI can respond in chunks, in NDJSON format: one JSON object per line, separated by \n, with Content-Type: application/x-ndjson. Read it line by line:

const res = await fetch("https://doublex.ai/api/agents/agt_8f3a2b1c9d0e/chat", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.DOUBLEX_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ message: "Summarize the sales from yesterday" }),
});
const reader = res.body.pipeThrough(new TextDecoderStream()).getReader();
let buffer = "";
for (;;) {
  const { value, done } = await reader.read();
  if (done) break;
  buffer += value;
  let nl;
  while ((nl = buffer.indexOf("\n")) >= 0) {
    const line = buffer.slice(0, nl).trim();
    buffer = buffer.slice(nl + 1);
    if (!line) continue;
    const event = JSON.parse(line);
    if (event.type === "text") process.stdout.write(event.delta);
  }
}

IDs#

IDs are strings with a prefix that tells you the resource type:

PrefixResource
agt_Agent
task_Conversation (session in the CLI)
trg_Trigger
con_Connector
kno_Brain document
skl_Skill
team_Team
usr_Person
key_API key

Scopes and permissions#

Agents, skills, Brain documents and connectors have a scope:

ScopeWho sees and uses itWho edits it
personalOnly the ownerThe owner and the organization's admins
teamMembers of the team (teamId)The owner, the team's admins and the organization's admins
organizationEveryone in the organizationThe owner and the organization's admins

Items you can't see respond 404, as if they didn't exist. Items you can see but can't edit respond 403 (or 404 on some routes) when you try to change them. The canEdit fields in responses tell you what you can edit.

Resources#

ResourceRoutes
AccountWho you are, language, API keys
AgentsCreate, list, configure and delete agents
ConversationsStream conversations, continue, cancel and read the history
ChatCall a model directly, without an agent
Models and creditsModel catalog, balance and usage
ConnectorsList connections and run tools
BrainNotes, folders, links and search in the Brain
SkillsReusable instructions
CreationsFiles created by agents
TriggersSchedules, webhooks and app events
TeamsThe organization's teams