Rotate a webhook secret
curl --request POST \
--url https://api.melso.ai/v1/partner/webhook-endpoints/{endpoint_id}/rotate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/partner/webhook-endpoints/{endpoint_id}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.melso.ai/v1/partner/webhook-endpoints/{endpoint_id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"status": "enabled",
"created_at": "2023-11-07T05:31:56Z",
"secret": "<string>",
"description": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}Webhooks
Rotate a webhook secret
Issues a new secret.
POST
/
partner
/
webhook-endpoints
/
{endpoint_id}
/
rotate-secret
Rotate a webhook secret
curl --request POST \
--url https://api.melso.ai/v1/partner/webhook-endpoints/{endpoint_id}/rotate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.melso.ai/v1/partner/webhook-endpoints/{endpoint_id}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.melso.ai/v1/partner/webhook-endpoints/{endpoint_id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"status": "enabled",
"created_at": "2023-11-07T05:31:56Z",
"secret": "<string>",
"description": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}{
"error": "<string>",
"code": "<string>",
"request_id": "<string>",
"field": "<string>",
"permission": "<string>"
}Early access. Your firm’s owner or an admin creates partner keys in Settings › Developers. See Partner API.
Beta. Melso does not serve this operation yet, and its fields can still change. See what is live.
Melso-Signature carries two v1 values: switch your server over within that window.
Permission: webhooks:write.Authorizations
A partner key of your firm, mk_live_…, which reaches every company of
the firm. Each key carries the permissions chosen when it was created.
Keep it on your servers. See Authentication.
Response
The endpoint, with its new secret.