Create
const url = 'https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/webhook';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"name":"","entity":"","enabled":true,"eventUrl":"","eventList":[""]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wink.travel/api/managing-entity/d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69/webhook \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "name": "", "entity": "", "enabled": true, "eventUrl": "", "eventList": [ "" ] }'Registers a new webhook subscription for the managing entity and returns the persisted record.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Identifier of the managing entity that will own the webhook
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”object
Descriptive name of this webhook, e.g. ‘Booking confirmation sync’ or ‘Payment notifications’.
Example
Booking confirmation syncThe managing entity (account owner) that will own this webhook.
object
Unique managing entity (account owner) identifier.
Example
d5b8a3c2-9e6f-4a1b-8d34-7c2e1f0a5b69Display name of the managing entity.
Example
The Siam Residences, BangkokWhether this webhook is actively subscribed to events.
Example
trueHTTPS endpoint URL to POST events to. Must be a valid, publicly accessible URL.
Example
https://api.example.com/webhooks/wink/eventsResponses
Section titled “ Responses ”Created
object
Document UUID
Datetime this record was first created
Datetime this record was last updated
Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.
Unique authenticated user identifier
Unique managing entity (owner) identifier
Display name of the managing entity that owns this webhook.
Descriptive name of this webhook, e.g. ‘Booking confirmation sync’ or ‘Payment notifications’.
Whether this webhook is actively subscribed to events.
HTTPS endpoint URL to POST events to. Must be a valid, publicly accessible URL.
Example
{ "id": "", "createdDate": "", "lastUpdate": "", "version": "", "userIdentifier": "", "ownerIdentifier": "", "ownerName": "", "name": "", "enabled": true, "eventUrl": "", "eventList": [ "" ]}Bad Request
object
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}object
object
object
object
object
object
object
object
Unauthorized
object
object
Forbidden
object
object
Internal Server Error
object
Example generated
{}