Register an endpoint; the signing secret is returned once
POST
/webhooks
const url = 'https://acme.gravitastec.com/api/v1/webhooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com","eventTypes":["document.accepted"],"companyIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://acme.gravitastec.com/api/v1/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com", "eventTypes": [ "document.accepted" ], "companyIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
url
required
string format: uri
eventTypes
required
Array<string>
companyIds
Array<string> | null
Responses
Sección titulada «Responses»Created
Media typeapplication/json
object
url
required
string format: uri
eventTypes
required
Array<string>
companyIds
Array<string> | null
id
string format: uuid
status
string
disabledReason
string | null
secret
Shown only once
string
Example
{ "eventTypes": [ "document.accepted" ], "status": "active"}Limit_exceeded (plan without API access
All validation errors with field paths; the document is not numbered
Media typeapplication/problem+json
object
type
string
title
string
status
integer
code
string
errors
Array<object>
object
path
string
message
string
Example generated
{ "type": "example", "title": "example", "status": 1, "code": "example", "errors": [ { "path": "example", "message": "example" } ]}