Update the inline hook configuration for the given hook type.
Path parameters
-
The inline hook type to update.
Values are
inlineHook.postFirstFactorVerificationorinlineHook.postSignIn.
Body
Required
-
The inline hook script.
-
The environment variables for the inline hook script.
-
Whether the inline hook is enabled.
-
The inline hook execution error handling policy.
Values are
blockorallow.
PATCH
/api/configs/inline-hooks/{hookType}
curl \
--request PATCH 'https://[tenant_id].logto.app/api/configs/inline-hooks/{hookType}' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"script":"string","environmentVariables":{"additionalProperty1":"string","additionalProperty2":"string"},"contextSample":{},"enabled":true,"onExecutionError":"block"}'
Request examples
{
"script": "string",
"environmentVariables": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"contextSample": {},
"enabled": true,
"onExecutionError": "block"
}
Response examples (200)
{
"script": "string",
"environmentVariables": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"contextSample": {},
"enabled": true,
"onExecutionError": "block"
}