Update a webhook object
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/webhooks/{webhook_id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"url": "https://example.com/webhook",
"name": "<string>",
"subscriptions": [
"conversation_created",
"conversation_status_changed"
]
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhook',
name: '<string>',
subscriptions: ['conversation_created', 'conversation_status_changed']
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/webhooks/{webhook_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/webhooks/{webhook_id}"
payload = {
"url": "https://example.com/webhook",
"name": "<string>",
"subscriptions": ["conversation_created", "conversation_status_changed"]
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"url": "<string>",
"name": "<string>",
"subscriptions": [
"conversation_created"
],
"secret": "<string>",
"account_id": 123
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Webhooks
Update a webhook object
Update a webhook object in the account
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
webhooks
/
{webhook_id}
Update a webhook object
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/webhooks/{webhook_id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"url": "https://example.com/webhook",
"name": "<string>",
"subscriptions": [
"conversation_created",
"conversation_status_changed"
]
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhook',
name: '<string>',
subscriptions: ['conversation_created', 'conversation_status_changed']
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/webhooks/{webhook_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/webhooks/{webhook_id}"
payload = {
"url": "https://example.com/webhook",
"name": "<string>",
"subscriptions": ["conversation_created", "conversation_status_changed"]
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"url": "<string>",
"name": "<string>",
"subscriptions": [
"conversation_created"
],
"secret": "<string>",
"account_id": 123
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
The events you want to subscribe to.
Available options:
conversation_created, conversation_status_changed, conversation_updated, message_created, message_updated, contact_created, contact_updated, webwidget_triggered, conversation_typing_on, conversation_typing_off Example:
[
"conversation_created",
"conversation_status_changed"
]
Response
Success
Secret used to sign webhook requests. Signed webhook deliveries include X-Yampi-Timestamp and X-Yampi-Signature; the signature is sha256= followed by the HMAC-SHA256 of {timestamp}.{raw_request_body} using this secret. Deliveries also include X-Yampi-Delivery when a delivery id is available.