Update webhook endpoint
curl --request PATCH \
--url https://api.social-api.ai/v1/webhooks/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [],
"is_active": true,
"url": "https://example.com/webhooks/socialapi"
}
'import requests
url = "https://api.social-api.ai/v1/webhooks/{id}"
payload = {
"events": [],
"is_active": True,
"url": "https://example.com/webhooks/socialapi"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [], is_active: true, url: 'https://example.com/webhooks/socialapi'})
};
fetch('https://api.social-api.ai/v1/webhooks/{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://api.social-api.ai/v1/webhooks/{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([
'events' => [
],
'is_active' => true,
'url' => 'https://example.com/webhooks/socialapi'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.social-api.ai/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"events\": [],\n \"is_active\": true,\n \"url\": \"https://example.com/webhooks/socialapi\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.social-api.ai/v1/webhooks/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [],\n \"is_active\": true,\n \"url\": \"https://example.com/webhooks/socialapi\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.social-api.ai/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [],\n \"is_active\": true,\n \"url\": \"https://example.com/webhooks/socialapi\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-03-14T09:00:00Z",
"events": [
"comment.received",
"dm.received"
],
"id": "wh_01HZ9X3Q4R5M6N7P8V2K0W1J",
"is_active": true,
"url": "https://example.com/webhooks/socialapi"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Webhooks
Update webhook endpoint
Partially updates a webhook endpoint. All fields are optional; at least one must be provided.
PATCH
/
webhooks
/
{id}
Update webhook endpoint
curl --request PATCH \
--url https://api.social-api.ai/v1/webhooks/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [],
"is_active": true,
"url": "https://example.com/webhooks/socialapi"
}
'import requests
url = "https://api.social-api.ai/v1/webhooks/{id}"
payload = {
"events": [],
"is_active": True,
"url": "https://example.com/webhooks/socialapi"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [], is_active: true, url: 'https://example.com/webhooks/socialapi'})
};
fetch('https://api.social-api.ai/v1/webhooks/{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://api.social-api.ai/v1/webhooks/{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([
'events' => [
],
'is_active' => true,
'url' => 'https://example.com/webhooks/socialapi'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.social-api.ai/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"events\": [],\n \"is_active\": true,\n \"url\": \"https://example.com/webhooks/socialapi\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.social-api.ai/v1/webhooks/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [],\n \"is_active\": true,\n \"url\": \"https://example.com/webhooks/socialapi\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.social-api.ai/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [],\n \"is_active\": true,\n \"url\": \"https://example.com/webhooks/socialapi\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-03-14T09:00:00Z",
"events": [
"comment.received",
"dm.received"
],
"id": "wh_01HZ9X3Q4R5M6N7P8V2K0W1J",
"is_active": true,
"url": "https://example.com/webhooks/socialapi"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
Webhook endpoint ID
Body
application/json
Fields to update
Events replaces the subscribed event types.
Available options:
post.scheduled, post.published, post.failed, post.partial, post.updated, post.deleted, post.unpublished, post.retried, comment.received, dm.received, dm.sent, dm.referral, dm.postback, dm.status.sent, dm.status.delivered, dm.status.read, dm.status.failed, review.received, review.updated, mention.received, account.connected, account.disconnected, account.updated, page.removed IsActive enables or disables delivery to this endpoint.
Example:
true
URL changes the webhook delivery endpoint. Must be HTTPS.
Example:
"https://example.com/webhooks/socialapi"