Links

reviews

Get, reply, and delete reviews on your social networks.

Reviews API Endpoint

Click the in the endpoint to view details.
Get, reply, and delete reviews on your connected social accounts including Facebook page ratings and Google Business Profile reviews. In Beta.
Premium or Business plan required.
get
https://app.ayrshare.com/api
/reviews
Get All Reviews

Request Examples

cURL
Node.js
Python
PHP
C#
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/reviews?platform=gmb
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/reviews?platform=gmb", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://app.ayrshare.com/api/reviews?platform=gmb', headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/reviews?platform=gmb';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace UserGETRequest_charp
{
class User
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/reviews?platform=gmb";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}

get
https://app.ayrshare.com/api
/reviews/:id
Get a Single Review

Request Examples

cURL
Node.js
Python
PHP
C#
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb", {
method: "GET",
headers: {
"Authorization": `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb', headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace UserGETRequest_charp
{
class User
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/reviews/AbFvOqmQJ4xMTl2mjZl0h83TcOj?platform=gmb";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}

post
https://app.ayrshare.com/api
/reviews
Reply to a Review

Request Examples

cURL
Node.js
Python
PHP
C#
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"reviewId": "Ut1fWU6XkqkMayHGnJZ", "platform": "gmb", "reply": "An amazing review!"}' \
-X POST https://app.ayrshare.com/api/reviews
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/reviews", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
reviewId: "Ut1fWU6XkqkMayHGnJZ", // required
platform: "gmb", // required
reply: "An amazing review!", //required
}),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'reviewId': 'Ut1fWU6XkqkMayHGnJZ',
'platform': 'gmb',
'reply': 'An amazing review!'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.post('https://app.ayrshare.com/api/reviews',
json=payload,
headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/reviews';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$data = json_encode([
'reviewId' => 'Ut1fWU6XkqkMayHGnJZ', // Replace with your actual review ID
'platform' => 'gmb',
'reply' => 'An amazing review!'
]);
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $data
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace PostPOSTRequest_charp
{
class Post
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/reviews";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = "{\"reviewId\" : \"Ut1fWU6XkqkMayHGnJZ\","
+ "\"platform\" : \"gmb\"",
+ "\"reply\" : [ \"An amazing review!\" ]}";
streamWriter.Write(json);
streamWriter.Flush();
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}

delete
https://app.ayrshare.com/api
/reviews
Delete a Review Reply

Request Examples

cURL
Node.js
Python
PHP
C#
curl \
-H "Authorization: Bearer API_KEY" \
-d '{"reviewId": "Ut1fWU6XkqkMayHGnJZ", "platform": "gmb"}' \
-X DELETE https://app.ayrshare.com/api/reviews
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/reviews", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({
reviewId: "Ut1fWU6XkqkMayHGnJZ", // required
platform: "gmb", // required
}),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
payload = {'reviewId': 'Ut1fWU6XkqkMayHGnJZ',
'platform': 'gmb'}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.delete('https://app.ayrshare.com/api/reviews',
json=payload,
headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/reviews';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$data = json_encode([
'reviewId' => 'Ut1fWU6XkqkMayHGnJZ', // Replace with your actual review ID
'platform' => 'gmb'
]);
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_DELETE => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $data
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace PostPOSTRequest_charp
{
class Post
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/reviews";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "DELETE";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
string json = "{\"reviewId\" : \"Ut1fWU6XkqkMayHGnJZ\","
+ "\"platform\" : \"gmb\""}";
streamWriter.Write(json);
streamWriter.Flush();
}
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}
Last modified 2d ago