Add Review
curl --request POST \
--url https://snapwidget.com/api/v1/review-sources/{id}/reviews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"author_name": "<string>",
"body": "<string>",
"author_title": "<string>",
"author_company": "<string>",
"author_avatar": "<string>",
"author_url": "<string>",
"rating": 3,
"title": "<string>",
"published_at": "<string>",
"url": "<string>",
"video_url": "<string>"
}
'import requests
url = "https://snapwidget.com/api/v1/review-sources/{id}/reviews"
payload = {
"author_name": "<string>",
"body": "<string>",
"author_title": "<string>",
"author_company": "<string>",
"author_avatar": "<string>",
"author_url": "<string>",
"rating": 3,
"title": "<string>",
"published_at": "<string>",
"url": "<string>",
"video_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
author_name: '<string>',
body: JSON.stringify('<string>'),
author_title: '<string>',
author_company: '<string>',
author_avatar: '<string>',
author_url: '<string>',
rating: 3,
title: '<string>',
published_at: '<string>',
url: '<string>',
video_url: '<string>'
})
};
fetch('https://snapwidget.com/api/v1/review-sources/{id}/reviews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://snapwidget.com/api/v1/review-sources/{id}/reviews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'author_name' => '<string>',
'body' => '<string>',
'author_title' => '<string>',
'author_company' => '<string>',
'author_avatar' => '<string>',
'author_url' => '<string>',
'rating' => 3,
'title' => '<string>',
'published_at' => '<string>',
'url' => '<string>',
'video_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://snapwidget.com/api/v1/review-sources/{id}/reviews"
payload := strings.NewReader("{\n \"author_name\": \"<string>\",\n \"body\": \"<string>\",\n \"author_title\": \"<string>\",\n \"author_company\": \"<string>\",\n \"author_avatar\": \"<string>\",\n \"author_url\": \"<string>\",\n \"rating\": 3,\n \"title\": \"<string>\",\n \"published_at\": \"<string>\",\n \"url\": \"<string>\",\n \"video_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://snapwidget.com/api/v1/review-sources/{id}/reviews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"author_name\": \"<string>\",\n \"body\": \"<string>\",\n \"author_title\": \"<string>\",\n \"author_company\": \"<string>\",\n \"author_avatar\": \"<string>\",\n \"author_url\": \"<string>\",\n \"rating\": 3,\n \"title\": \"<string>\",\n \"published_at\": \"<string>\",\n \"url\": \"<string>\",\n \"video_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://snapwidget.com/api/v1/review-sources/{id}/reviews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"author_name\": \"<string>\",\n \"body\": \"<string>\",\n \"author_title\": \"<string>\",\n \"author_company\": \"<string>\",\n \"author_avatar\": \"<string>\",\n \"author_url\": \"<string>\",\n \"rating\": 3,\n \"title\": \"<string>\",\n \"published_at\": \"<string>\",\n \"url\": \"<string>\",\n \"video_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}Reviews
Add Review
Adds a review by hand (a testimonial) to a manual source.
POST
/
review-sources
/
{id}
/
reviews
Add Review
curl --request POST \
--url https://snapwidget.com/api/v1/review-sources/{id}/reviews \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"author_name": "<string>",
"body": "<string>",
"author_title": "<string>",
"author_company": "<string>",
"author_avatar": "<string>",
"author_url": "<string>",
"rating": 3,
"title": "<string>",
"published_at": "<string>",
"url": "<string>",
"video_url": "<string>"
}
'import requests
url = "https://snapwidget.com/api/v1/review-sources/{id}/reviews"
payload = {
"author_name": "<string>",
"body": "<string>",
"author_title": "<string>",
"author_company": "<string>",
"author_avatar": "<string>",
"author_url": "<string>",
"rating": 3,
"title": "<string>",
"published_at": "<string>",
"url": "<string>",
"video_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
author_name: '<string>',
body: JSON.stringify('<string>'),
author_title: '<string>',
author_company: '<string>',
author_avatar: '<string>',
author_url: '<string>',
rating: 3,
title: '<string>',
published_at: '<string>',
url: '<string>',
video_url: '<string>'
})
};
fetch('https://snapwidget.com/api/v1/review-sources/{id}/reviews', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://snapwidget.com/api/v1/review-sources/{id}/reviews",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'author_name' => '<string>',
'body' => '<string>',
'author_title' => '<string>',
'author_company' => '<string>',
'author_avatar' => '<string>',
'author_url' => '<string>',
'rating' => 3,
'title' => '<string>',
'published_at' => '<string>',
'url' => '<string>',
'video_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://snapwidget.com/api/v1/review-sources/{id}/reviews"
payload := strings.NewReader("{\n \"author_name\": \"<string>\",\n \"body\": \"<string>\",\n \"author_title\": \"<string>\",\n \"author_company\": \"<string>\",\n \"author_avatar\": \"<string>\",\n \"author_url\": \"<string>\",\n \"rating\": 3,\n \"title\": \"<string>\",\n \"published_at\": \"<string>\",\n \"url\": \"<string>\",\n \"video_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://snapwidget.com/api/v1/review-sources/{id}/reviews")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"author_name\": \"<string>\",\n \"body\": \"<string>\",\n \"author_title\": \"<string>\",\n \"author_company\": \"<string>\",\n \"author_avatar\": \"<string>\",\n \"author_url\": \"<string>\",\n \"rating\": 3,\n \"title\": \"<string>\",\n \"published_at\": \"<string>\",\n \"url\": \"<string>\",\n \"video_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://snapwidget.com/api/v1/review-sources/{id}/reviews")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"author_name\": \"<string>\",\n \"body\": \"<string>\",\n \"author_title\": \"<string>\",\n \"author_company\": \"<string>\",\n \"author_avatar\": \"<string>\",\n \"author_url\": \"<string>\",\n \"rating\": 3,\n \"title\": \"<string>\",\n \"published_at\": \"<string>\",\n \"url\": \"<string>\",\n \"video_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}{
"message": "<string>",
"errors": {},
"upgrade_url": "<string>"
}Authorizations
A token from the API page: https://snapwidget.com/settings/api
Path Parameters
The source's id (the id in list_review_sources) (a manual source).
Body
application/json
The name of the person.
The review text, 10,000 characters at most.
Their job title.
Their company.
A link to their photo (http or https).
A link to their profile.
The stars, 1 to 5.
Required range:
1 <= x <= 5A title for the review.
The date of the review (YYYY-MM-DD).
A link to the review.
A link to a video review.
Where the review comes from, for its icon.
Available options:
g2, google, capterra, trustpilot, producthunt, x, linkedin, facebook Response
The answer, as JSON.
The response is of type object.