Webhooks
Get an HTTP request from SocialKit when a post is scheduled, published or fails, or a social account is added, updated or removed.
A webhook makes SocialKit call a URL of yours each time a chosen event happens in a workspace. Typical uses: kick off a Zapier, Make or n8n automation, drop a note in a Slack channel, or update your CRM the moment something changes, with no need to poll the API.
Webhooks belong to one workspace. Only workspace Admins can create and change them, and SocialKit asks for your password before saving.
Create a webhook
- In the workspace, choose Webhooks from the sidebar menu.
- Click Create webhook and fill in the form:
- Name: a label you will recognise later, such as
n8n: publishing flow. - Callback URL: your endpoint. SocialKit calls it over the public internet, so a local-only address will not work.
- Method:
POST(usual),GET,PUTorDELETE. - Content-Type:
application/jsonorapplication/x-www-form-urlencoded. - Max attempts: 1 to 3. Above 1, failed deliveries are retried. See Retries.
- Status: switch it off to pause deliveries without deleting the webhook.
- Secret (optional, recommended): signs every delivery. See Check the signature.
- Events: which events trigger it.
- Name: a label you will recognise later, such as
- Click Create.
To test your endpoint, open the webhook and click Test webhook. SocialKit sends a test event at once:
{
"event": "test",
"data": {
"message": "This is a test event.",
"webhook": {
"uuid": "4c2e8a71-93d5-4f0b-b6a2-1e7f0c9d5b38",
"name": "n8n: publishing flow"
},
"triggered_at": "2026-11-24 09:15:42"
}
}Events
| Event | Fires |
|---|---|
post.scheduled | When someone schedules a post. |
post.published | Each time a post goes live on one account (one call per account). |
post.published_all | Once, when every account of the post has published it. |
post.publishing_failed | Each time one account fails to publish a post (one call per account). |
post.deleted | When posts are deleted or moved to the trash. |
account.added | When a new social account is connected. |
account.updated | When an account's details change or it is reconnected. |
account.deleted | When an account is disconnected and removed. |
Payload
The body always holds two keys: event (the event name) and data (what happened).
{
"event": "post.published",
"data": {
"uuid": "8eb4e98d-2b93-44bd-a664-7a6438eff67b",
"status": "published",
"accounts": [],
"versions": [],
"tags": [],
"account": {}
}
}- For post events,
datais the post object you get from Get a post. Onpost.publishedandpost.publishing_failed,data.accountalso tells you which account the call is about, with its link on the network or its errors. - For
account.addedandaccount.updated,datais the account object from Get an account. post.deletedsends onlyuuids, the deleted posts, plusto_trash: truewhen they went to the trash.account.deletedsends only the accountuuid.
Headers:
| Header | Value |
|---|---|
Content-Type | Whatever you picked in the webhook's form. |
X-Request-Source | socialkit |
X-Signature | Present only if you set a secret. See below. |
Deliveries
SocialKit keeps a log of every call. In the webhook, Webhook deliveries lists them by event, result and HTTP code; open one to compare the body sent with your endpoint's reply.
Only 200, 201 and 202 count as delivered. Other codes, timeouts and refused connections are failures.
Retries
With Max attempts above 1, SocialKit tries a failed delivery again after 2 minutes, then after 4 minutes. You can also send any delivery again by hand with Resend.
Check the signature
When a webhook has a secret, each request has an X-Signature header: the HMAC-SHA256 of the JSON payload, keyed with your secret, as lowercase hex. Compute the same value from the raw request body and compare. Reject the request if they differ.
Node.js:
import crypto from 'node:crypto';
function isFromSocialKit(rawBody, signature, secret) {
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
return signature.length === expected.length
&& crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}PHP:
$rawBody = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_SIGNATURE'] ?? '';
$expected = hash_hmac('sha256', $rawBody, getenv('SOCIALKIT_WEBHOOK_SECRET'));
if (! hash_equals($expected, $signature)) {
http_response_code(401);
exit;
}If the secret leaks, open the webhook and use Change secret. New deliveries are signed with the new secret at once, so update your endpoint first.