Testing and production

Previous section: Pulling out information via API

Why test the API?

With any API, it is essential to first test the integration to help identify bugs and inconsistent behaviors. If an API breaks as a result of issues missed due to skipping testing, those issues could impact both the integration, as well as any processes linked to that integration.

Testing can get your integration in tip-top shape before deploying to actual customers. In this section, we’ll cover how to quickly test with Delighted, as well as some best practices for running those tests!


Setting up testing environment

Creating an sandbox Delighted account is possible in just two steps:

  • Set up a new account: Create a new trial account using an email not associated with your main Delighted account
  • Finding API key: Once logged into the new trial account, head to the API page to find your test API key

That’s it! You now have a testing environment which you can use to build out your API integration. Note, this is a live account, so be sure to set sending to false (more details below) or only use internal and/or dummy emails.


What are some API Testing best practices?

  • Throttling: Reach out to us if you need to test multiple times with the same email
  • Timing: Anticipating you may need more than a few weeks to test? Let us know and we can add a bit of extra time to your testing account.
  • Send=False: If you pass the parameter send=false, we’ll avoid sending out a survey for that particular request. This is a great way to test your API integration without sending out surveys.
  • Simplicity: Keep initial tests simple, using only the most essential parameters (ex. email and name). Layer in more parameters as you continue testing.
  • Document: Document all outcomes, unique requests being sent, parameters being passed, and other details. Once you have a clear idea of your preferred set-up, it will be much easier to transition that framework into production.
  • Vary the Endpoints: Layer in all the various Delighted endpoints. Get a strong sense for how to trigger sending with Delighted, as well as how to use the Delighted API to pull out information, create survey responses, etc.
  • Between Sandbox and Production: All set to go live with your production integration? Be sure you fully swap out the trial and production API keys wherever needed, as this will ensure that customers are only contacted via the production API integration.

Next section: API FAQs

Still need help? Contact Us Contact Us