Register a webhook destination — server token only
POST
/v1/webhooks
const url = 'http://localhost:3000/v1/webhooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://acme.com/dropin-hooks"}'};
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://localhost:3000/v1/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://acme.com/dropin-hooks" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string format: uri
Example
https://acme.com/dropin-hooksResponses
Section titled “Responses”Destination created (Outpost returns its id + signing secret). IDEMPOTENT ON URL: posting a url that is already registered returns the EXISTING destination rather than adding a second one, because two destinations for one url mean the tenant receives every event twice. Note that the existing destination’s response will not repeat the signing secret, which Outpost returns only on first creation.
Media typeapplication/json
object
Examplegenerated
{}Authenticated but not permitted.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
requestId
required
string
fields
Present only for VALIDATION_FAILED.
Array<object>
object
path
string
message
string
Example
{ "error": { "code": "VALIDATION_FAILED" }}