Update site webhook REST API
PUT
/api/sites/{id}/webhooks/{webhookID}
const url = 'https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"description":"example","enabled":true,"events":["example"],"name":"example","url":"https://example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "description": "example", "enabled": true, "events": [ "example" ], "name": "example", "url": "https://example.com" }'Updates configuration without changing the signing secret.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
webhookID
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
description
string
enabled
required
boolean
events
required
Array<string>
name
required
string
url
required
HTTPS destination. Loopback, private, link-local, multicast, and otherwise unsafe addresses are rejected unless development targets are explicitly enabled.
string format: uri
Examplegenerated
{ "description": "example", "enabled": true, "events": [ "example" ], "name": "example", "url": "https://example.com"}Responses
Section titled “Responses”Updated webhook
Media typeapplication/json
object
created_at
required
string format: date-time
description
required
string
enabled
required
boolean
events
required
Array<string>
id
required
string format: uuid
name
required
string
scope
required
string
site_id
string | null format: uuid
updated_at
required
string format: date-time
url
required
string format: uri
Example
{ "scope": "instance"}