Events Webhook

Our Events Webhook lets you stay up to date with Cord activity in your app. Choose which events you want to receive and where we should send them to. Run your own analytics, integrate with tools like Slack, or even build your own AI chatbot assistant...


Tell us what events to send and where #

You can select which events to receive and where we should send them on the Cord Console. Log in to your project and go to the Events tab.

When you give us your Events Webhook endpoint, we will attempt to verify the URL before saving it to your project. You can also set your endpoint via REST API.


Verify incoming events #

To make sure that requests hitting your endpoint are really from Cord, verify the incoming request's signature using your project secret.

Use our helper function from the server sdk which will validate the signature and timestamp on the webhook requests.

Alternatively, you can perform the same verification in your own code. Each request has a X-Cord-Signature header set which you should be able to match with a signature you create from the incoming event, using a HMAC-SHA256 keyed hash and your project's secret.

javascript:
import { validateWebhookSignature } from '@cord-sdk/server';

validateWebhookSignature(req, <YOUR_CORD_PROJECT_SIGNING_SECRET>);
// process event
import { validateWebhookSignature } from '@cord-sdk/server';

validateWebhookSignature(req, <YOUR_CORD_PROJECT_SIGNING_SECRET>);
// process event
Copy

Event Structure #

All events have the following common properties at the top level of the payload:


type #

required
T
The type of event. The contents of the event property will vary depending on the event type. See https://docs.cord.com/reference/events-webhook#Events-2 for more detail about the body of each event type.

timestamp #

required
string
The time at which this event was sent.

projectID #

required
string
The ID for the project this event belongs to.

event #

required
WebhookPayloads[T]
The body of the event, which will vary depending on event type. See https://docs.cord.com/reference/events-webhook#Events-2 for more detail about the body of each event type.

Events #

Detailed information about each available event and its specific body:

Type 
Description 
thread-message-added
A new Cord message was added
notification-created
A new Cord notification was created
url-verification
Verifies ownership of an events webhook URL

Ask Cordy