Skip to main content
All CollectionsAutomation & APIsAPI
API - Submit a text testimonial
API - Submit a text testimonial
Damon Chen avatar
Written by Damon Chen
Updated over 2 years ago

You can submit a text testimonial via a POST request to your Testimonial space, and even add it to your Wall of Love directly.

API syntax

curl --location --request POST 'https://api.testimonial.to/v1/submit/text' \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"testimonial": "text testimonial test",
"rating": 5,
"name": "Damon Chen",
"title": "Founder of Testimonial",
"email": "[email protected]",
"socialLink": "https://twitter.com/damengchen",
"avatarURL": "https://pbs.twimg.com/profile_images/1555946835541463040/D0NVMRp-_400x400.jpg",
"attachedImageURL": "https://pbs.twimg.com/media/FZiNTaCUEAEI8CQ?format=jpg&name=large",
"confirm": true,
"isLiked":true
}'

Parameters

Two parameters are required:

  1. testimonial (the content of the testimonial)

  2. name (submitter's name)

Here are some optional parameters you can use too:

  1. rating (1-5 rating)

  2. attachedImageURL (URL of the attached image)

  3. email (submitter's email)

  4. avatarURL (submitter's avatar URL)

  5. title (submitter's title and company)

  6. socialLink (submitter's social profile link, i.e. LinkedIn profile link)

  7. confirm (whether submitter permits to use his/her video publicly, false by default)

  8. isLiked (directly add the video to the Wall of Love, false by default)

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

Upon a successful request, the status will show success, and message will say The text testimonial is uploaded successfully.

If the request failed, the status will show failed, and the message will display the reason why it failed.

{
"status": "failed",
"message": "Rating has to be an integer whose value is between 1 and 5."
}

Did this answer your question?