Back

Delighted API Essential Guide

Aug 16, 20246 minute read

What type of API does Delighted provide?

Based on the search results, Delighted uses a REST API. Here are the key points:

  1. Delighted has a REST API that allows developers to interact with the platform programmatically.

  2. The API documentation explicitly refers to it as a "REST API" multiple times.

  3. The API uses standard REST conventions like HTTP methods (GET, POST) and JSON data formats.

  4. It provides typical REST API functionality like triggering surveys, syncing response data, getting metrics, etc.

  5. The API uses authentication via API keys and follows REST best practices.

Key considerations:

  • REST APIs are widely used and well-understood by developers.
  • The REST architecture allows for flexibility and scalability.
  • Delighted's API documentation provides clear examples and guidance for using the REST API.

In summary, Delighted offers a standard REST API for integrating with their customer experience platform. This allows developers to easily interact with Delighted's services using familiar REST conventions and practices.

Does the Delighted API have webhooks?

Yes, the official Delighted API does have webhooks. Here are the key points about Delighted's webhook functionality:

Webhook Support

Delighted offers webhooks to trigger requests to your own application when certain events occur.

Event Types

You can subscribe to the following event types:

  1. survey_response.created - Occurs when a person provides a score.
  2. survey_response.updated - Occurs when the score or comment on a survey response is changed.
  3. unsubscribe.created - Occurs when a previously active person unsubscribes from a survey.

Webhook Structure

  • Webhooks are sent as HTTP POST requests to the configured webhook URLs.
  • The request body is in JSON format and includes details about the event that triggered the webhook.
  • Each webhook includes an event_type property describing the type of activity.

Webhook Data

The webhook payload includes:

  • event_type: The type of event that triggered the webhook.
  • event_id: A unique identifier for the event.
  • event_data: Details about the object that triggered the webhook (e.g., survey response details).

Security Features

  • Webhooks include an X-Delighted-Webhook-Signature header for verification.
  • It's recommended to use HTTPS URLs for webhooks to ensure encryption of data.

Setting Up Webhooks

You can set up webhooks in your Delighted account by going to Integrations and configuring the webhook settings.

Best Practices

  • Respond to webhooks with an HTTP status code in the 200 range to indicate successful receipt.
  • Use the event_id to deduplicate notifications if needed.

In summary, Delighted's API offers robust webhook support, allowing you to subscribe to various event types related to survey responses and unsubscribes. This enables real-time integration with your own systems and automated workflows based on customer feedback events.

Rate Limits and other limitations

Here are the key points about the API Rate Limits for the Delighted API:

General Rate Limiting Approach

  • Delighted may rate limit requests in extreme usage scenarios to maintain service quality for all users [1].
  • Normal API usage is unlikely to experience rate limits [1].
  • Rate limiting is most commonly caused by bugs or bulk data requests [1].
  • While occasional bursts are acceptable, Delighted recommends a maximum average of 100 requests per minute [2].

Rate Limit Response

  • If rate limited, you will receive a 429 HTTP response code [1].
  • The response will include a Retry-After header indicating how many seconds to wait before retrying [1].

Handling Rate Limits

  • Failed requests due to rate limiting can be safely retried [1].
  • Delighted recommends using an exponential backoff strategy for retries [1].
  • Official Delighted libraries include support for handling rate limit errors [1].

Best Practices

  • Reduce request frequency if you start receiving 429 responses [1].
  • Use exponential backoff or check the Retry-After header for retry timing [1].
  • Contact Delighted support if experiencing persistent rate limit issues [1].

Additional Notes

  • The API uses authentication via HTTP Basic Auth with your API key as the username [1].
  • Each Delighted project has its own API key [1].
  • Keep your API key private and use HTTPS for all requests [1].

While Delighted does not specify hard limits, they do provide guidance on recommended usage and how to handle rate limiting when it occurs. The focus is on maintaining service quality while allowing flexibility for different use cases.

Latest API Version

Based on the search results provided, I don't have specific information about the most recent version of the Delighted API. The search results don't mention API versions explicitly. However, I can provide some relevant information about the Delighted API:

