Skip to main content
PUT
/
management
/
v1
/
projects
/
{projectId}
/
webhooks
/
{webhookId}
Update Webhook
curl --request PUT \
  --url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/webhooks/{webhookId} \
  --header 'Content-Type: application/json' \
  --header 'X-Management-Id: <api-key>' \
  --header 'X-Management-Token: <api-key>' \
  --data '{
  "target_url": "<string>",
  "events": [
    "business_validation_rule.assignment.created"
  ],
  "active": true
}'
{
  "object": "webhook",
  "created_at": "2024-04-30T08:13:55.789Z",
  "id": "wh_Fk1HzL9lqC1lpuIFxp3TShB4",
  "events": [
    "redemption.failed"
  ],
  "target_url": "your_url",
  "active": false
}

Authorizations

X-Management-Id
string
header
required
X-Management-Token
string
header
required

Path Parameters

projectId
string
required

Provide the unique identifier of the project.

Example:

"proj_TrlkLiH4"

webhookId
string
required

Provide the unique identifier of the webhook configuration.

Example:

"wh_Fk1HzL9lqC1lpuIFxp3TShB4"

Body

application/json

Defines the webhook configuration to be updated.

Request body schema for PUT /management/v1/projects/{projectId}/webhooks.

target_url
string
required

URL address that receives webhooks.

events
enum<string>[]
required

Lists the events that trigger webhook sendout.

active
boolean
default:true

Determines if the webhook configuration is active.

Response

Returns the details about the updated webhook configuration.

Response body schema for PUT /management/v1/projects/{projectId}/webhooks/{webhookId}. Response body schema for webhook endpoints.

id
string
required

Unique identifier of the webhook.

Example:

"wh_i45Uez36Uz8XNW6PXC0eyGmb"

object
enum<string>
default:webhook
required

The type of the object represented by JSON.

Available options:
webhook
created_at
string<date-time>
required

Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format.

Example:

"2024-01-02T08:31:46.562Z"

target_url
string
required

URL address that receives webhooks.

events
enum<string>[]
required

Lists the events that trigger webhook sendout.

active
boolean
default:true
required

Determines if the webhook configuration is active.

I