Update Alert Webhook

Update Webhook

The Update Webhook endpoint allows customers to modify an existing webhook configuration, including its URL, secret, description, and enabled status. Since webhooks and alerts are now managed separately, you cannot modify alert rules through this endpoint.

Authentication

Include the following headers in your requests:

Access-Token: <your-access-token>

Permissions

Ensure your API user has a role with admin or edit-alert-webhook-endpoint permission.

Endpoint

  • URL: https://api.genlogs.io/alerts/webhook/{webhook_id}

  • Method: PATCH

URL Parameters

Parameter
Type
Required
Description

webhook_id

string (UUID)

Yes

The unique identifier of the webhook configuration to update

Request Body

All fields are optional. Only provide the fields you want to change.

Field
Type
Required
Description

webhook_url

string

No

The new HTTPS endpoint URL

secret

string

No

The new secret key (minimum 16 characters)

description

string

No

The new description

enabled

boolean

No

Set to true to enable or false to disable the webhook

Field Requirements

  • webhook_url: Must be a valid HTTPS URL if provided. Cannot be a URL already registered by this customer.

  • secret: Must be at least 16 characters long if provided.

  • enabled: When set to false, the webhook will not receive any notifications until re-enabled.

Generating a New Secret

If you need to update your webhook secret, refer to the secret generation commands from the Create Webhook documentation.

Response Codes

Code
Description

200 OK

Successfully updated the webhook configuration

400 Bad Request

Missing or invalid parameters (e.g., URL already registered, secret too short)

401 Unauthorized

Authentication credentials missing or incorrect

403 Forbidden

User lacks permission to update webhook configurations

404 Not Found

Webhook configuration with the specified ID was not found

500 Internal Server Error

Server error occurred

Response Body

The response body has the same structure as the Create Webhook endpoint response, reflecting the updated data.

Field
Type
Description

id

string (UUID)

Unique identifier for the webhook configuration

webhook_url

string

The URL where notifications will be sent

description

string|null

The description for the webhook

enabled

boolean

Indicates if the webhook is active

created_at

string (datetime)

ISO timestamp when the configuration was created

Request Examples

curl -L \
  --request PATCH \
  --url 'https://api.genlogs.io/alerts/webhook/{webhook_id}' \
  --header 'Access-Token: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "webhook_url": "https://example.com",
    "secret": "text",
    "description": "text",
    "enabled": true
  }'

Update Webhook

patch

Update webhook settings

Authorizations
Path parameters
webhook_idstring · uuidRequired
Header parameters
x-api-keystringRequired

API Key required for authentication.

Body

Schema for updating webhook settings

webhook_urlany ofOptional
string · uri · min: 1 · max: 2083Optional
or
nullOptional
secretany ofOptional
stringOptional
or
nullOptional
descriptionany ofOptional
stringOptional
or
nullOptional
enabledany ofOptional
booleanOptional
or
nullOptional
Responses
200
Successful Response
application/json
Responseany
patch
PATCH /alerts/webhook/{webhook_id} HTTP/1.1
Host: api.genlogs.io
Access-Token: YOUR_API_KEY
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "webhook_url": "https://example.com",
  "secret": "text",
  "description": "text",
  "enabled": true
}

No content

Last updated