The Pristo API lets your own systems work with Pristo CX in two ways: send an event that starts an event-based distribution for a contact, and generate a survey link for a questionnaire. Both are POST requests with a JSON body to the base URL https://api.pristo.io.
Every Pristo API request carries an API key in the X-API-Key header. You create keys in the Pristo CX app under Management > API keys, and each key belongs to one program.
API access is part of the Standard and Pro plans. On the Free plan, the app doesn’t show API keys and doesn’t create keys. Events start surveys only through event-based distributions, and the app shows Distributions on the Pro plan only. See Plans and limits.
Endpoints
Section titled “Endpoints”| Method and path | What it does | Guide |
|---|---|---|
POST /v1/events/send |
Records an event for a contact in the population of the API key’s program. Active event-based distributions that select the event type then send their questionnaire. | Send an event |
POST /v1/links/generate/{prjId} |
Creates a single-use or reusable link to a questionnaire and returns its URL on https://go.pristo.io. |
Generate a survey link |
The full request and response schemas are in the API reference. The reference is in English only.
How it works
Section titled “How it works”Events. Your system reports what happened to a customer, for example a purchase. Pristo CX stores the event right away and returns its eventId. Shortly afterwards, Pristo CX adds or updates the contact in the program’s population and checks the active event-based distributions. Each distribution that selects this event type, and whose filters the event and the contact match, schedules the questionnaire by SMS or email.
Contacts. The API has no separate contacts endpoint. Contacts are created and updated from the contact object you send with each event.
Survey links. You ask for a link to one questionnaire and send the returned url to a respondent in your own channel, such as a chat, a receipt or an app. A single-use link collects one response. A reusable link collects a new response each time someone opens it.
Conventions
Section titled “Conventions”| Topic | Rule |
|---|---|
| Base URL | https://api.pristo.io |
| Authentication | X-API-Key: <your key> on every request. See Authenticate with an API key |
| Request body | JSON, with the header Content-Type: application/json. At most 10,000 bytes |
| Success | 200 OK with a small JSON object |
| Errors | Most 400 and 404 responses have a plain-text body, not JSON. See API errors |
| IDs | Questionnaire IDs and event IDs are 22-character short IDs. Link IDs are standard UUIDs |