Add a webhook endpoint
curl --request POST \
--url https://platform.demosmith.ai/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": true
}
'import requests
url = "https://platform.demosmith.ai/v1/webhooks"
payload = {
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": True
}
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: [], description: '<string>', enabled: true})
};
fetch('https://platform.demosmith.ai/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"description": "<string>",
"events": [
"demo.queued"
],
"enabled": true,
"disabled_at": "2023-11-07T05:31:56Z",
"disabled_reason": "<string>",
"consecutive_failures": 123,
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}Webhooks
Add a webhook endpoint
POST
/
webhooks
Add a webhook endpoint
curl --request POST \
--url https://platform.demosmith.ai/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": true
}
'import requests
url = "https://platform.demosmith.ai/v1/webhooks"
payload = {
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": True
}
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: [], description: '<string>', enabled: true})
};
fetch('https://platform.demosmith.ai/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"description": "<string>",
"events": [
"demo.queued"
],
"enabled": true,
"disabled_at": "2023-11-07T05:31:56Z",
"disabled_reason": "<string>",
"consecutive_failures": 123,
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "needs_answers",
"message": "<string>",
"details": {}
}
}Authorizations
An API key from the Developers page.
Body
application/json
Response
Created
Available options:
demo.queued, demo.started, demo.progress, demo.input_required, demo.completed, demo.failed, demo.canceled, * 
