curl --request PATCH \
--url https://snapwidget.com/api/v1/reviews/{id} \
--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>",
"highlights": [
"<string>"
],
"approved": true,
"hidden": true
}
'import requests
url = "https://snapwidget.com/api/v1/reviews/{id}"
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>",
"highlights": ["<string>"],
"approved": True,
"hidden": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
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>',
highlights: ['<string>'],
approved: true,
hidden: true
})
};
fetch('https://snapwidget.com/api/v1/reviews/{id}', 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/reviews/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
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>',
'highlights' => [
'<string>'
],
'approved' => true,
'hidden' => true
]),
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/reviews/{id}"
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 \"highlights\": [\n \"<string>\"\n ],\n \"approved\": true,\n \"hidden\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://snapwidget.com/api/v1/reviews/{id}")
.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 \"highlights\": [\n \"<string>\"\n ],\n \"approved\": true,\n \"hidden\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://snapwidget.com/api/v1/reviews/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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 \"highlights\": [\n \"<string>\"\n ],\n \"approved\": true,\n \"hidden\": true\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>"
}Update Review
Changes a review. Send one of these: all the fields of a review of a manual source (author_name and body, and the others as add_review); highlights (phrases of the text to show in bold, [] to remove them); approved: true (shows a review that waits for approval); or hidden (true hides it from the widgets, false shows it).
curl --request PATCH \
--url https://snapwidget.com/api/v1/reviews/{id} \
--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>",
"highlights": [
"<string>"
],
"approved": true,
"hidden": true
}
'import requests
url = "https://snapwidget.com/api/v1/reviews/{id}"
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>",
"highlights": ["<string>"],
"approved": True,
"hidden": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
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>',
highlights: ['<string>'],
approved: true,
hidden: true
})
};
fetch('https://snapwidget.com/api/v1/reviews/{id}', 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/reviews/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
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>',
'highlights' => [
'<string>'
],
'approved' => true,
'hidden' => true
]),
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/reviews/{id}"
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 \"highlights\": [\n \"<string>\"\n ],\n \"approved\": true,\n \"hidden\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://snapwidget.com/api/v1/reviews/{id}")
.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 \"highlights\": [\n \"<string>\"\n ],\n \"approved\": true,\n \"hidden\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://snapwidget.com/api/v1/reviews/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.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 \"highlights\": [\n \"<string>\"\n ],\n \"approved\": true,\n \"hidden\": true\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 review's id (the id in get_review_source).
Body
The name of the person (manual source).
The review text (manual source).
Their job title.
Their company.
A link to their photo.
A link to their profile.
The stars, 1 to 5.
1 <= x <= 5A title.
The date (YYYY-MM-DD).
A link to the review.
A link to a video review.
Where the review comes from.
g2, google, capterra, trustpilot, producthunt, x, linkedin, facebook Phrases of the text to show in bold.
30True: the review shows (it waited for approval).
True: hidden from the widgets. False: shown.
Response
The answer, as JSON.
The response is of type object.