Skip to main content
All CollectionsAutomation & APIsAPI
API - GET all testimonials
API - GET all testimonials
Damon Chen avatar
Written by Damon Chen
Updated over a year ago

You can get a list of all testimonials by issuing a GET request to the /testimonials endpoint. This will respond with an array of testimonial objects, including all video and text testimonials.

You can optionally use type='type' query string to filter the results. Valid types are video and text.

// GET all video and text testimonials curl "https://api.testimonial.to/v1/testimonials" -H "Authorization: Bearer API_KEY" 

// GET all video testimonials curl "https://api.testimonial.to/v1/testimonials?type=video" -H "Authorization: Bearer API_KEY"

// GET all text testimonials curl "https://api.testimonial.to/v1/testimonials?type=text" -H "Authorization: Bearer API_KEY"

Liked: If you are only interested in liked video/text testimonials, you can set liked=true in the GET request, like this

// GET all liked video and text testimonials curl "https://api.testimonial.to/v1/testimonials?liked=true" -H "Authorization: Bearer API_KEY" 

// GET all liked video testimonials curl "https://api.testimonial.to/v1/testimonials?type=video&liked=true" -H "Authorization: Bearer API_KEY"

Highlighted: To show only highlighted testimonials you can provide the highlighted=true parameter like so:
โ€‹

// GET all highlighted testimonials
"https://api.testimonial.to/v1/testimonials?highlighted=true" -H "Authorization: Bearer API_KEY"

Tag filtering: To show testimonials with certain tags you can provide a tag parameter like so: tag=My tag&tag=My tag 2. The provided values are tag names found in the tag manager.

// GET all test testimonials with tag name "My tag" OR "My tag 2"
"https://api.testimonial.to/v1/testimonials?tag=My tag&tag=My tag 2" -H "Authorization: Bearer API_KEY"

How to get the API_KEY

You need to go to the dashboard page. On the right side of each space card, there is a โš™๏ธ icon, click that you will see a dropdown list, choose the API key

notion image

You will see a popup modal show your API key, click Copy API Key to copy the key

notion image

Return value

The above endpoint returns an array of JSON objects like this:

Did this answer your question?