Create a webhook endpoint
curl --request POST \
--url https://api.reedapt.com/v1/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/reedapt/webhooks",
"description": "Production"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com/reedapt/webhooks', description: 'Production'})
};
fetch('https://api.reedapt.com/v1/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.reedapt.com/v1/webhook_endpoints"
payload = {
"url": "https://example.com/reedapt/webhooks",
"description": "Production"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "we_5d1c9a2f7b3e8a40",
"url": "https://example.com/reedapt/webhooks",
"events": [
"dub.completed",
"dub.failed",
"batch.completed"
],
"created_at": "2023-11-07T05:31:56Z",
"object": "webhook_endpoint",
"description": "<string>",
"secret": "whsec_…"
}{
"error": {
"code": "UPLOAD_INCOMPLETE",
"message": "Complete the upload before dubbing it.",
"request_id": "req_8f2c1e0a9b7d6c5e4f3a",
"fields": [
{
"field": "target_languages",
"message": "Field required"
}
]
}
}{
"error": {
"code": "UPLOAD_INCOMPLETE",
"message": "Complete the upload before dubbing it.",
"request_id": "req_8f2c1e0a9b7d6c5e4f3a",
"fields": [
{
"field": "target_languages",
"message": "Field required"
}
]
}
}{
"error": {
"code": "UPLOAD_INCOMPLETE",
"message": "Complete the upload before dubbing it.",
"request_id": "req_8f2c1e0a9b7d6c5e4f3a",
"fields": [
{
"field": "target_languages",
"message": "Field required"
}
]
}
}Webhook endpoints
Create a webhook endpoint
Send this account’s dub events (dub.completed, dub.failed) to a URL. Each
delivery is signed: Reedapt-Signature: t=<unix>,v1=<HMAC-SHA256 of "<t>.<body>">
keyed with the endpoint’s secret.
POST
/
webhook_endpoints
Create a webhook endpoint
curl --request POST \
--url https://api.reedapt.com/v1/webhook_endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/reedapt/webhooks",
"description": "Production"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://example.com/reedapt/webhooks', description: 'Production'})
};
fetch('https://api.reedapt.com/v1/webhook_endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.reedapt.com/v1/webhook_endpoints"
payload = {
"url": "https://example.com/reedapt/webhooks",
"description": "Production"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "we_5d1c9a2f7b3e8a40",
"url": "https://example.com/reedapt/webhooks",
"events": [
"dub.completed",
"dub.failed",
"batch.completed"
],
"created_at": "2023-11-07T05:31:56Z",
"object": "webhook_endpoint",
"description": "<string>",
"secret": "whsec_…"
}{
"error": {
"code": "UPLOAD_INCOMPLETE",
"message": "Complete the upload before dubbing it.",
"request_id": "req_8f2c1e0a9b7d6c5e4f3a",
"fields": [
{
"field": "target_languages",
"message": "Field required"
}
]
}
}{
"error": {
"code": "UPLOAD_INCOMPLETE",
"message": "Complete the upload before dubbing it.",
"request_id": "req_8f2c1e0a9b7d6c5e4f3a",
"fields": [
{
"field": "target_languages",
"message": "Field required"
}
]
}
}{
"error": {
"code": "UPLOAD_INCOMPLETE",
"message": "Complete the upload before dubbing it.",
"request_id": "req_8f2c1e0a9b7d6c5e4f3a",
"fields": [
{
"field": "target_languages",
"message": "Field required"
}
]
}
}Authorizations
rk_live_… or rk_test_…, made in Reedapt under Developers.
Body
application/json
Response
Successful Response
Example:
"we_5d1c9a2f7b3e8a40"
Example:
"https://example.com/reedapt/webhooks"
Every endpoint gets every event.
Example:
[
"dub.completed",
"dub.failed",
"batch.completed"
]
Allowed value:
"webhook_endpoint"Only in the answer that makes the endpoint: keep it to check signatures.
Example:
"whsec_…"