# Create or update inline hook **PUT /api/configs/inline-hooks/{hookType}** Create or update an inline hook configuration for the given hook type. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters ### Path parameters - **hookType** (string) The inline hook type to create or update. ### Body: application/json (object) - **script** (string) The inline hook script. - **environmentVariables** (object) The environment variables for the inline hook script. - **contextSample** (object | null | array[string | number | boolean | null | object] | string | number | boolean) The sample context for inline hook script testing. - **enabled** (boolean) Whether the inline hook is enabled. - **onExecutionError** (string) The inline hook execution error handling policy. ## Responses ### 200 The updated inline hook configuration. #### Body: application/json (object) - **script** (string) - **environmentVariables** (object) - **contextSample** (object | null | array[string | number | boolean | null | object] | string | number | boolean) - **enabled** (boolean) - **onExecutionError** (string) ### 201 The created inline hook configuration. #### Body: application/json (object) - **script** (string) - **environmentVariables** (object) - **contextSample** (object | null | array[string | number | boolean | null | object] | string | number | boolean) - **enabled** (boolean) - **onExecutionError** (string) ### 400 The request body is invalid. ### 401 Unauthorized ### 403 The tenant's subscription plan does not support this feature. [Powered by Bump.sh](https://bump.sh)