Update a webhook endpoint
curl --request PATCH \
--url https://api.relettr.com/v1/webhook_endpoints/{endpoint_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"enabled": true,
"description": "<string>"
}
'import requests
url = "https://api.relettr.com/v1/webhook_endpoints/{endpoint_id}"
payload = {
"url": "<string>",
"events": [],
"enabled": True,
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: [], enabled: true, description: '<string>'})
};
fetch('https://api.relettr.com/v1/webhook_endpoints/{endpoint_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "we_4mN8pQ2rS3tU4vW5xY6zA7",
"object": "webhook_endpoint",
"livemode": true,
"url": "<string>",
"events": [
"chapter.ready"
],
"enabled": true,
"description": "<string>",
"api_version": "v1",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}Webhooks
Update a webhook endpoint
PATCH
/
webhook_endpoints
/
{endpoint_id}
Update a webhook endpoint
curl --request PATCH \
--url https://api.relettr.com/v1/webhook_endpoints/{endpoint_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"enabled": true,
"description": "<string>"
}
'import requests
url = "https://api.relettr.com/v1/webhook_endpoints/{endpoint_id}"
payload = {
"url": "<string>",
"events": [],
"enabled": True,
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: [], enabled: true, description: '<string>'})
};
fetch('https://api.relettr.com/v1/webhook_endpoints/{endpoint_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "we_4mN8pQ2rS3tU4vW5xY6zA7",
"object": "webhook_endpoint",
"livemode": true,
"url": "<string>",
"events": [
"chapter.ready"
],
"enabled": true,
"description": "<string>",
"api_version": "v1",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}Authorizations
Body
application/json
Response
The endpoint.