# Create or update action **PUT /api/configs/actions/{actionType}** Create or update an action configuration for the given action type. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters ### Path parameters - **actionType** (string) The action type to create or update. ### Body: application/json (object) - **script** (string) The action script. - **environmentVariables** (object) The environment variables for the action script. - **contextSample** (object | null | array[string | number | boolean | null | object] | string | number | boolean) The sample context for action script testing. - **enabled** (boolean) Whether the action is enabled. - **onExecutionError** (string) The action execution error handling policy. ## Responses ### 200 The updated action 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 action 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)