Skip to content

Connect a Webhook Producer to Relayter

A Webhook Producer sends JSON data from your system to Relayter. Relayter maps the incoming payload to briefing items, products, or assets.

Create the connection

  1. Go to Team settingsConnections.
  2. Click Add connection.
  3. Enter a connection Name.
  4. Select Webhook Producer as the Connection type.
  5. Enter the Authentication token your producer will send with every request.
  6. Optional: enter a Secret to require HMAC-SHA256 signatures.
  7. Optional: select Add timestamp to require timestamp verification.
  8. Save the connection.

Relayter requires the authentication token. HMAC signing and timestamp verification are optional, but HMAC signing is strongly recommended.

Add an endpoint

  1. Open the connection and click Add endpoint.
  2. Choose the Model: Briefing items, Product, or Asset.
  3. Choose the Action:
    • Upsert creates an item or updates the matching item.
    • Delete deletes the matching item.
  4. Under Identifiers, enter the JSON Path containing the identifier and select the Relayter Field it must match.
  5. For an upsert endpoint, add Mappings from paths in the incoming JSON to Relayter properties.
  6. Configure any additional options shown for the selected model, then save.

For briefing items, Relayter can import into the Master briefing or use mapped campaign details to create or select a campaign. The form also provides campaign-status controls for insert, update, and delete behavior.

See Extract Webhook Payload Data with JSON Paths for mapping syntax.

Send data to the endpoint

After you save the endpoint, its Relayter URL appears under Endpoints. Send the request as follows:

SettingValue
MethodPOST for upsert and delete
JSON dataRequest body
AuthenticationAuthorization: Bearer <authentication-token>
Content typeContent-Type: application/json
SignatureWebhook-Request-Signature: <hex-encoded HMAC>
TimestampWebhook-Request-Timestamp: <Unix time in seconds>
Signature algorithmHMAC-SHA256

If the connection has a Secret, Relayter requires a valid signature. If Add timestamp is enabled, the timestamp is also required, must be within 300 seconds of Relayter's current time, and must be included in the signed message.

Test with Postman

Create a webhookSecret Postman environment variable containing the connection Secret. Set the request body to raw JSON, then add this pre-request script:

javascript
const crypto = require('crypto-js');
const body = JSON.stringify(JSON.parse(pm.request.body.raw));
const timestamp = parseInt(Date.now() / 1000, 10);
const message = `${body}.${timestamp}`;
const hmac = crypto.HmacSHA256(message, pm.environment.get('webhookSecret'));
const signature = crypto.enc.Hex.stringify(hmac);

pm.request.headers.upsert({
  key: 'Webhook-Request-Signature',
  value: signature
});
pm.request.headers.upsert({
  key: 'Webhook-Request-Timestamp',
  value: timestamp.toString()
});

Also add these request headers:

text
Authorization: Bearer <authentication-token>
Content-Type: application/json

This script applies when Add timestamp is enabled. If timestamp verification is disabled, sign only the normalized body and omit the Webhook-Request-Timestamp header.

Do not send Webhook-Request-Signature unless a Secret is configured on the connection.