Send requests automatically from your app with the API
Create an API key in Requests, Settings, API, then call POST https://api.testimonials.ltd/api/requests/trigger/ from your server when a customer reaches a happy moment.
On this page
To send a testimonial request from your own app, create an API key under Requests, Settings, API, then call our trigger endpoint from your server, for example when an order is delivered or a project is finished.
Create an API key
- Click Requests in the top menu.
- Open the Settings tab, then API.
- Under Your API keys, generate a key. Keys start with
treq_. - Store the key on your server. Never put it in website code that runs in the browser.
You can revoke a key at any time from the same place.
Call the endpoint
Send a POST request to <https://api.testimonials.ltd/api/requests/trigger/> with the header Authorization: Bearer YOUR_KEY and a JSON body:
recipient_email(required)recipient_name(optional)event(optional, a label for what happened, for exampleorder_delivered)delay_hours(optional, default 0)form_slug(optional, which form to link to)template_id(optional, which template to use)
What you get back
- 201 with the request queued or sent.
- 201 with status
skippedwhen the person was asked recently, already left a testimonial, or is suppressed. Skips do not count against your allowance. - 429 when your plan’s request email allowance is used up.
Let your AI assistant set it up
The API tab has a Hand this to your AI prompt. Copy it into your coding assistant and it will add the call to your app.
Related articles
Did this answer your question?
Thanks for letting us know.Thanks, we will improve this article. Want a hand right now?
Still need help?
Chat with us and get an answer in a few minutes.