Platforms Pricing API Start free trial Sign in
API Reference

The Oren AI API

One REST API to deploy agents, run outbound campaigns, score risk, automate workflows, and query your business data. Every action your team can take in the dashboard is available programmatically, with an official SDK and a native MCP server.

Base URL https://api.oren.ai/v1

The API is organized around predictable, resource-oriented URLs. It accepts JSON request bodies, returns JSON responses, and uses standard HTTP response codes, verbs, and authentication. Every request is served over TLS, and all timestamps are Unix epoch seconds in UTC.

The example below sends a message to a deployed agent and returns the agent's reply along with any billable actions it took.

curl https://api.oren.ai/v1/agents/agt_0X8aZ2/messages \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"contact": "con_8Hd2Kp", "channel": "sms", "content": "Hi, is my renewal still on file?"}'

Authentication

The API authenticates with secret keys. Each request must include your key as a bearer token in the Authorization header. Keys carry the privileges of the workspace that created them, so treat them like passwords.

  • Live keys are prefixed with sk_live_ and operate on real contacts, campaigns, and billing.
  • Test keys are prefixed with sk_test_ and run against an isolated sandbox with simulated agents and no metered charges.
  • Scoped keys can be restricted to specific platforms (for example, read-only Compute access) from the dashboard.
Authorization header
Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc
Keep keys server-side

Never embed a secret key in browser code, mobile apps, or public repositories. For client-side agent chat, mint short-lived session tokens with the Portal sessions endpoint instead.

Making requests

Send JSON with a Content-Type: application/json header. Resource identifiers are prefixed by type, so an ID is always self-describing: agt_ for agents, conv_ for conversations, con_ for contacts, act_ for actions, cmp_ for campaigns, and run_ for model and workflow runs.

Successful responses return the affected object. List endpoints return a wrapped collection described under Pagination.

Response envelope

200 OK
{
  "id": "msg_3Lp9Qr",
  "object": "message",
  "role": "assistant",
  "conversation": "conv_7Yb1Nm",
  "channel": "sms",
  "content": "Yes, your renewal is on file and due July 1. Want me to send the link?",
  "actions": ["act_5Zk0Wd"],
  "created_at": 1781740812
}

Errors

Oren AI uses conventional HTTP status codes. Codes in the 2xx range indicate success, 4xx indicate a request that failed given the information provided, and 5xx indicate an error on our side. Every error body shares one shape.

Status codes
200Request succeeded.
400Malformed or missing parameters.
401Invalid or missing API key.
403Key lacks scope for this resource.
404Resource does not exist.
409Idempotency or state conflict.
429Rate limit exceeded.
5xxInternal error. Safe to retry.
402 error body
{
  "error": {
    "type": "invalid_request_error",
    "code": "contact_consent_missing",
    "message": "Contact con_8Hd2Kp has not granted SMS consent.",
    "param": "contact",
    "doc_url": "https://oren.ai/api#contacts"
  }
}

Pagination

List endpoints are cursor-based. Pass limit (1 to 100, default 20) and page forward with starting_after using the last ID from the previous page. The has_more flag tells you when to stop.

curl "https://api.oren.ai/v1/conversations?limit=20&starting_after=conv_7Yb1Nm" \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc"

Idempotency

Safely retry write requests by sending an Idempotency-Key header with a unique value, such as a UUID. If a request is repeated with the same key within 24 hours, the original response is replayed instead of performing the action twice. This protects against duplicate messages and double-charged actions during network retries.

Idempotent request
curl https://api.oren.ai/v1/outreach/campaigns/cmp_1Aa2Bb/launch \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Idempotency-Key: 9f1c8b2e-4d77-4a0e-9b1a-2c3d4e5f6071" \
  -X POST

Rate limits

Limits are applied per workspace. Standard workspaces allow 1,000 requests per minute for reads and 200 per minute for writes. Compute and Intel inference endpoints carry separate concurrency limits. Every response includes headers describing your current budget.

HeaderDescription
Oren-RateLimit-LimitMaximum requests in the current window.
Oren-RateLimit-RemainingRequests left in the current window.
Oren-RateLimit-ResetUnix time when the window resets.
Retry-AfterSeconds to wait, returned on a 429.

When you exceed a limit, the API returns 429. Back off using the Retry-After header. The official SDKs retry with exponential backoff automatically.

Versioning

