List Registered Webhooks
curl --request GET \
--url https://api.ayrshare.com/api/hook/webhook \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ayrshare.com/api/hook/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ayrshare.com/api/hook/webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ayrshare.com/api/hook/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ayrshare.com/api/hook/webhook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ayrshare.com/api/hook/webhook")
.header("Authorization", "Bearer <token>")
.asString();{
"batch": "https://mywebsite.com/hook",
"batchUpdated": "2024-01-11T20:05:18Z",
"feedUpdated": "2024-01-11T18:20:50Z",
"refId": "1c72bd62e59807fdfdc5cc083",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2023-12-06T01:54:08Z",
"social": "https://mywebsite.com/hook",
"socialUpdated": "2023-10-26T03:20:46Z",
"status": "success",
"updated": "2024-01-11T18:20:51Z"
}
{
"webhooks": [
{
"messages": "https://mywebsite.com/hook",
"messagesUpdated": "2024-12-11T09:58:22Z",
"refId": "d0b8bf39805ae442094137f09f2417bf2s82",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2024-02-19T12:17:12Z",
"status": "success",
"updated": "2023-08-22T11:55:06Z"
}
]
}
Webhooks
List Registered Webhooks
Return the webhook URLs registered for your account. Set allWebhooks to true to list the webhooks for every User Profile, including the Primary Profile.
GET
/
hook
/
webhook
List Registered Webhooks
curl --request GET \
--url https://api.ayrshare.com/api/hook/webhook \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ayrshare.com/api/hook/webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ayrshare.com/api/hook/webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ayrshare.com/api/hook/webhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ayrshare.com/api/hook/webhook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ayrshare.com/api/hook/webhook")
.header("Authorization", "Bearer <token>")
.asString();{
"batch": "https://mywebsite.com/hook",
"batchUpdated": "2024-01-11T20:05:18Z",
"feedUpdated": "2024-01-11T18:20:50Z",
"refId": "1c72bd62e59807fdfdc5cc083",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2023-12-06T01:54:08Z",
"social": "https://mywebsite.com/hook",
"socialUpdated": "2023-10-26T03:20:46Z",
"status": "success",
"updated": "2024-01-11T18:20:51Z"
}
{
"webhooks": [
{
"messages": "https://mywebsite.com/hook",
"messagesUpdated": "2024-12-11T09:58:22Z",
"refId": "d0b8bf39805ae442094137f09f2417bf2s82",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2024-02-19T12:17:12Z",
"status": "success",
"updated": "2023-08-22T11:55:06Z"
}
]
}
Header Parameters
Query Parameters
boolean
default:false
Return all registered webhooks for every User Profile associated with your account, including the Primary Profile.
You only need to provide the Primary Profile’s API Key in the request header.
{
"batch": "https://mywebsite.com/hook",
"batchUpdated": "2024-01-11T20:05:18Z",
"feedUpdated": "2024-01-11T18:20:50Z",
"refId": "1c72bd62e59807fdfdc5cc083",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2023-12-06T01:54:08Z",
"social": "https://mywebsite.com/hook",
"socialUpdated": "2023-10-26T03:20:46Z",
"status": "success",
"updated": "2024-01-11T18:20:51Z"
}
{
"webhooks": [
{
"messages": "https://mywebsite.com/hook",
"messagesUpdated": "2024-12-11T09:58:22Z",
"refId": "d0b8bf39805ae442094137f09f2417bf2s82",
"scheduled": "https://mywebsite.com/hook",
"scheduledUpdated": "2024-02-19T12:17:12Z",
"status": "success",
"updated": "2023-08-22T11:55:06Z"
}
]
}