Create a webhook
Parameters
string^https:\/\/[[email protected]:%._\+~#=]{2,256}\.[a-z]{2,6}\b([[email protected]:%_\+.~#?&\/\/=]*)$required
An HTTPS URL
array of string
The created webhook will exclusively push events which belong to the given account identifiers.
Act as a filter: if not set, events belonging to all the organisation's accounts are pushed.
Returns
stringrequired
The webhook's unique identifier
string^https:\/\/[[email protected]:%._\+~#=]{2,256}\.[a-z]{2,6}\b([[email protected]:%_\+.~#?&\/\/=]*)$required
An HTTPS URL
booleanrequired
Determines if events should be sent to the webhook or not.
enumrequired
The account's type.
See the <a href="#section/Live-and-test-accounts">Live and test accounts section</a> for details.
Enum:
- live
- test
array of string
The webhook will exclusively push events which belong to account identifiers.
Acts as a filter: if not set, events belonging to all the organisation's accounts are pushed.
stringdate-timerequired
An <a href="https://pretty-rfc.herokuapp.com/RFC3339">RFC 3339</a>-formatted timestamp.
stringrequired
The secret key used to generate the webhook payload HMAC.
curl 'https://api.lune.co/v1/webhooks' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"url": "https://lune.co"
}'
{
"id": "ljmkOq7vXd239gAE9WALWQ8ZGVD5ExNz",
"url": "https://lune.co",
"enabled": true,
"account_type": "live",
"account_ids": [
"ljmkOq7vXd239gAE9WALWQ8ZGVD5ExNz"
],
"created_at": "1985-04-12T23:20:50.52Z",
"secret": "secret"
}