The API is versioned by date. Your workspace is pinned to the version that was current when you first integrated, and that behavior is held stable. Override it per request with the Oren-Version header to adopt newer behavior on your own schedule.

Pin a version
Oren-Version: 2026-06-01
Core

Agents

An agent is a deployed worker bound to one platform. It carries a model, a set of instructions, the tools it can call, and an optional voice. Agents are the unit you create, configure, and talk to. Everything an agent does is recorded as an action.

The agent object

Attributes
idstring
Unique identifier, prefixed agt_.
namestring
Human-readable label.
platformenum
One of outreach, portal, flow, intel, compute.
modelstring
Reasoning model. Defaults to oren-1.
instructionsstring
System prompt that grounds the agent's behavior.
toolsarray
Capabilities the agent may call, such as schedule_callback or knowledge_base.
voiceobject
Voice settings for telephony channels.
statusenum
active, paused, or draft.
agent object
{
  "id": "agt_0X8aZ2",
  "object": "agent",
  "name": "Renewals Specialist",
  "platform": "portal",
  "model": "oren-1",
  "instructions": "You help clients review and renew their policies...",
  "tools": ["knowledge_base", "schedule_callback"],
  "voice": { "enabled": true, "voice_id": "ava" },
  "status": "active",
  "created_at": 1781740800,
  "metadata": {}
}
POST/v1/agents
Create and deploy an agent. Returns the agent object on success.
Body parameters
namestringRequired
platformenumRequired
instructionsstringRequired
toolsarrayOptional
modelstringOptional
curl https://api.oren.ai/v1/agents \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"name": "Renewals Specialist", "platform": "portal", "instructions": "You help clients renew...", "tools": ["knowledge_base", "schedule_callback"]}'
GET/v1/agents
List all agents in the workspace, most recently created first.
GET/v1/agents/{id}
Retrieve a single agent by ID.
POST/v1/agents/{id}
Update an agent's instructions, tools, model, or status. Only the fields you pass are changed.
DELETE/v1/agents/{id}
Permanently delete an agent. Its conversation history is retained for audit.

Conversations

A conversation is a durable thread between one agent and one contact over a single channel. It tracks status as the agent works: open while the agent is handling it, escalated when a human is looped in, and closed when resolved.

POST/v1/conversations
Open a conversation between an agent and a contact.
Body parameters
agentstringRequired
The agent ID to staff this conversation.
contactstringRequired
The contact ID on the other side.
channelenumRequired
sms, voice, chat, or email.
conversation object
{
  "id": "conv_7Yb1Nm",
  "object": "conversation",
  "agent": "agt_0X8aZ2",
  "contact": "con_8Hd2Kp",
  "channel": "sms",
  "status": "open",
  "messages_count": 0,
  "created_at": 1781740806
}
GET/v1/conversations
List conversations. Filter by agent, contact, status, or channel.
GET/v1/conversations/{id}
Retrieve a conversation, including its current status and message count.

Messages

Messages are the turns within a conversation. Posting a user message runs the agent, which appends its assistant reply and records any actions it took. You can also post a message directly to an agent with the convenience endpoint below, which opens or reuses a conversation for the contact automatically.

POST/v1/agents/{id}/messages
Send a message to an agent and receive its reply synchronously.
Body parameters
contactstringRequired
contentstringRequired
channelenumOptional
Defaults to the contact's preferred channel.
200 OK
{
  "id": "msg_3Lp9Qr",
  "object": "message",
  "role": "assistant",
  "conversation": "conv_7Yb1Nm",
  "content": "Yes, your renewal is on file and due July 1.",
  "actions": ["act_5Zk0Wd"],
  "intent": "renewal_inquiry",
  "created_at": 1781740812
}

Contacts

Contacts are the people your agents talk to: leads, applicants, and clients. A contact stores identity, channel addresses, consent state, and arbitrary attributes you attach. Consent is enforced at send time, so an agent cannot text a contact who has not opted in to SMS.

curl https://api.oren.ai/v1/contacts \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"name": "Dana Mercer", "phone": "+15145550142", "email": "dana@acme.co", "consent": {"sms": true}, "attributes": {"policy": "AC-4471"}}'

Actions

An action is one discrete thing an agent does for you: a message sent, a lead qualified, a document collected, a callback booked. Actions are the metered unit of the platform, so the Actions endpoint doubles as your usage and billing ledger. Each action links back to the agent and conversation that produced it.

