Use webhooks to get notified when something happens in Campsite
Webhooks allow your integration to receive real-time notifications about events in Campsite, like a new post or comment being created. When an event occurs, Campsite sends an HTTP POST request to the URL you specify, allowing your integration to take action based on the event data.
To add a webhook to your integration:
Webhook payloads are sent as JSON in the body of the POST request. Here’s an example payload for a post.created
event:
The following events are supported:
post.created
: Triggered when a new post is created.comment.created
: Triggered when a new comment is created.app.mentioned
: Triggered when your integration is @-mentioned in a post or comment.message.created
: Triggered when a new message is created in a chat thread.message.dm
: Triggered when a new message is created in a direct message between your integration and one user. (See Bot DMs for more information.)The data object in the payload will contain information about the respective entity (post or comment) that triggered the event.
Campsite signs outbound requests using a shared secret key. To verify that an incoming webhook is genuinely from Campsite:
The X-Campsite-Signature header has the following format:
To verify the signature:
Here’s a TypeScript example of how to verify the signature:
Use webhooks to get notified when something happens in Campsite
Webhooks allow your integration to receive real-time notifications about events in Campsite, like a new post or comment being created. When an event occurs, Campsite sends an HTTP POST request to the URL you specify, allowing your integration to take action based on the event data.
To add a webhook to your integration:
Webhook payloads are sent as JSON in the body of the POST request. Here’s an example payload for a post.created
event:
The following events are supported:
post.created
: Triggered when a new post is created.comment.created
: Triggered when a new comment is created.app.mentioned
: Triggered when your integration is @-mentioned in a post or comment.message.created
: Triggered when a new message is created in a chat thread.message.dm
: Triggered when a new message is created in a direct message between your integration and one user. (See Bot DMs for more information.)The data object in the payload will contain information about the respective entity (post or comment) that triggered the event.
Campsite signs outbound requests using a shared secret key. To verify that an incoming webhook is genuinely from Campsite:
The X-Campsite-Signature header has the following format:
To verify the signature:
Here’s a TypeScript example of how to verify the signature: