Update Webhook
PUThttps://{api2.codechat.dev}/api/v2/business/:businessId/webhook
Authorization: Business Token
name: Business Tokentype: httpscheme: bearerbearerFormat: jwtdescription: This business token will handle all instances.. Enter the token generated at the time of business creation. See how to insert the BUSINESS_TOKEN in the request header: ```sh curl -H 'authorization: Bearer BUSINESS_TOKEN ...' ```in: header
Update Webhook
Request
Path Parameters
businessId stringrequired
Business id.
- application/json
Body
required
url Urlrequired
Instance unique url.
enabled Enabled
Default value: false
Enable or disable the url.
Responses
- 200
- 400
- 401
BusinessWebhookCreateResponse
- application/json
- Schema
- Example (from schema)
Schema
webhookId stringrequired
url stringrequired
enabled booleanrequired
createdAt date-timerequired
updatedAt date-timerequired
businessBusinessId stringrequired
{
"webhookId": "string",
"url": "string",
"enabled": true,
"createdAt": "2024-04-14T14:11:05.632Z",
"updatedAt": "2024-04-14T14:11:05.632Z",
"businessBusinessId": "string"
}
BadRequestException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
UnauthorizedException
- application/json
- Schema
- Example (from schema)
Schema
message string[]required
Default value: string,[object Object]
error stringrequired
statusCode numberrequired
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- CURL
curl -L -g -X PUT 'https://{api2.codechat.dev}/api/v2/business/:businessId/webhook' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"url": "string",
"enabled": false
}'
ResponseClear