API documentation: AgenteUno
Full reference for the AgenteUno public API. Connect your AI agents to any system with our REST API.
Authentication
All endpoints require an API key. Create yours in Settings → API Keys. Creating keys requires the Business plan or higher.
# Option 1: API Key (recommended for integrations)
curl https://api.agenteuno.ai/v1/conversations \
-H "x-api-key: YOUR_API_KEY"
# Option 2: Bearer JWT
curl https://api.agenteuno.ai/v1/conversations \
-H "Authorization: Bearer YOUR_JWT"Your API key is only used to build the cURL commands. It is not sent to any server from this page.
Quick start
List conversations
curl https://api.agenteuno.ai/v1/conversations \
-H "x-api-key: YOUR_API_KEY"Export contacts as CSV (Professional plan or higher)
curl "https://api.agenteuno.ai/v1/export/contacts?format=csv" \
-H "x-api-key: YOUR_API_KEY" \
-o contactos.csvIntegration examples
JavaScript / TypeScript
const API_KEY = process.env.AGENTEUNO_API_KEY;
const BASE = "https://api.agenteuno.ai/v1";
async function listConversations() {
const res = await fetch(`${BASE}/conversations`, {
headers: { "x-api-key": API_KEY },
});
const { data, meta } = await res.json();
return { data, meta };
}
async function createContact(contact) {
const res = await fetch(`${BASE}/contacts`, {
method: "POST",
headers: {
"x-api-key": API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify(contact),
});
return res.json();
}Python
import os
import requests
API_KEY = os.environ["AGENTEUNO_API_KEY"]
BASE = "https://api.agenteuno.ai/v1"
HEADERS = {"x-api-key": API_KEY}
def list_conversations(page=1, limit=20):
r = requests.get(
f"{BASE}/conversations",
headers=HEADERS,
params={"page": page, "limit": limit}
)
r.raise_for_status()
return r.json()
def export_contacts_csv(path="contactos.csv"):
r = requests.get(
f"{BASE}/export/contacts",
headers=HEADERS,
params={"format": "csv"}
)
r.raise_for_status()
with open(path, "wb") as f:
f.write(r.content)Verify webhook signatures
Every delivery includes the X-AgenteUno-Signature header with an HMAC-SHA256 signature of the request body, computed with the webhook secret.
Node.js
import { createHmac, timingSafeEqual } from "crypto";
function verifyWebhook(rawBody, signature, secret) {
const expected = "sha256=" + createHmac("sha256", secret)
.update(rawBody)
.digest("hex");
return timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}Python
import hmac, hashlib
def verify_webhook(raw_body: bytes, signature: str, secret: str) -> bool:
expected = "sha256=" + hmac.new(
secret.encode(),
raw_body,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(signature, expected)Error codes
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_INPUT | Invalid or malformed request data. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | No permission for this action (e.g. owners/admins only). |
| 404 | NOT_FOUND | Resource not found or it does not belong to your organization. |
| 409 | DUPLICATE | The resource already exists (e.g. duplicate webhook URL). |
| 429 | RATE_LIMITED | You exceeded the request limit. Wait for the reset. |
| 500 | INTERNAL_ERROR | Internal server error. Try again later. |
Usage limits
The /v1/* endpoints have a limit of 600 requests per minute per IP for reads (GET), 60 per minute for writes (POST, PUT, PATCH, DELETE) and 20 per hour for exports. Responses include these headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Total request limit per window. |
X-RateLimit-Remaining | Requests remaining in the current window. |
X-RateLimit-Reset | Unix timestamp of when the window resets. |
Conversations
3 endpointsQuestions about the API? Write to us · Download JSON spec · Download YAML spec