Skip to main content

Update Webhook

Update an existing integration account webhook for a given integration account.

HTTP Request​

PATCH 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
integrationAccountWebhookIdYesstringUnique identifier for the Integration Account Webhook.
nameNostringName of the webhook.
receiverUrlNostringURL to receive the webhook.
enabledNobooleanIndicates if the webhook is enabled.
eventSubscriptionNoobjectEvent subscription for the webhook.

Example cURL Request​

curl --location --request PATCH 'https://dev.calry.app/api/v1/integration_account_webhook' \
--header 'Authorization: Bearer eyJraWQiOiJzLWM1MzhlMzZiLWJlZDktNDUyZi04MDY3LTc3ZWY5ODQ5MjZiYyIsInR5cCI6IkpXVCIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjMwMDAvYXV0aCIsInVzZXJJZCI6IjQxY2E4YjA4LTU1OWMtNGZkNS1iODVlLTI3Y2NiYmE1ZDI1OSIsIndvcmtzcGFjZUlkIjoiMjdhYzk5ZjMtZGNlMi00MWVlLWEyYzAtNWQ4YzlkZGM0NGEyIiwibmFtZSI6ImVyZnNkIiwic291cmNlIjoibWljcm9zZXJ2aWNlIiwiaWF0IjoxNzEwMDg5ODMxLCJleHAiOjE3MTI0MTQyNTR9.cmwVUEkKD9W2bYaF-1LkSviL9y-4D5joOsD4-ZnqwB1-iv8wyRQAas9IeFjR0tbs8fpeVD-SadLnTZY1F-vA7cpFlQGmACgS6AHmE7Y4zrNnmwO4DvOc9K6oZM9eU7eStzTXkn0trqg8qNMvo5IA30z3P_QZrjnBzNyZYmfOYunBvIv9tWemBOYURoYTtBNAHlp26kMQEuZUVAI_-R2VmtGYNmXe1fRUuP81nWylGwmNY_3mr1koMb3PG2yA1KKluZ2d40pclYoD6X8qO2YAH4ZXC44-ZLaxJXU7gIOWNvmZtIGOPZlLy4Pmvm4MyoP6TfulOIqNUKfzyMXxJvOZ7Q' \
--header 'Content-Type: application/json' \
--data '{
"integrationAccountWebhookId": "8a2d60b9-2c74-486e-ba2a-dccee9a339c7",
"name": "Account1334",
"receiverUrl": "https://local-receiver.loca.lt/smoobu",
"enabled": true,
"eventSubscription": {
"reservation.created": true,
"reservation.updated": true,
"reservation.deleted":true
}
}'

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
}