Replace a webhook endpoint
curl --request PUT \
--url https://api.melso.ai/v1/webhook-endpoints/{endpoint_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"event_types": [],
"description": "<string>",
"enabled": true
}
'import requests
url = "https://api.melso.ai/v1/webhook-endpoints/{endpoint_id}"
payload = {
"url": "<string>",
"event_types": [],
"description": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', event_types: [], description: '<string>', enabled: true})
};
fetch('https://api.melso.ai/v1/webhook-endpoints/{endpoint_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"event_types": [
"company.onboarding_completed"
],
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"error": "lines[0].vat_rate must be 21, 10, 4 or 0",
"code": "invalid_invoice",
"request_id": "req_01JAB3K9X2"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}Webhook endpoints
Replace a webhook endpoint
Replaces the endpoint’s URL, description, event types and enabled flag.
PUT
/
webhook-endpoints
/
{endpoint_id}
Replace a webhook endpoint
curl --request PUT \
--url https://api.melso.ai/v1/webhook-endpoints/{endpoint_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"event_types": [],
"description": "<string>",
"enabled": true
}
'import requests
url = "https://api.melso.ai/v1/webhook-endpoints/{endpoint_id}"
payload = {
"url": "<string>",
"event_types": [],
"description": "<string>",
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', event_types: [], description: '<string>', enabled: true})
};
fetch('https://api.melso.ai/v1/webhook-endpoints/{endpoint_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"event_types": [
"company.onboarding_completed"
],
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}{
"error": "lines[0].vat_rate must be 21, 10, 4 or 0",
"code": "invalid_invoice",
"request_id": "req_01JAB3K9X2"
}{
"error": "invalid token",
"code": "unauthorized",
"request_id": "req_01JAB3K9X2"
}{
"error": "invoice not found",
"code": "not_found",
"request_id": "req_01JAB3K9X2"
}Preview. A contract we are building with design partners. It is not callable yet, and fields can still change. See Availability.
Authorizations
Your partner secret key, mk_live_… for real companies or mk_test_…
for test companies. Keep it on your servers. See
Authentication.
Path Parameters
Body
application/json
An absolute https URL that resolves to public addresses.
Maximum string length:
2048Minimum array length:
1Available options:
company.onboarding_completed, mandate.signed, mandate.activated, mandate.rejected, mandate.revoked, invoice.issued, invoice.registered, invoice.registration_failed, invoice.sent, invoice.paid, document.processed, bank_movement.reconciliation_proposed, tax_obligation.due_soon, tax_return.calculated, tax_return.approved, tax_return.filed, case.updated, case.information_requested, case.approval_requested, case.completed, notification.received, certificate.issued, payroll_run.validated, affiliation.accepted, affiliation.rejected, contribution_settlement.available, contribution_settlement.discrepancy, contribution_settlement.paid, employment_notification.registered, employment_notification.rejected Maximum string length:
500Response
The updated endpoint.
Available options:
company.onboarding_completed, mandate.signed, mandate.activated, mandate.rejected, mandate.revoked, invoice.issued, invoice.registered, invoice.registration_failed, invoice.sent, invoice.paid, document.processed, bank_movement.reconciliation_proposed, tax_obligation.due_soon, tax_return.calculated, tax_return.approved, tax_return.filed, case.updated, case.information_requested, case.approval_requested, case.completed, notification.received, certificate.issued, payroll_run.validated, affiliation.accepted, affiliation.rejected, contribution_settlement.available, contribution_settlement.discrepancy, contribution_settlement.paid, employment_notification.registered, employment_notification.rejected