Triggering surveys via API
The most common reason customers will leverage Delighted’s API is for sending surveys. In this section, we’ll cover designing your first API request, passing additional data with each request, and a few other key notes for sending requests to the Delighted API.
Design your Request
Once you’re ready to get started with sending surveys via the Delighted API, here are the key elements for designing your API request:
- Request Method: POST
- Host: https://api.delighted.com/
- Endpoint: /v1/people.json
- Language: Delighted offers support for Curl, Ruby, Node.js, Phyton, and PHP. You can view sample request formats via our API documentation
Breakdown of Key Parameters
Now that we’ve covered the basics regarding the structure of the request, lets dig into some of the parameters you can pass to further refine that request:
- email: Email of the person being surveyed (Required)
- name: Name of the person being survey
- delay: Delay until a survey is sent. Trigger a request immediately, but have Delighted dispatch at a later time (ex. accounting for shipping, product use, etc.) By default, the delay is set to “0” and will send the survey immediately
- properties: Metadata associated with each person. Examples include location, product purchased, type of plan, etc. We can accept an unlimited amount of properties. You can learn more via our properties guide
- locale: Language of the survey experience. Based on the locale value you send (ISO 639-1 language code), we’ll dynamically update any non-customizable content within the survey flow. You can find all supported languages via our locale FAQ. The required ISO language codes can be found in our API documentation
In addition to the properties above, Delighted supports a wide range of special properties - which can dynamically update the survey experience on a person-by-person basis. Learn more via our API docs.
- Rate Limits: We recommend a maximum of 100 requests/min on average, or we may reach out to ensure optimal performance is maintained. Occasional bursts are acceptable.