Arca HTTP API
Use the API to run Arca chats from your application or a background job. Chats use your account's organization, permissions, and usage limits, and appear in the web app. Any HTTP client works. The MCP server uses this same API and the same tokens.
Base URL: https://app.arca.inc/api/v1
API access must be enabled for your account and selected organization. If Developer is missing from Settings, contact Arca to enable access. The same setting controls access through the MCP server.
Use the Research API to search medical, regulatory,
scientific, and legal sources and include source text in the results.
Send requests to POST https://app.arca.inc/api/research/search with an
arca_pk_ key from Arca Platform or an existing arca_rk_ key.
The basic workflow
Most integrations make four calls. Starting a chat returns immediately; the answer is produced in the background, so you poll until the chat settles and then read the transcript.
- Authenticate. Create a token and send it on every call.
- Start.
POST /chatswithstream: falsereturns202and the chat ID. - Poll.
GET /chats/{chatId}/statusuntilshouldPollisfalse. - Read.
GET /chats/{chatId}for the full transcript.
To hand a finished chat to teammates, make two more calls:
- Share.
POST /chats/{chatId}/sharewith their email addresses. Anyone in your organization gets access. - Link.
GET /chats/{chatId}/linkreturns the chat'shttps://app.arca.inc/chat/…address. Send it however you like; Arca also emails each person it adds. They sign in and see the full chat.
Conventions on this page:
- Paths are relative to the base URL unless shown in full.
- IDs are UUIDs. Timestamps are ISO 8601 strings in UTC.
- Examples use the shell variables
$ARCA_API_TOKEN,$ARCA_ORG_ID, and$CHAT_ID. - Response objects can gain fields over time. Ignore fields you don't recognize.
Create a token
- Sign in to Arca and open Settings → Developer.
- Choose Create token and give it a name that says where it will run, such
as
contract-review-job. - Copy the secret immediately. It is shown only once.
- Store it in your server's secret manager or environment as
ARCA_API_TOKEN.
Tokens start with arca_pat_ and belong to the signed-in user, not an
organization or a service account. Verified users with an active organization
membership and API access enabled can create one. When you create a token,
choose when it expires: 7 days, 30 days, 90 days (the default), 1 year, or a
custom date up to one year out. The settings page shows each token's prefix,
last use, expiry, and status and lets you revoke it immediately.
A token can use only its owner's current access. Arca re-checks email verification, account deactivation, organization membership, and whether API access is enabled on every call. If the owner loses access, the token loses it at the same moment. A token does not bypass private-chat access, billing, or usage limits. Tokens are not restricted to chats: they can use every endpoint on this page, including revoking tokens. Keep them on your server, never in browser bundles or mobile apps.
Send these headers on every authenticated request:
Authorization: Bearer arca_pat_…
X-Organization-Id: YOUR_ORGANIZATION_ID
Choose an organization
Use GET /me or GET /orgs to discover the organizations you can access:
curl --fail-with-body https://app.arca.inc/api/v1/me \
-H "Authorization: Bearer $ARCA_API_TOKEN"
{
"userId": "11111111-1111-4111-8111-111111111111",
"email": "you@example.com",
"name": "Alex",
"currentOrganizationId": "22222222-2222-4222-8222-222222222222",
"organizations": [
{
"id": "22222222-2222-4222-8222-222222222222",
"name": "Your organization",
"role": "member"
}
]
}
X-Organization-Id selects the organization for that request; it does not
change your web app selection. Without it, Arca uses your saved current
organization, or your first active membership if none is saved. An inaccessible
organization returns 403.
Always set the header in unattended jobs. Your saved organization changes when you switch organizations in the web app, and a job relying on the default would silently start working in a different organization.
Start a chat
POST /chats starts a new chat or adds a message to an existing one. Send
stream: false to receive JSON after Arca has durably started the turn,
without holding the connection open for the answer:
curl --fail-with-body https://app.arca.inc/api/v1/chats \
-H "Authorization: Bearer $ARCA_API_TOKEN" \
-H "X-Organization-Id: $ARCA_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"message":"Summarize the key renewal risks.","stream":false}'
Omit stream or set it to true to receive the answer as it is generated. See
Streaming.
reasoningEffort is an explicit per-turn override; higher effort can use more
reasoning tokens and increase latency and cost. It does not choose or pin a model.
Effort availability varies by model: Arca sends high when xhigh is requested
for Claude Opus 4.6 or Sonnet 4.6, which do not support xhigh.
Request fields
| Field | Type | Meaning |
|---|---|---|
message | string, required | The user message, 1–100,000 characters. |
stream | boolean | Set false for JSON kickoff. Defaults to true for streaming clients. |
chatId | UUID | Continue an accessible chat instead of creating a new private chat. |
modelTier | fast, medium, or max | Optional model tier; omit to use normal Arca routing. |
requestedModel | string | Optional supported model ID override, up to 200 characters. Prefer tiers for stable integrations. |
reasoningEffort | low, medium, high, xhigh, max | Optional per-turn reasoning effort. Independent of model tier and model ID; defaults to Arca's measured high effort. |
libraryIds | UUID array | Up to 50 accessible libraries to use as context. |
attachments | object array | Up to 20 uploaded file references; see Attachments. |
Response: 202 Accepted
{
"chatId": "33333333-3333-4333-8333-333333333333",
"workflowRunId": "workflow-run-id",
"statusUrl": "/api/v1/chats/33333333-3333-4333-8333-333333333333/status",
"messagesUrl": "/api/v1/chats/33333333-3333-4333-8333-333333333333/messages"
}
| Field | Meaning |
|---|---|
chatId | The chat's ID. Save it right away; every later call about this chat needs it. |
workflowRunId | Identifies this turn. Useful when reporting a problem to Arca. |
statusUrl | Where to poll for progress. Relative to https://app.arca.inc, not to the /api/v1 base. |
messagesUrl | Where to read the transcript. Also relative to https://app.arca.inc. |
The same values are repeated in response headers: Location (the status URL),
x-arca-chat-id, and x-workflow-run-id.
202 means accepted, not completed successfully. The answer isn't ready
yet and the turn can still fail. Poll the status, then
read the messages. Closing the response does not cancel the work.
New chats are private to the token owner. They use the same chat and message
storage as the web app, so the owner can also open them signed in at
https://app.arca.inc/chat/CHAT_ID.
Continue the conversation
Use the same endpoint with chatId:
{
"chatId": "33333333-3333-4333-8333-333333333333",
"message": "Turn that into a negotiation checklist.",
"stream": false
}
Wait for the current turn to settle before submitting a follow-up. A new turn can supersede existing work; this endpoint is not a FIFO job queue.
Streaming
Without "stream": false, POST /chats returns a 200 Server-Sent Events
stream in the
AI SDK UI message stream format;
text arrives in text-delta chunks.
Save x-arca-chat-id and x-workflow-run-id from the
response headers before reading the body. Errors after streaming starts are
stream events, not a new HTTP status.
GET /chats/{chatId}/stream?startIndex=0 reconnects to the durable stream.
startIndex is an optional non-negative chunk offset. A 204 means there is no
stream to resume; read status and messages instead. Disconnecting is not a stop
command.
Poll the chat status
GET /chats/{chatId}/status tells you whether Arca is still working on the
chat and when to check again.
curl --fail-with-body "https://app.arca.inc/api/v1/chats/$CHAT_ID/status" \
-H "Authorization: Bearer $ARCA_API_TOKEN" \
-H "X-Organization-Id: $ARCA_ORG_ID"
While Arca is working:
{
"chatId": "33333333-3333-4333-8333-333333333333",
"status": "running",
"shouldPoll": true,
"pollAfterMs": 2000,
"terminalState": null,
"updatedAt": "2026-09-14T12:00:00.000Z"
}
When the chat has settled:
{
"chatId": "33333333-3333-4333-8333-333333333333",
"status": "settled",
"shouldPoll": false,
"pollAfterMs": null,
"terminalState": "complete",
"updatedAt": "2026-09-14T12:00:15.000Z"
}
| Field | Meaning |
|---|---|
status | running or settled. running covers background tool work as well as the model writing its answer. |
shouldPoll | The field to act on: true means check again, false means stop. |
pollAfterMs | Minimum wait before the next check, in milliseconds. null once settled. |
terminalState | How the latest agent run ended: complete, error, aborted, or superseded. null while it runs or if no run exists. |
updatedAt | Time of the last activity. It is not a transcript cursor. |
- Keep polling while
shouldPollistrue, waiting at leastpollAfterMs. - Stop when it is
false, then fetch messages once more for the final answer. - Do not stop on
terminalStatealone. A completed agent run can still have background work running; onlyshouldPollsays everything is done. settledalone is not proof of success. CheckterminalStateand read messages for the visible result or error.- Set your own deadline. Giving up on waiting does not stop Arca's turn, and you can pick the chat up later by its ID.
- This is chat-level status. A turn started by the web app, another client,
or a teammate the chat is shared with becomes the latest run. It is not a status
lookup for a particular
workflowRunId. - Status and transcript responses use
Cache-Control: no-store. Don't cache them in between.
Read a chat
GET /chats/{chatId} and GET /chats/{chatId}/messages return the same
response: the chat's ID, title, shareable link, and full saved transcript. Use
whichever path reads better in your code. Messages come oldest first (creation
time, then message ID), and deleted messages are left out.
{
"chatId": "33333333-3333-4333-8333-333333333333",
"title": "Renewal risks",
"messages": [
{
"id": "44444444-4444-4444-8444-444444444444",
"role": "user",
"text": "Summarize the key renewal risks.",
"parts": [{ "type": "text", "text": "Summarize the key renewal risks." }],
"createdAt": "2026-09-14T12:00:00.000Z"
}
]
}
| Field | Meaning |
|---|---|
id | Stable message ID. Use it to reconcile repeated reads. |
role | Who wrote it, such as user or assistant. |
text | A convenient text-only view of the message. |
parts | The stored structured content, including non-text parts. Tolerate part types you don't recognize. |
createdAt | When the message was saved. |
A read while the chat is running can be incomplete: messages are persisted as
the turn progresses. Use streaming for token-by-token updates.
Context compaction does not erase this transcript. Chats you can't access
return 404, exactly as if they didn't exist.
List chats
GET /chats?limit=20&query=renewal returns accessible recent chats in the
selected organization, newest first:
{
"chats": [
{
"id": "33333333-3333-4333-8333-333333333333",
"title": "Renewal risks",
"updatedAt": "2026-09-14T12:00:15.000Z"
}
],
"hasMore": false
}
| Parameter | Meaning |
|---|---|
limit | Page size. Defaults to 20; values are bounded to 1–100. |
query | Optional search text. |
endingBefore | For the next (older) page, the ID of the last chat you received. It must be a chat you can access. |
Keep query unchanged while paging, and continue until hasMore is false.
Like other live activity feeds, chats move up the list as new messages arrive,
so the same chat can show up on two pages; deduplicate by ID.
Share a chat
New API chats are private to the token owner. POST /chats/{chatId}/share
gives members of the same organization access, exactly as the Share button
in the web app does:
curl --fail-with-body "https://app.arca.inc/api/v1/chats/$CHAT_ID/share" \
-H "Authorization: Bearer $ARCA_API_TOKEN" \
-H "X-Organization-Id: $ARCA_ORG_ID" \
-H "Content-Type: application/json" \
-d '{"emails":["teammate@example.com"],"role":"viewer"}'
| Field | Type | Meaning |
|---|---|---|
emails | string array, required | 1–50 email addresses of people in the selected organization. |
role | viewer (default), editor | Viewers can read the chat; editors can also send messages in it. |
sendInviteEmail | boolean, default true | Email each newly added person that the chat was shared with them. |
{
"chatId": "33333333-3333-4333-8333-333333333333",
"added": 1,
"participants": [
{
"userId": "11111111-1111-4111-8111-111111111111",
"email": "you@example.com",
"name": "Alex",
"role": "owner"
},
{
"userId": "66666666-6666-4666-8666-666666666666",
"email": "teammate@example.com",
"name": "Sam",
"role": "viewer"
}
],
"notInOrganization": []
}
- Only people who are already active members of the organization can be
added. Other addresses come back in
notInOrganizationand are not invited. - Sharing again is safe: existing participants keep their role and
addedcounts only new people. - The token owner must be the chat's owner or an editor. A viewer gets
403; a chat you can't open returns404. - Remove people or change roles from the chat's Share menu in the web app.
Get a chat link
GET /chats/{chatId}/link returns the chat's address in the web app:
{
"chatId": "33333333-3333-4333-8333-333333333333",
"url": "https://app.arca.inc/chat/33333333-3333-4333-8333-333333333333"
}
The link grants nothing on its own. Whoever opens it signs in and sees the full chat only if they are the owner or someone it is shared with. It is safe to store, log, and send.
Attachments
Uploading a file takes three requests. The file itself goes straight to storage, so the limit is the app's: 100 MB for documents, 250 MB for video.
POST /attachments/uploadswith the file's name, type, and size. It returns a presigneduploadUrland the ids for step 3.PUTthe file's bytes touploadUrl, withContent-Typeset to the returnedcontentType. The URL expires after 15 minutes.POST /attachments/uploads/completewith the ids from step 1.
START=$(curl --fail-with-body https://app.arca.inc/api/v1/attachments/uploads \
-H "Authorization: Bearer $ARCA_API_TOKEN" \
-H "X-Organization-Id: $ARCA_ORG_ID" \
-H "Content-Type: application/json" \
-d "{\"filename\":\"agreement.pdf\",\"contentType\":\"application/pdf\",\"sizeBytes\":$(wc -c < agreement.pdf)}")
curl --fail-with-body -X PUT "$(echo "$START" | jq -r .uploadUrl)" \
-H "Content-Type: $(echo "$START" | jq -r .contentType)" \
--data-binary @agreement.pdf
curl --fail-with-body https://app.arca.inc/api/v1/attachments/uploads/complete \
-H "Authorization: Bearer $ARCA_API_TOKEN" \
-H "X-Organization-Id: $ARCA_ORG_ID" \
-H "Content-Type: application/json" \
-d "$(echo "$START" | jq '{batchId, itemId, storageKey, contentType, filename: "agreement.pdf"}')"
The response describes the stored file:
{
"id": "55555555-5555-4555-8555-555555555555",
"name": "agreement.pdf",
"mediaType": "application/pdf"
}
Pass that object, unchanged, in the attachments array of your next
POST /chats, up to 20 per message:
{
"message": "What are the termination rights in this agreement?",
"stream": false,
"attachments": [
{
"id": "55555555-5555-4555-8555-555555555555",
"name": "agreement.pdf",
"mediaType": "application/pdf"
}
]
}
Upload under the same account and organization that will send the chat. Arca
rejects unsupported media types with 415 and oversized uploads with 413.
AOPs, libraries and byte uploads
These endpoints use the same account, organization, billing and resource
permissions as their web operations. Creates are private; reads do not grant
edit access. JSON requests require Content-Type: application/json.
| Method and path | Purpose |
|---|---|
GET /aops | Readable AOP summaries (limit 1–100, default 100; offset, default 0), hasMore and nextOffset. |
POST /aops | Create from name, Markdown prompt, optional description and libraryIds. |
GET /aops/{id} | Instructions, library IDs and current revision. |
PATCH /aops/{id} | Supply expectedRevision and changed name, description or prompt; 409 means reread before retrying. Null fields are unchanged. |
GET /libraries | List readable libraries (limit, offset). |
POST /libraries | Create a private library from name. |
POST /libraries/{id}/documents/text | Add filename and text (at most 8 MiB UTF-8). |
POST /libraries/{id}/documents | Add filename, mediaType, strict base64 bytes. |
GET /library-documents/{id} | Visible document metadata and processing status, never storage keys. |
POST /attachments/upload | JSON byte upload; returns the same chat attachment reference as multipart /attachments. |
Byte uploads are limited to 8 MiB decoded and never accept server paths, URLs,
or storage keys. Document ingestion schedules canonical indexing; acceptance
does not mean extraction or indexing has completed. Poll the document read.
Use aopId, libraryIds and uploaded attachments in POST /chats to run
against that context. These are supported operations, not every web workflow.
For AOP lists, pass a response's nextOffset as the next request's offset,
keeping the same limit. A null continuation marks the last page. Rows are
ordered by name and ID; changing names or access between requests can change
the pages, so restart the list if you need a fresh inventory.
Chat transcripts expose text-only parts and closed citation projections with
source IDs/titles, safe URLs, locators, highlights and occurrence anchors when
available. citationReadiness is ready, pending or unavailable; reread for
deferred enrichment. Provider/tool payloads, arbitrary storage data and full
source text are not part of this result.
Registered MCP OAuth clients receive organization-bound MCP grants, not general API tokens. The MCP host exchanges them for a distinct short-lived API-audience credential; direct OAuth access tokens cannot call these routes or personal-token management endpoints.
Account and token endpoints
| Method and path | Response / purpose |
|---|---|
GET /me | Token owner's userId, email, name, selected currentOrganizationId, and organizations. |
GET /orgs | { "organizations": [...] } with each active membership's id, name, and role. |
GET /tokens | { "tokens": [...] }, each with id, prefix, name, createdAt, lastUsedAt, expiresAt, revokedAt, and current (the token used for this request). Never returns secrets. |
DELETE /tokens/{id} | Revoke one of your own tokens, including the current token. Subsequent use returns 401. |
Complete example (JavaScript)
This Node.js 18+ script starts a chat, polls it with a ten-minute deadline,
prints the answer, and prints the link to share. Run it on a server with
ARCA_API_TOKEN and ARCA_ORG_ID set. A timeout stops this client from
waiting; it does not stop Arca's turn.
const origin = "https://app.arca.inc";
const headers = {
Authorization: `Bearer ${process.env.ARCA_API_TOKEN}`,
"X-Organization-Id": process.env.ARCA_ORG_ID,
};
async function request(path, init = {}) {
const response = await fetch(`${origin}${path}`, {
...init,
headers: { ...headers, ...init.headers },
signal: AbortSignal.timeout(120_000),
});
if (!response.ok) {
throw new Error(`Arca ${response.status}: ${await response.text()}`);
}
return response.json();
}
// 1. Start the chat. Do not retry this call automatically.
const chat = await request("/api/v1/chats", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
message: "Draft a renewal checklist.",
stream: false,
}),
});
console.log("Chat:", chat.chatId); // Persist this in your application's job record.
// 2. Poll until Arca says to stop.
const deadline = Date.now() + 10 * 60_000;
let status;
while (true) {
if (Date.now() >= deadline)
throw new Error(`Timed out waiting for ${chat.chatId}`);
status = await request(chat.statusUrl);
if (!status.shouldPoll) break;
await new Promise((resolve) => setTimeout(resolve, status.pollAfterMs));
}
// 3. Read the final transcript. "settled" alone is not success.
const transcript = await request(`/api/v1/chats/${chat.chatId}`);
if (status.terminalState !== "complete") {
console.warn(`Chat ended as ${status.terminalState}; check the transcript.`);
}
const answer = transcript.messages
.filter((message) => message.role === "assistant")
.at(-1);
console.log(answer?.text ?? "(no answer)");
// 4. Share with a teammate and send them the link.
await request(`/api/v1/chats/${chat.chatId}/share`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ emails: ["teammate@example.com"] }),
});
const link = await request(`/api/v1/chats/${chat.chatId}/link`);
console.log("Open in Arca:", link.url);
In production, also retry the GET requests on 429 and network errors with
backoff and honor Retry-After when present. Keep the chat ID somewhere
durable so a crashed worker can resume polling instead of starting a new chat.
See Errors and security.
Errors, retries, and versioning
Authentication failures are 401; inactive or unverified accounts and
non-member organizations are 403. Disabled API access also returns 403,
including for previously issued tokens. Disabling access does not revoke tokens
or cancel accepted chat work; status and message reads remain blocked until
access is enabled again. Inaccessible chats return 404, just like
missing chats. Invalid IDs or bodies return 400. A concurrent/superseded
start can return 409. Most request errors include an error string; chat
engine failures may use its existing error envelope or a text body. Always
check the HTTP status before parsing a successful response shape. The full
status table is in Errors and security.
Do not automatically retry chat POSTs. There is no idempotency-key contract.
A network failure can happen after Arca accepted the turn; retrying may create
another chat or submit another message. Keep the chat ID whenever received,
from the body or the x-arca-chat-id header, and inspect status/messages before
deciding whether to submit again. Read-only GETs can be retried with bounded
backoff.
Successful responses include x-arca-api-version. /api/v1 is the versioned
surface; clients should ignore additional object fields and unfamiliar message
part types.
Endpoint reference
Every endpoint needs Authorization: Bearer <token> and should include
X-Organization-Id. Paths are relative to https://app.arca.inc/api/v1.
| Method | Path | Purpose | Success |
|---|---|---|---|
POST | /chats | Start a chat or continue one (chatId). JSON with stream: false, SSE otherwise. | 202 JSON, 200 stream |
GET | /chats | List accessible chats. Accepts limit, query, and endingBefore. | 200 |
GET | /chats/{chatId} | Chat ID, title, and full transcript. | 200 |
GET | /chats/{chatId}/messages | Same response as /chats/{chatId}. | 200 |
GET | /chats/{chatId}/status | Whether to keep polling, and how the latest run ended. | 200 |
GET | /chats/{chatId}/stream | Resume the stream from startIndex. | 200 / 204 |
POST | /chats/{chatId}/share | Give organization members access to the chat. | 200 |
GET | /chats/{chatId}/link | The chat's web app URL. | 200 |
POST | /attachments/uploads | Start an upload: returns a presigned uploadUrl (up to 100 MB for documents). | 200 |
POST | /attachments/uploads/complete | Finish an upload; returns the attachment for POST /chats. | 200 |
GET | /audit-events | The organization audit feed for SIEMs (details). | 200 |
GET | /me | The token owner and their organizations. | 200 |
GET | /orgs | Active organization memberships. | 200 |
GET | /tokens | Your tokens' metadata, never secrets. | 200 |
DELETE | /tokens/{id} | Revoke a token. | 200 |
Response headers
| Header | Sent on | Meaning |
|---|---|---|
x-arca-chat-id | POST /chats | The chat's ID. Save it even if the body is lost. |
x-workflow-run-id | POST /chats | ID of this turn. |
Location | POST /chats (JSON) | The status URL. |
x-arca-api-version | Successful responses | The API version that served the request. |