cURL
curl --request POST \ --url https://api.trench.dev/webhooks \ --header 'Content-Type: application/json' \ --data '{ "url": "https://your-webhook-url.com", "enableBatching": true, "eventTypes": [ "page", "track", "identify", "group" ], "eventNames": [ "UserSignedUp", "UserLoggedIn" ], "flatten": true }'
{ "uuid": "123e4567-e89b-12d3-a456-426614174000", "url": "https://your-webhook-url.com", "enableBatching": true, "createdAt": "2021-01-01T00:00:00.000Z", "eventTypes": [ "page", "track", "identify", "group" ], "eventNames": [ "UserSignedUp", "UserLoggedIn" ], "flatten": true }
Create a new webhook.
data
{ "data": [ { "uuid": "b99b40c5-e306-4351-9f1d-9a13bb9e8bd1", "type": "track", "event": "ConnectedAccount", "userId": "123e4567-e89b-12d3-a456-426614174000", "properties": { "totalAccounts": 4 }, "timestamp": "2024-10-21T21:32:17.000Z", "parsedAt": "2024-10-21T21:32:23.194Z" } ] }
The webhook has been successfully created. Requires private API key in Bearer token.
The response is of type object.
object
Was this page helpful?