Key Points

  • Delighted offers a REST API that allows developers to interact with their platform programmatically.

  • The API can be used for various purposes, including:

    • Triggering survey sends
    • Syncing response data
    • Getting metrics (like response rate, bounce rate, etc.)
    • Unsubscribing people
    • And more
  • Authentication is done using a private API key linked to your account. Each CX project has its own API key.

  • All API requests must be made over HTTPS and are authenticated via HTTP Basic Auth.

API Documentation

  • The complete API documentation is available at https://app.delighted.com/docs/api.

  • The documentation includes details on endpoints, request methods, and supported programming languages.

Supported Programming Languages

Delighted offers support for multiple programming languages, including:

  • Curl
  • Ruby
  • Node.js
  • Python
  • PHP

Best Practices

  • Keep track of which systems you're using to call the Delighted API, as Delighted can't see what platform an API call came from.

  • When testing API integrations, you can create a "sandbox" Delighted account.

API Endpoints

Some key endpoints mentioned in the search results include:

  • /v1/survey_responses.json for listing responses
  • /v1/metrics.json for listing engagement metrics
  • /v1/people.json for sending surveys to people
  • /v1/autopilot/email/memberships.json and /v1/autopilot/sms/memberships.json for adding people to Autopilot

While I couldn't find specific information about the most recent version of the API, it's always best to refer to the official documentation at https://app.delighted.com/docs/api for the most up-to-date information.

How to get a Delighted developer account and API Keys?

To get a developer account for Delighted and create an API integration, here are the key steps:

Obtain an API Key

  1. You'll need to contact your Delighted account admin to obtain an API key for your project. Each CX project in Delighted has its own unique API key.

  2. Make sure you're logged into the correct project in Delighted by checking the project name in the top left corner.

  3. The API key can be found under Integrations > API in your Delighted account.

Set Up Authentication

  1. All API requests must be made over HTTPS and are authenticated via HTTP Basic Auth.

  2. Use your API key as the username and leave the password blank when making API calls.

  3. Keep your API key private and secure.

Review API Documentation

  1. Thoroughly review Delighted's API documentation, which provides details on all available endpoints and how to structure your API calls.

  2. The full API documentation can be found at: https://app.delighted.com/docs/api

Create a Testing Environment

  1. Set up a "sandbox" Delighted account for testing purposes.

  2. When testing, set the sending parameter to false or use internal/dummy emails to avoid sending actual surveys.

Key Considerations

  • Each project has its own API key, so ensure you're using the correct one for the intended project.
  • Limited users cannot view the API key, so you may need admin access.
  • If your system requires IP whitelisting, use the IP address 107.21.230.131 for Delighted's API.
  • Keep track of which systems you're using to call the Delighted API for future reference.

Best Practices

  1. Start with simple API calls to test your connection and understanding.
  2. Implement proper error handling in your integration.
  3. Use version control for your integration code.
  4. Monitor your API usage to stay within rate limits.
  5. Regularly check Delighted's documentation for any API updates or changes.

By following these steps and best practices, you should be able to set up a developer account and create an API integration with Delighted. Remember to always keep your API key secure and follow Delighted's usage guidelines.

What can you do with the Delighted API?

Based on the search results provided, here is a list of data models you can interact with using the Delighted API, along with what is possible for each:

People

  • Create or update a person's information [2][5]
  • Add people to email or SMS Autopilot lists [2]
  • Unsubscribe people [2]
  • Send surveys to people [2][5]
  • Set custom properties for people [5]

Survey Responses

  • List survey responses [2]
  • Retrieve individual survey responses [2]
  • Get response data including scores, comments, etc. [2]

Metrics

  • Retrieve engagement metrics like response rate, bounce rate, etc. [2]
  • Get metrics for specific time periods [2]
  • Get metrics for specific trends [2]

Surveys

  • Trigger survey sends [2][5]
  • Customize survey email subjects [5]
  • Set survey delay times [5]
  • Specify survey localization/language [5]

Autopilot

  • Add people to Autopilot email lists [2]
  • Add people to Autopilot SMS lists [2]

Webhooks

  • Set up webhooks to receive real-time survey response data [4]

Other

  • Retrieve API authentication keys [2]
  • Get project-level settings and information [5]

The Delighted API allows you to programmatically interact with most aspects of survey creation, distribution, and response collection. The main data models center around people/contacts, survey responses, metrics, and survey configuration. The API enables both pushing data to Delighted (e.g. adding contacts, triggering surveys) and pulling data out (e.g. retrieving responses and metrics).