GET/v1/actions
List recorded actions. Filter by agent, type, or a created time range to reconcile usage.
action object
{
  "id": "act_5Zk0Wd",
  "object": "action",
  "type": "message.sent",
  "agent": "agt_0X8aZ2",
  "conversation": "conv_7Yb1Nm",
  "billable": true,
  "created_at": 1781740812
}
Platforms

Outreach

Outreach runs SMS and voice campaigns autonomously. A campaign pairs an agent with an audience and a channel. Once launched, the agent texts each contact, handles inbound replies, detects buying intent, escalates hot prospects, and respects opt-outs, all within TCPA, CRTC, and CASL rules.

POST/v1/outreach/campaigns
Create a campaign in draft. It will not send until launched.
Body parameters
namestringRequired
agentstringRequired
channelenumRequired
sms or voice.
audienceobjectRequired
A segment ID or an explicit list of contacts.
windowobjectOptional
Local-time send window for compliance.
curl https://api.oren.ai/v1/outreach/campaigns \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"name": "June renewals", "agent": "agt_0X8aZ2", "channel": "sms", "audience": {"segment": "seg_due_july"}}'
POST/v1/outreach/campaigns/{id}/launch
Launch a draft campaign. The agent begins working the audience inside the compliance window. Send with an Idempotency-Key to make launch safe to retry.
GET/v1/outreach/campaigns/{id}
Retrieve a campaign with live delivery, reply, and qualification stats.

Compute

Compute exposes statistical models as endpoints: risk scoring, pricing optimization, and demand forecasting. You send features, you get a structured result with the drivers behind it. Models are configured to your schema in the dashboard and referenced by name and version.

POST/v1/compute/risk/scores
Score an entity against a configured risk model. Returns a score, a band, and the factors that moved it.
Body parameters
modelstringRequired
Configured model name, for example credit_risk_v3.
featuresobjectRequired
Feature map matching the model schema.
curl https://api.oren.ai/v1/compute/risk/scores \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"model": "credit_risk_v3", "features": {"monthly_revenue": 84000, "months_active": 19, "industry": "retail"}}'
POST/v1/compute/pricing/recommendations
Recommend a price from demand, competitor, and margin inputs. Returns a recommended price with a confidence interval.
POST/v1/compute/forecasts
Forecast a series, such as sales volume or inventory demand, from history and external signals.

Flow

Flow turns a manual process into a workflow that runs on demand or on a trigger. Define a workflow once, then start runs with structured input. Each run is tracked to completion with full step history, so you can replace tab-to-tab copy work with a single API call.

POST/v1/flow/workflows/{id}/runs
Start a workflow run. Returns immediately with a run you can poll, or subscribe to the flow.run.completed webhook.
curl https://api.oren.ai/v1/flow/workflows/wf_6Rd3Cv/runs \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"input": {"invoice_id": "INV-2087", "amount": 4200, "vendor": "Northwind"}}'
GET/v1/flow/runs/{id}
Retrieve a run with its current status, step history, and output.

Intel

Intel answers questions over your connected business data and returns grounded answers with citations. Ask in plain language, scope to specific sources, and get back a structured answer you can render or act on.

POST/v1/intel/queries
Run a query across connected sources. Returns an answer with citations to the underlying records.
curl https://api.oren.ai/v1/intel/queries \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"question": "Which accounts are up for renewal next month and at risk of churn?", "sources": ["crm", "billing"]}'

Portal

Portal hosts a white-labeled, client-facing experience with an embedded agent. Mint a short-lived session for a contact and either redirect them to the hosted URL or drop the embed snippet into your own app. Sessions are scoped to one contact and expire automatically, so they are safe to use from the browser.

POST/v1/portal/sessions
Create a hosted portal session for a contact, staffed by an agent.
curl https://api.oren.ai/v1/portal/sessions \
  -H "Authorization: Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{"contact": "con_8Hd2Kp", "agent": "agt_0X8aZ2"}'
Events

Webhooks

Webhooks push events to your server as things happen: a lead is qualified, a model run finishes, a workflow completes. Register an endpoint in the dashboard, then verify each delivery with the signature in the Oren-Signature header before trusting the payload.

Each delivery is an event object wrapping the resource that changed. Respond with any 2xx status to acknowledge. We retry failed deliveries with exponential backoff for up to 24 hours.

