Edit

  • PATCH
  • /workspaces
  • /:domain
  • /webhooks
  • /:webhook_id

Edits a webhook. Restricted to admins only.

Request

REQUIRED SCOPES
WORKSPACE, WEBHOOK_MANAGE
URL PARAMETERS
domainrequired string
The workspace domain.
webhook_idrequired integer
The numerical ID of the desired webhook.
POST PARAMETERS
eventsstring[]
The array of events describing when the webhook will be executed. Can be set of PUSH, EXECUTION_STARTED, EXECUTION_SUCCESSFUL, EXECUTION_FAILED or EXECUTION_FINISHED.
projectsstring[]
The array of project name IDs from which webhooks will be executed.
secret_keystring
The value sent in the payload required by the webservice to validate the request.
target_urlstring
The URL to which the payload will be sent.

Last modified on Sep 23, 2024

Example:

curl -X PATCH "https://api.buddy.works/workspaces/:domain/webhooks/:webhook_id" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "events": [
    "EXECUTION_FAILED",
    "EXECUTION_FINISHED"
  ]
}'
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/buddy/webhooks/1", "html_url": "https://app.buddy.works/buddy/webhook/1", "id": 1, "target_url": "http://localhost", "secret_key": "mysecretkey", "projects": [ "company-website", "beta-project" ], "events": [ "EXECUTION_FINISHED", "EXECUTION_FAILED" ], "requests": [] }
STATUS
200 OK
LIMITS
X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999