Skip to main content
id
string
required
name
string
required
hook
enum<string>
required

Which save/publish event runs the hook (and which entity type it validates)

Available options:
validateFeature,
validateFeatureRevision,
validateConfig,
validateConfigRevision,
validateExperiment
code
string
required

JavaScript function body executed in the sandbox. Throw an Error to block the save; call addWarning(msg) for a soft warning.

enabled
boolean
required
projects
string[]
required

Project ids the hook applies to (empty = all projects). Always empty for entity-scoped hooks.

dateCreated
string<date-time>
required
dateUpdated
string<date-time>
required
entityType
enum<string>

Set (with entityId) to scope the hook to a single resource.

Available options:
feature,
config,
experiment
entityId
string

The scoped resource: a feature id, or a config key. A config-scoped hook always runs for that config and every config that inherits from it (via parent/extends, transitively).

incrementalChangesOnly
boolean

When true, errors/warnings that already existed before the change being validated are suppressed

lastSuccess
string<date-time>
lastFailure
string<date-time>