Create webhook
POST
/v1/webhooks
const url = 'http://api.disclosebot.localdev:3000/v1/webhooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'}, body: '{ "data": { "type": "example", "attributes": {}, "relationships": { "trigger_event_types": { "data": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "type": "trigger_event_type" } ] } } } }'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://api.disclosebot.localdev:3000/v1/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/vnd.api+json' \ --data '{ "data": { "type": "example", "attributes": {}, "relationships": { "trigger_event_types": { "data": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "type": "trigger_event_type" } ] } } } }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/vnd.api+json
object
data
required
object
type
string
attributes
object
relationships
object
trigger_event_types
object
data
Array<object>
object
id
string format: uuid
type
string
Responses
Section titled “ Responses ”Created
Validation error