event delivery
{
  "id": "evt_8Jd1Kf",
  "object": "event",
  "type": "outreach.lead.qualified",
  "created_at": 1781741300,
  "data": {
    "object": {
      "id": "con_8Hd2Kp",
      "object": "contact",
      "intent": "renewal_inquiry",
      "campaign": "cmp_1Aa2Bb"
    }
  }
}

Verifying signatures

The Oren-Signature header contains a timestamp and an HMAC-SHA256 of the raw request body, signed with your endpoint's secret. Compute the same HMAC and compare in constant time. The SDKs ship a one-line helper.

event = oren.webhooks.construct_event(
    payload=request.body,
    signature=request.headers["Oren-Signature"],
    secret="whsec_PNs9Kqf2Lm",
)

if event.type == "outreach.lead.qualified":
    notify_sales(event.data.object)

Event types

Subscribe to any subset of events per endpoint. These are the events emitted across the platform.

EventFires when
conversation.message.createdAn agent or contact adds a message to a conversation.
conversation.escalatedAn agent hands a conversation to a human.
outreach.lead.qualifiedA campaign agent detects buying intent.
outreach.contact.opted_outA contact opts out. Sending stops immediately.
compute.run.completedA risk, pricing, or forecast run finishes.
flow.run.completedA workflow run reaches a terminal state.
action.recordedA billable action is written to the ledger.
Tooling

Official SDKs

Official libraries wrap the API with typed methods, automatic retries with backoff, and webhook verification. They read your key from the OREN_API_KEY environment variable by default.

pip install orenai

Model Context Protocol

The Oren MCP server exposes your workspace to any MCP-compatible client, including Claude, Cursor, and VS Code. Once connected, an assistant can list and operate your agents, launch campaigns, score risk, run workflows, and query Intel, all with the same permissions as the API key it authenticates with.

MCP endpoint https://mcp.oren.ai

The remote server speaks Streamable HTTP and authenticates with a bearer API key. A local stdio server is also published for desktop clients that prefer to run it as a subprocess.

Scoped by key

The MCP server inherits the exact scope of the key it runs with. Issue a read-only or platform-scoped key when you want an assistant to look but not act.

Connecting a client

Add the server to your client's MCP configuration. The remote transport needs only the URL and your key. The local transport runs the published package over stdio.

Claude Desktop

Add Oren to claude_desktop_config.json, then restart the app.

claude_desktop_config.json
{
  "mcpServers": {
    "oren": {
      "command": "npx",
      "args": ["-y", "@orenai/mcp"],
      "env": { "OREN_API_KEY": "sk_live_4eC39HqLyjWDarjtT1zdp7dc" }
    }
  }
}

Remote server (Cursor, VS Code)

Point any client that supports remote MCP at the hosted endpoint and pass your key as a bearer token.

mcp.json
{
  "mcpServers": {
    "oren": {
      "url": "https://mcp.oren.ai",
      "headers": { "Authorization": "Bearer sk_live_4eC39HqLyjWDarjtT1zdp7dc" }
    }
  }
}

MCP tools

The server advertises a focused set of tools that map to the API. An assistant discovers them automatically once connected.

oren_list_agents
List agents in the workspace, optionally filtered by platform or status.
oren_send_message
Send a message to an agent on behalf of a contact and return the reply.
oren_create_campaign
Create and optionally launch an Outreach campaign for a segment.
oren_score_risk
Run a Compute risk model over a feature set and return the score and drivers.
oren_run_workflow
Start a Flow workflow run with structured input and track it to completion.
oren_query_intel
Ask a natural-language question over connected sources and return cited answers.
oren_get_contact
Look up a contact by ID, email, or phone, including consent state.
oren_list_actions
Read the action ledger for usage, audit, and reconciliation.

MCP resources and prompts

Alongside tools, the server exposes read-only resources that clients can attach as context, and prompts that package common operator workflows into one click.

Resource URIReturns
oren://agentsThe current roster of agents and their status.
oren://conversations/{id}A full conversation transcript with intent tags.
oren://campaigns/{id}Live campaign stats and qualified leads.
oren://actions/recentThe most recent billable actions across agents.

Prompts

PromptWhat it does
triage_escalationsReviews escalated conversations and drafts next steps for a human.
campaign_readoutSummarizes a campaign's performance and surfaces qualified leads.
weekly_digestCompiles agent activity, actions, and Intel highlights for the week.
Get a key

API keys and MCP access are managed from your workspace settings. Start a free trial to provision a sandbox key in under a minute.