webhooks
public

Update Webhook Endpoint

Changed on

Update a webhook endpoint.

Scopes: webhooks:write

patch/v1/webhooks/endpoints/{id}

Request

  • Base URL
    https://api.polar.sh
  • URL
    https://api.polar.sh/v1/webhooks/endpoints/{id}
  • Auth
    • OpenID Connect (/.well-known/openid-configuration, scopes: webhooks:write)
    • or HTTP bearer
    • or HTTP bearer

Path parameters

idstring uuid4 required

The webhook endpoint ID.

Request body

urlstring uri nullable

The URL where the webhook events will be sent.

namestring nullable

An optional name for the webhook endpoint to help organize and identify it.

format'raw' | 'discord' | 'slack'
eventsWebhookEventType[] nullable

The events that will trigger the webhook.

enabledboolean nullable

Whether the webhook endpoint is enabled.

Example request

{
  "url": "https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0"
}

Response

Webhook endpoint updated.

created_atstring date-time required

Creation timestamp of the object.

modified_atstring date-time nullable required

Last modification timestamp of the object.

idstring uuid4 required

The ID of the object.

urlstring required

The URL where the webhook events will be sent.

namestring nullable

An optional name for the webhook endpoint to help organize and identify it.

format'raw' | 'discord' | 'slack' required
secretstring required

The secret used to sign the webhook events.

organization_idstring uuid4 required

The organization ID associated with the webhook endpoint.

eventsWebhookEventType[] required

The events that will trigger the webhook.

enabledboolean required

Whether the webhook endpoint is enabled and will receive events.

Example response

{
  "url": "https://webhook.site/cb791d80-f26e-4f8c-be88-6e56054192b0",
  "secret": "whsec_ovyN6cPrTv56AApvzCaJno08SSmGJmgbWilb33N2JuK"
}

Changes

    • warning

      added the new discount.created enum value to the / response property for the response status

    • warning

      added the new discount.deleted enum value to the / response property for the response status

    • warning

      added the new discount.updated enum value to the / response property for the response status

    • warning

      added the new subscription.cycled enum value to the / response property for the response status

    • info

      added the new discount.created enum value to the request property //

    • info

      added the new discount.deleted enum value to the request property //

    • info

      added the new discount.updated enum value to the request property //

    • info

      added the new subscription.cycled enum value to the request property //