Webhooks

Webhooks

Manage outbound notifications for flag lifecycle events

Overview

Webhooks are project-scoped outbound notifications for FlagForge flag lifecycle events. Use this resource to register a webhook URL and select the events that should be delivered to it, then list the webhooks configured for a project.

The supported event types are:

  • flag.created

  • flag.updated

  • flag.deleted

  • targeting.updated

A webhook can include an optional signing secret and is enabled by default when the enabled field is omitted. The create request accepts the secret, while the webhook response schema exposes the URL, subscribed events, enabled state, identifier, project identifier, and creation timestamp rather than the secret.

Schema

The create request and webhook response use the following fields. projectId is supplied by the project-scoped route; it is returned as part of each webhook record.

FieldTypeRequired stateDescription
urlstring, URLRequired when creatingDestination URL for the outbound webhook.
eventsarray of event stringsRequired when creating; at least one eventFlag lifecycle events to subscribe to. Supported values are flag.created, flag.updated, flag.deleted, and targeting.updated.
secretstringOptional when creating; 8–128 characters when providedOptional signing secret for the webhook. It is accepted by the create request and is not included in the webhook response schema.
enabledbooleanOptional when creating; defaults to trueWhether the webhook is enabled. Returned on webhook records.
idstringReturned by the APIWebhook identifier.
projectIdstringReturned by the APIIdentifier of the project that owns the webhook.
createdAtstringReturned by the APIWebhook creation timestamp.
dataarray of webhook recordsReturned by the list operationContainer for the webhooks returned by the project list endpoint.

Note:

The secret field is accepted when a webhook is created but is not present in the webhook response schema. Store the signing secret securely when you register the webhook.

Endpoints

Both endpoints are scoped to a project through {projectId} and require a server API key. Use the endpoint pages for the generated request and response reference.

MethodPathDescription
POST/v1/projects/{projectId}/webhooksRegister a webhook URL for flag lifecycle events, with an optional signing secret.
GET/v1/projects/{projectId}/webhooksList the webhooks configured for a project.