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.createdflag.updatedflag.deletedtargeting.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.
| Field | Type | Required state | Description |
|---|---|---|---|
url | string, URL | Required when creating | Destination URL for the outbound webhook. |
events | array of event strings | Required when creating; at least one event | Flag lifecycle events to subscribe to. Supported values are flag.created, flag.updated, flag.deleted, and targeting.updated. |
secret | string | Optional when creating; 8–128 characters when provided | Optional signing secret for the webhook. It is accepted by the create request and is not included in the webhook response schema. |
enabled | boolean | Optional when creating; defaults to true | Whether the webhook is enabled. Returned on webhook records. |
id | string | Returned by the API | Webhook identifier. |
projectId | string | Returned by the API | Identifier of the project that owns the webhook. |
createdAt | string | Returned by the API | Webhook creation timestamp. |
data | array of webhook records | Returned by the list operation | Container 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.
| Method | Path | Description |
|---|---|---|
POST | /v1/projects/{projectId}/webhooks | Register a webhook URL for flag lifecycle events, with an optional signing secret. |
GET | /v1/projects/{projectId}/webhooks | List the webhooks configured for a project. |