Create a Testimonial defined by testimonial.
POST
https://api.usetrust.app/v1/testimonial
Body Parameters
- bodyTestimonialInput
- workspaceIdstringExampleDescription
- firstnamestringExampleDescription
- lastnamestringExampleDescription
- titlestringExampleDescription
- subtitlestringExampleDescription
- companystringExampleDescription
- emailstringExampleDescription
- imageUrlstringExampleDescription
- testimonialTextstringExampleDescription
- externalVideoHtmlstringDescription
- videoTokenstringExampleDescription
- videoUrlstringExampleDescription
- socialMediaProfilesstring[]Example
[ "https://www.facebook.com/trusttestimonials", "https://www.linkedin.com/company/trust-platform" ]
Description - starsnumber<float>ExampleDescription
- gaveConsentbooleanExampleDescription
- consentDateTimestring<date-time>ExampleDescription
- publishedbooleanExampleDescription
Responses
201
- TestimonialApiDb
- idstring<uuid>
- workspaceIdstring<uuid>
- createdstring<date-time>
- firstnamestring
- lastnamestring
- titlestring
- subtitlestring
- companystring
- emailstring
- imageUrlstring
- testimonialTextstring
- externalVideoHtmlstring
- videoVideoUrlstring
- socialMediaProfilesstring
- starsnumber<float>
- gaveConsentboolean
- consentDateTimestring<date-time>
- publishedboolean
- questionsAndAnswersstring
400
- string
500
- string
curl
curl --request POST \
--url https://api.usetrust.app/v1/testimonial \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.usetrust.app/v1/testimonial", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.usetrust.app/v1/testimonial")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.usetrust.app/v1/testimonial"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
csharp
var options = new RestClientOptions("https://api.usetrust.app")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/v1/testimonial", Method.Post);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);201
// Returns created testimonial.
{
"id": "",
"workspaceId": "",
"created": "",
"firstname": "",
"lastname": "",
"title": "",
"subtitle": "",
"company": "",
"email": "",
"imageUrl": "",
"testimonialText": "",
"externalVideoHtml": "",
"videoVideoUrl": "",
"socialMediaProfiles": "",
"stars": "",
"gaveConsent": false,
"consentDateTime": "",
"published": false,
"questionsAndAnswers": ""
}400
// Bad Request
""500
// Internal Server Error
""