Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

If using Bearer auth, pass the Secret Key as the token:

Body

application/json
functionBody
string
required

JavaScript function body to execute in the sandbox

functionArgs
object

Arguments exposed to the function as named globals (e.g. feature, config, revision)

originalFunctionArgs
object

State before the change. When supplied, the hook also runs against it and Incremental Changes Only suppression is applied to the result.

entityType
enum<string>
Available options:
feature,
config,
experiment
entityId
string

Response

200 - application/json

Resource created

success
boolean
required
returnVal
string

JSON-stringified return value, when the hook returned one

error
string
warnings
string[]
log
string

Captured console output

suppressed
object

Outcomes the previous state produced too, which Incremental Changes Only would hide on a real save