📥

GET all testimonials

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"
 
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"
 

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:
[
    {
        "createdAt": 1612582855000,
        "type": "video",
        "testimonial": {
						"rating": 5,
            "video_url": "https://stream.mux.com/my1pgRrHGSx1zILB9i7KVeWk39wUGtv9Y9qFX9017SlM/medium.mp4",
            "img_thumbnail": "https://image.mux.com/my1pgRrHGSx1zILB9i7KVeWk39wUGtv9Y9qFX9017SlM/thumbnail.png",
            "gif_thumbnail": "https://image.mux.com/my1pgRrHGSx1zILB9i7KVeWk39wUGtv9Y9qFX9017SlM/animated.gif?width=350",
            "sent_by": {
                "email": "customer@email.com",
                "name": "Darren Westall",
                "socialLink": "www.linkedin.com/in/id/",
                "title": "CEO of Paiger.co"
            }
        }
    },
    {
        "createdAt": 1611465973552,
        "type": "text",
        "testimonial": {
						"rating": 5,
            "text": "Testimonial has been a big part of my conversions. I’ve had multiple customers tell me they bought http://vim.so because of the reviews 👍",
            "sent_by": {
                "email": "customer@email.com",
                "name": "Kenneth Cassel",
                "socialLink": "https://twitter.com/KennethCassel",
                "title": "Founder of vim.so",
                "avatar": "https://firebasestorage.googleapis.com/v0/b/testimonialto.appspot.com/o/spaces%2Freal-estate-agent%2Flogo?alt=media&token=fbbe3605-1215-4134-a7dd-a47164f9fdc7"
            }
        }
    }
]