Skip to main content

Create Webhook

Create a new integration account webhook for a given integration account.

HTTP Request​

POST https://dev.calry.app/api/v1/integration_account_webhook

Headers​

HeaderValue
AuthorizationBearer YOUR_ACCESS_TOKEN

Request Body​

The request body should be a JSON object containing the following fields:

FieldRequiredTypeDescription
nameYesstringName of the webhook.
receiverUrlYesstringURL to receive the webhook.
integrationAccountIdYesstringUnique identifier for Integration Account.
enabledYesbooleanIndicates if the webhook is enabled.
eventSubscriptionYesobjectEvent subscription for the webhook.

Example cURL Request​

curl --location 'https://dev.calry.app/api/v1/integration_account_webhook' \
--header 'Authorization: Bearer eyJraWQiOiJzLTA3MTZmYTBlLTE5ODgtNGI3NS1hNjcwLWMwYmFkNTZmZTIxYSIsInR5cCI6IkpXVCIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjMwMDAvYXV0aCIsInVzZXJJZCI6IjQ4Yjg5MGYzLTMyMTItNGI3ZS1hMjQzLTEzNGM4N2M0MzkyNiIsIndvcmtzcGFjZUlkIjoiNmZkMjE2MGMtM2VhNi00MmMyLWJjZGQtMmVlZjg5ZjVjYTY2IiwibmFtZSI6ImFzZmFzIiwic291cmNlIjoibWljcm9zZXJ2aWNlIiwiaWF0IjoxNzA4NjI3ODg5LCJleHAiOjE3MzE4NTkxMDJ9.UdMVApxQvc_Q5eZz4eH8ctqzOyYpQEH7oe69MydMPEkY42daiGCU1P2tZA2yKYZttFJi6NIkIMTp2f9KJTmoSPuqIO7iOsmUOAMLmrlUV2jpEq99nAn4z5AtOXHWGnfcYwDrBIrXk9VBUZ9cbRyD4VNxXWUeauKwjuDM1tsgTAiz8POI9mSTm1No51tG3RX_06Bl1lT0ND1iZK_CIacgyPfKn02wkknMdZqtrKe3Ov442iqmuXw6LIFtBRlb4rVB-V7K31X9NVwZ0q-HuOMDnHmvC_Dl87qMC4rh0U64MLJtH4u8ajlClU_mywZuKH_hHeY8gJ_LmbF5xF5dBd8BRg' \
--header 'Content-Type: application/json' \
--data '{
"name": "Hostway Account11",
"receiverUrl": "https://local-receiver.loca.lt/hostway",
"integrationAccountId": "e056f8f0-ecac-4a5a-9603-9387ee5ae753",
"enabled": true,
"eventSubscription": {
"reservation.created": true,
"reservation.updated": true,
"reservation.deleted":false
}
}'

Response​

The response is a JSON object containing the following properties:

  • integrationAccountWebhookId (string): A unique identifier for the Integration Account Webhook.
  • name (string): Name of the webhook.
  • enabled (boolean): Indicates if the webhook is enabled.
  • headers (object): Headers for the webhook.
  • ipAddress (string): IP address of the webhook.
  • eventSubscription (object): Event subscription for the webhook.
  • receiverUrl (string): URL to receive the webhook.
  • listenerUrl (array): URL to listen to the webhook.
  • integrationAccountId (string): Unique identifier for Integration Account.
  • integrationDefinitionId (string): Unique identifier for the Integration Definition.
  • workspaceId (string): Unique identifier for Workspace.
  • apiSupport (boolean): Indicates if the webhook supports API.
  • createdAt (string): When the Integration Account Webhook was created.
  • updatedAt (string): When the Integration Account Webhook was updated last.
  • deleted (string|null): Indicates if the Integration Account Webhook has been deleted.

Response Codes​

  • 200 OK: Successfully created the Integration Account Webhook.
  • 400 Bad Request: The request was invalid or missing parameters.
  • 401 Unauthorized: The request lacks valid authentication credentials.
  • 404 Not Found: The requested resource could not be found.

Example Response​

{
"integrationAccountWebhookId": "eb1b5f35-599e-40f6-b37d-5ea6593071f1",
"name": "Hostway Account11",
"enabled": true,
"headers": null,
"ipAddress": "127.0.0.1",
"eventSubscription": {
"reservation.created": true,
"reservation.deleted": false,
"reservation.updated": true,
"conversation.updated": false
},
"receiverUrl": "https://webhook.site/2f1b2df0-5aac-42c1-ab79-43760776bde4",
"listenerUrl": [
"https://fedb-2406-7400-51-c697-8dad-8b9b-3fba-cfcf.ngrok-free.app/api/v1/listener/hostaway/6eabebf8-d74c-4175-ae60-df798e62aeec"
],
"integrationAccountId": "6eabebf8-d74c-4175-ae60-df798e62aeec",
"integrationDefinitionId": "1ea16ec2-c3ac-4ab9-a8d3-4f67063ce03c",
"workspaceId": "27ac99f3-dce2-41ee-a2c0-5d8c9ddc44a2",
"apiSupport": true,
"createdAt": "2024-03-10T16:34:42.279Z",
"updatedAt": "2024-03-10T16:34:42.279Z",
"deleted": null
}

Note -

  • You can create only one webhook for a given integration account.
  • You can create multiple event subscriptions for a given webhook.