Skip to main content
POST
/
api
/
v3
/
webhook
/
subscribe
Subscribe To Webhook V1
curl --request POST \
  --url https://api.presenton.ai/api/v3/webhook/subscribe \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>"
}
'
import requests

url = "https://api.presenton.ai/api/v3/webhook/subscribe"

payload = { "url": "<string>" }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};

fetch('https://api.presenton.ai/api/v3/webhook/subscribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "id": "<string>",
  "url": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Headers

Authorization
string
required

Bearer JWT or API Key

Body

application/json
url
string
required

The URL to send the webhook to

event
enum<string>
required

The event to subscribe to

Available options:
presentation.generation.completed,
presentation.generation.failed
secret
string | null

The secret to use for the webhook

Response

Successful Response

id
string
required
url
string
required
event
enum<string>
required
Available options:
presentation.generation.completed,
presentation.generation.failed
created_at
string<date-time>
required