Overview & Integration Architecture
The Servunio platform supports three integration directions to connect your existing CRM, ERP, booking calendars, and customer data systems with grounded AI concierges:
1. Software Calls Servunio
Execute approved capability contracts (e.g. create bookings, raise tickets, query catalog) or read resources using tenant-scoped REST API keys.
2. Servunio Calls Software
Configure outbound HTTPS connectors in Dashboard. Servunio executes external APIs when agents answer customer queries or trigger business workflows.
3. Software Receives Events
Subscribe to real-time events. Servunio pushes signed HMAC-SHA256 JSON payloads to your webhook endpoint on lifecycle state changes.
Production Base URL
All endpoints require TLS 1.3 or 1.2. HTTP requests are automatically redirected to HTTPS.
Quickstart Guide
Make your first verified API call to Servunio in under two minutes:
- 1Generate a scoped API key: Open Dashboard → Settings → Integrations → API Access, click Create API Key, select least-privilege scopes (e.g.
capabilities:read), and copy the full key. - 2Execute your first request:cURLbash
curl -X GET https://servunio.com/v1/developer/capabilities \ -H "Authorization: Bearer sv_live_prod_abc123.key_secret_xyz789" \ -H "Accept: application/json" - 3Inspect the response:Response (200 OK)json
{ "data": [ { "code": "booking.create", "version": "1.0.0", "displayName": "Create Appointment", "sideEffect": true, "requiredIdentity": true, "requiresConfirmation": false, "status": "active" } ] } - 4Verify in Activity: Navigate to Dashboard → Settings → Integrations → Activity to verify that your request was logged with its HTTP status, execution latency, and caller metadata.
Authentication & Scopes
Every request to protected Developer API endpoints must include an API credential. You can authenticate using either standard Bearer authorization or a direct X-API-Key header:
Authorization: Bearer sv_live_...X-API-Key: sv_live_...Key Structure & Security
Keys are issued in the format sv_[env]_[prefix].[secret]. Only the cryptographic hash (SHA-256 with pepper) is stored in the database. The secret cannot be retrieved after generation.
Permission Scopes Catalog
| Scope | Description & Permissions |
|---|---|
| * | Full administrative access to all developer actions and tenant resources. |
| capabilities:read | Discover activated capabilities, input/output schemas, and execution policies. |
| actions:execute | Execute capability workflows, bookings, and business side-effects. |
| actions:read | Query workflow execution state, outputs, and approval status. |
| actions:confirm | Approve or reject executions awaiting confirmation. |
| appointments:read / write | Read calendar bookings or trigger booking creation workflows. |
| tickets:read / write | Read support cases or log new customer complaints/tickets. |
| leads:read / write | Read captured sales leads or submit prospective inquiries. |
| quotes:read / write | Query quote estimates or submit quote calculations. |
| catalog:read | Search product inventory, pricing, and catalog items. |
| conversations:read | List customer conversation histories and session summaries. |
Environments & Key Tiers
API credentials are created in either a TEST or LIVE environment:
- Intended for staging integrations and schema discovery.
- Permitted to query resource endpoints and capability schemas.
- Cannot perform write actions or execute capabilities.
- Intended for production automation and customer-facing software.
- Authorized to execute side-effects, appointments, and external connectors.
- Require valid
Idempotency-Keyon all action executions.
REST API Reference
Action Execution & Human-in-the-Loop Confirmation
Capabilities execute within a managed workflow engine. Actions requiring human sign-off or multi-step processing follow an explicit state transition lifecycle:
When an action pauses in awaiting_confirmation, your application or team can inspect the payload in the Dashboard Inbox or call POST /executions/{id}/confirm to approve or deny execution.
Pagination Guide
Resource listing endpoints use deterministic cursor-based pagination. You pass the nextCursor value as the after query parameter on subsequent calls:
async function fetchAllAppointments(apiKey) {
let after = undefined;
const allAppointments = [];
do {
const url = new URL("https://servunio.com/v1/developer/resources/appointments");
url.searchParams.set("limit", "50");
if (after) url.searchParams.set("after", after);
const res = await fetch(url, {
headers: { "Authorization": `Bearer ${apiKey}` },
});
if (!res.ok) throw new Error(`Failed to fetch: ${res.status}`);
const page = await res.json();
allAppointments.push(...page.data);
after = page.hasMore ? page.nextCursor : null;
} while (after);
return allAppointments;
}Reliability, Idempotency & Rate Limits
HTTP Status Code Matrix
| Code | Reason | Retry Safe? |
|---|---|---|
| 200 OK | Request completed successfully. | No |
| 400 Bad Request | Validation error, malformed JSON, or missing Idempotency-Key. | No |
| 401 Unauthorized | Missing, invalid, expired, or revoked API credential. | No |
| 403 Forbidden | Insufficient scope or TEST credential executing live actions. | No |
| 404 Not Found | Execution ID or resource record does not exist. | No |
| 409 Conflict | Idempotency key re-used with different payload or execution currently locked. | Wait & Retry |
| 429 Too Many Requests | Rate limit exceeded (120 req/min per key default). | Yes (Exponential Backoff) |
| 503 Unavailable | Downstream service temporarily unreachable. | Yes (With Jitter) |
Idempotency Guarantees
Every POST /actions/{code} and /confirm request requires an Idempotency-Key header (8–200 characters). Servunio uses atomic Redis locks and persistent database caching:
- Identical Key + Identical Payload: Returns the original cached response without re-executing side effects.
- Identical Key + Altered Payload: Rejects immediately with
409 RESOURCE_CONFLICT. - In-flight Execution: Rejects concurrent requests using the same key with
409 ACTION_IN_PROGRESS.
External Connections & Custom Connectors
When you want Servunio to call your internal or third-party software, configure an External Connection in the Dashboard. Connectors allow AI agents and workflow steps to invoke your external endpoints securely:
Supported Authentication Types
All connector credentials are encrypted at rest with AES-256-GCM. External endpoints must be reachable over HTTPS and adhere to strict server-side SSRF protections (private IP ranges, localhost, and AWS metadata services are blocked).
Signed Webhook Subscriptions
Receive real-time notifications when bookings confirm, support cases change state, or AI executions complete. Webhook deliveries include cryptographic signatures to guarantee payload integrity:
Signature Verification Example (Node.js)
import crypto from "node:crypto";
import express from "express";
const app = express();
// IMPORTANT: Capture raw buffer before JSON parsing
app.post("/webhooks/servunio", express.raw({ type: "application/json" }), (req, res) => {
const signature = req.headers["x-servunio-signature"];
const timestamp = req.headers["x-servunio-timestamp"];
const secret = process.env.SERVUNIO_WEBHOOK_SECRET;
if (!signature || !timestamp || !secret) {
return res.status(401).send("Missing signature headers");
}
// Prevent replay attacks (5 minute window)
const now = Math.floor(Date.now() / 1000);
if (Math.abs(now - parseInt(timestamp, 10)) > 300) {
return res.status(401).send("Timestamp expired");
}
// Compute expected HMAC-SHA256 digest
const hmac = crypto.createHmac("sha256", secret);
hmac.update(`${timestamp}.`);
hmac.update(req.body); // raw buffer
const expectedSignature = hmac.digest("hex");
if (!crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expectedSignature))) {
return res.status(401).send("Invalid signature");
}
const event = JSON.parse(req.body.toString("utf8"));
console.log("Verified event received:", event.type, event.id);
res.status(200).json({ received: true });
});Delivery & Retry Policy
- At-Least-Once Delivery: Endpoints must be idempotent. Deduplicate using the
event.idUUID. - Timeouts & Retries: Deliveries timeout after 10 seconds. Failed deliveries (4xx/5xx responses or timeouts) retry up to 5 times with exponential backoff.
- Zero-Downtime Secret Rotation: Servunio sends dual signatures during key rotation transitions.
Activity Log & Troubleshooting
The Dashboard Activity stream records all developer requests, connector executions, and webhook deliveries for complete auditability:
Activity records HTTP verb, route path, status code, latency (ms), client IP, and credential ID. To safeguard customer privacy and GDPR compliance, full request and response bodies are not persisted in audit logs.
Requests rejected early at the network ingress or authentication guard (e.g. malformed API key prefix or expired key) are rejected before reaching the activity interceptor and will not generate an Activity log entry.
TypeScript SDK & Client Libraries
The official TypeScript client library @servunio/sdk is maintained directly inside the Servunio monorepo. It has not yet been published to the public npm registry. All endpoints are standard REST HTTP/JSON and are fully operable using native fetch, cURL, Python httpx, or any HTTP client.
// Direct REST invocation with native fetch (No SDK installation required)
const response = await fetch("https://servunio.com/v1/developer/actions/booking.create", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SERVUNIO_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
input: { slotId: "slot_12345", customerName: "Alex Smith" },
}),
});
const result = await response.json();
console.log("Execution status:", result.status);Versioning Policy & Developer Support
Backwards Compatibility
Servunio follows additive versioning. Adding new endpoints, optional parameters, or new fields to response payloads are non-breaking. Breaking schema changes are introduced via explicit URL version paths (e.g. /v2/developer).
Developer Support
Need assistance connecting your software or requesting custom capability contracts? Contact our engineering team directly at:
[email protected]