Create webhook endpoint
curl --request POST \
--url https://gengen.farm/api/gengen/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": []
}
'import requests
url = "https://gengen.farm/api/gengen/v1/webhook-endpoints"
payload = {
"url": "<string>",
"events": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: []})
};
fetch('https://gengen.farm/api/gengen/v1/webhook-endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"secret": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Webhooks
Create webhook endpoint
Create webhook endpoint. See the Audio API guide for limits, lifecycle and examples. Save the returned secret now; it is shown only once.
POST
/
webhook-endpoints
Create webhook endpoint
curl --request POST \
--url https://gengen.farm/api/gengen/v1/webhook-endpoints \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": []
}
'import requests
url = "https://gengen.farm/api/gengen/v1/webhook-endpoints"
payload = {
"url": "<string>",
"events": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: []})
};
fetch('https://gengen.farm/api/gengen/v1/webhook-endpoints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"secret": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}See the Audio API guide for request examples, limits, billing and delivery behavior.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json