Update webhook
curl --request PATCH \
--url https://app.tryordinal.com/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "CRM Sync (Updated)",
"url": "https://example.com/webhooks/ordinal-v2",
"topics": [
"post.published",
"post.archived",
"post.content.edited"
]
}
'import requests
url = "https://app.tryordinal.com/api/v1/webhooks/{id}"
payload = {
"name": "CRM Sync (Updated)",
"url": "https://example.com/webhooks/ordinal-v2",
"topics": ["post.published", "post.archived", "post.content.edited"]
}
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({
name: 'CRM Sync (Updated)',
url: 'https://example.com/webhooks/ordinal-v2',
topics: ['post.published', 'post.archived', 'post.content.edited']
})
};
fetch('https://app.tryordinal.com/api/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://app.tryordinal.com/api/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([
'name' => 'CRM Sync (Updated)',
'url' => 'https://example.com/webhooks/ordinal-v2',
'topics' => [
'post.published',
'post.archived',
'post.content.edited'
]
]),
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://app.tryordinal.com/api/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"name\": \"CRM Sync (Updated)\",\n \"url\": \"https://example.com/webhooks/ordinal-v2\",\n \"topics\": [\n \"post.published\",\n \"post.archived\",\n \"post.content.edited\"\n ]\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://app.tryordinal.com/api/v1/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"CRM Sync (Updated)\",\n \"url\": \"https://example.com/webhooks/ordinal-v2\",\n \"topics\": [\n \"post.published\",\n \"post.archived\",\n \"post.content.edited\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryordinal.com/api/v1/webhooks/{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 \"name\": \"CRM Sync (Updated)\",\n \"url\": \"https://example.com/webhooks/ordinal-v2\",\n \"topics\": [\n \"post.published\",\n \"post.archived\",\n \"post.content.edited\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440900",
"name": "CRM Sync (Updated)",
"url": "https://example.com/webhooks/ordinal-v2",
"description": "Sync published posts to our CRM",
"headers": {
"X-Custom-Header": "value"
},
"topics": [
"post.published",
"post.archived",
"post.content.edited"
],
"createdAt": "2026-01-15T10:00:00.000Z",
"createdBy": {
"id": "550e8400-e29b-41d4-a716-446655440010",
"email": "john@acme.com",
"firstName": "John",
"lastName": "Doe"
}
}{
"code": "BAD_REQUEST",
"message": "Bad Request",
"data": {
"errors": {
"publishAt": [
"Invalid date format"
],
"status": [
"Invalid enum value"
]
}
}
}{
"code": "UNAUTHORIZED",
"message": "Invalid or unauthorized API key"
}{
"code": "NOT_FOUND",
"message": "Post not found or does not belong to this workspace"
}Webhooks
Update webhook
Update an existing webhook for the current workspace. All fields are optional—only include the fields you want to update.
PATCH
/
webhooks
/
{id}
Update webhook
curl --request PATCH \
--url https://app.tryordinal.com/api/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "CRM Sync (Updated)",
"url": "https://example.com/webhooks/ordinal-v2",
"topics": [
"post.published",
"post.archived",
"post.content.edited"
]
}
'import requests
url = "https://app.tryordinal.com/api/v1/webhooks/{id}"
payload = {
"name": "CRM Sync (Updated)",
"url": "https://example.com/webhooks/ordinal-v2",
"topics": ["post.published", "post.archived", "post.content.edited"]
}
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({
name: 'CRM Sync (Updated)',
url: 'https://example.com/webhooks/ordinal-v2',
topics: ['post.published', 'post.archived', 'post.content.edited']
})
};
fetch('https://app.tryordinal.com/api/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://app.tryordinal.com/api/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([
'name' => 'CRM Sync (Updated)',
'url' => 'https://example.com/webhooks/ordinal-v2',
'topics' => [
'post.published',
'post.archived',
'post.content.edited'
]
]),
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://app.tryordinal.com/api/v1/webhooks/{id}"
payload := strings.NewReader("{\n \"name\": \"CRM Sync (Updated)\",\n \"url\": \"https://example.com/webhooks/ordinal-v2\",\n \"topics\": [\n \"post.published\",\n \"post.archived\",\n \"post.content.edited\"\n ]\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://app.tryordinal.com/api/v1/webhooks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"CRM Sync (Updated)\",\n \"url\": \"https://example.com/webhooks/ordinal-v2\",\n \"topics\": [\n \"post.published\",\n \"post.archived\",\n \"post.content.edited\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tryordinal.com/api/v1/webhooks/{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 \"name\": \"CRM Sync (Updated)\",\n \"url\": \"https://example.com/webhooks/ordinal-v2\",\n \"topics\": [\n \"post.published\",\n \"post.archived\",\n \"post.content.edited\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440900",
"name": "CRM Sync (Updated)",
"url": "https://example.com/webhooks/ordinal-v2",
"description": "Sync published posts to our CRM",
"headers": {
"X-Custom-Header": "value"
},
"topics": [
"post.published",
"post.archived",
"post.content.edited"
],
"createdAt": "2026-01-15T10:00:00.000Z",
"createdBy": {
"id": "550e8400-e29b-41d4-a716-446655440010",
"email": "john@acme.com",
"firstName": "John",
"lastName": "Doe"
}
}{
"code": "BAD_REQUEST",
"message": "Bad Request",
"data": {
"errors": {
"publishAt": [
"Invalid date format"
],
"status": [
"Invalid enum value"
]
}
}
}{
"code": "UNAUTHORIZED",
"message": "Invalid or unauthorized API key"
}{
"code": "NOT_FOUND",
"message": "Post not found or does not belong to this workspace"
}Authorizations
API key authentication. Generate an API key from your workspace settings.
Path Parameters
The unique identifier of the webhook to update
Body
application/json
The name of the webhook
Minimum string length:
1The URL that will receive webhook events
An optional description for the webhook
The event types this webhook should listen to
Minimum array length:
1Available options:
social_profile.connected, social_profile.disconnected, social_profile.reconnect_needed, post.created, post.scheduled, post.rescheduled, post.unscheduled, post.published, post.publish_failed, post.archived, post.permanently_deleted, post.content.edited, post.comment.created, post.inline_comment.created, post.approval.requested, post.approval.approved, campaign.approval.requested, campaign.approval.approved, invite.created, invite.accepted Optional custom headers to include in webhook requests
Show child attributes
Show child attributes
Was this page helpful?
⌘I