Developers
Connect any system to Sayvara.
Sayvara has a REST API to start a survey from any event and read completed answers, signed webhooks that send answers and ticket changes to your URL, an SDK for surveys inside web and React Native apps, and a read-only MCP connector for AI assistants. Every route is described in a live OpenAPI 3.1 document. Keys are created by an admin on the Developer screen after signing in to Sayvara.
What you can build
-
REST API
Start a survey when something happens in your systems, and read every completed answer.
- POST /v1/triggers asks for a survey invitation after an event: an order, a visit, a call or a ticket.
- An Idempotency-Key header makes a retry safe: a repeat never sends a second survey.
- Signed triggers (HMAC-SHA256 over the raw body) once your organisation turns them on.
- GET /v1/data/responses reads completed answers, oldest first, with cursor paging.
- Test keys (svk_test_) run every check without sending a message or creating a contact.
- Consent, opt-out, contact limits, quiet hours and plan limits always apply.
-
Webhooks
Sayvara calls your URL the moment an answer arrives or a ticket changes.
- Events such as response.completed, detractor.flagged, ticket.opened, ticket.updated and ticket.closed.
- Every delivery signed with HMAC-SHA256; rotate the secret and the old one keeps signing for 24 hours.
- Retries, a delivery log per endpoint, and replay of any delivery.
- Pick the events per endpoint, and choose whether contact details are included.
-
In-app SDK
Show a short Sayvara survey inside your web or React Native app after something happens.
- Add an app in Settings to get a public app key; the identity secret stays on your server.
- Your server signs a short user token, so one app user can never answer as another.
- The card follows the user’s language, right to left in Arabic.
-
MCP connector for AI assistants
Let an AI assistant that speaks the Model Context Protocol read your results, with your permissions.
- POST /v1/mcp over streamable HTTP, with an API key that has the responses.read scope only.
- Tools: get_results, get_themes, list_tickets, list_surveys and ask.
- Read only. Numbers, themes, survey names and record ids leave; never comments, names, phone numbers or emails.
- Each call is rate-limited and written to the audit log.
-
Phone systems and contact centres
A survey after every call, from the event your phone system already sends.
- End-of-call events from 3CX, Yeastar, Asterisk, Avaya, Webex Contact Center and Amazon Connect.
- Ready connectors for Genesys Cloud and Telyzer.
- Rules for minimum talk time, direction and one survey per call.
-
BI and data
Bring Sayvara data into your own reports.
- A read-only OData feed for Power BI, with the same scopes and branch rules as the app.
- Data-warehouse sync, embedded dashboards and CSV export.
One call starts a survey
curl -X POST https://api.sayvara.ai/v1/triggers \
-H "Authorization: Bearer sv_..." \
-H "Idempotency-Key: ORD-48213-delivered" \
-H "Content-Type: application/json" \
-d '{
"event": "order.delivered",
"kind": "order",
"reference": "ORD-48213",
"occurredAt": "2026-11-25T09:30:00Z",
"contact": { "phone": "+9665XXXXXXXX", "lang": "ar" }
}' 202 Accepted
{ "invitationId": "7b1e…", "status": "queued", "replayed": false } How to get an API key
- Sign in to Sayvara An owner or admin of your organisation signs in to the Sayvara app.
- Open the Developer screen Create a key for each system, with only the scopes it needs, or an OAuth 2.0 client.
- Call the API Send the key in the Authorization header as a Bearer token. Try it first with a test key.
Keys are shown once. Never put an API key or an identity secret in a web page or an app your customers download.
Questions from developers
Where is the API reference?
The live OpenAPI 3.1 document is at https://api.sayvara.ai/v1/openapi.json, and the API guide in the help centre walks through each step.
How do we know a webhook came from Sayvara?
Each delivery is signed with HMAC-SHA256 using your endpoint secret, so your system checks the signature before trusting it.
Can we test without sending real messages?
Yes. A test key runs the same checks and answers with status test: no contact, invitation, message or bill is created.
What can an AI assistant see through the MCP connector?
Only what the key’s creator may see, read only: scores, themes, ticket counts, survey names and record ids. Never comments, names, phone numbers or emails.
Plan your integration with us.
In a briefing we map your events to surveys and your webhooks to your systems, in Arabic and English.
For enterprises and government entities, in Arabic and English.