Change, pause or turn on an endpoint
curl --request PATCH \
--url https://platform.demosmith.ai/v1/webhooks/{endpoint_id} \
--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/{endpoint_id}"
payload = {
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": True
}
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: [], description: '<string>', enabled: true})
};
fetch('https://platform.demosmith.ai/v1/webhooks/{endpoint_id}', 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": {}
}
}Webhooks
Change, pause or turn on an endpoint
PATCH
/
webhooks
/
{endpoint_id}
Change, pause or turn on an endpoint
curl --request PATCH \
--url https://platform.demosmith.ai/v1/webhooks/{endpoint_id} \
--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/{endpoint_id}"
payload = {
"url": "<string>",
"events": [],
"description": "<string>",
"enabled": True
}
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: [], description: '<string>', enabled: true})
};
fetch('https://platform.demosmith.ai/v1/webhooks/{endpoint_id}', 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": {}
}
}Authorizations
An API key from the Developers page.
Path Parameters
Body
application/json
Response
OK
Available options:
demo.queued, demo.started, demo.progress, demo.input_required, demo.completed, demo.failed, demo.canceled, * 
