Update inline hook

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Logto API references MCP server": {
    "url": "https://openapi.logto.io/mcp"
  }
}

Close
PATCH /api/configs/inline-hooks/{hookType}

Update the inline hook configuration for the given hook type.

Path parameters

  • hookType string Required

    The inline hook type to update.

    Values are inlineHook.postFirstFactorVerification or inlineHook.postSignIn.

application/json

Body Required

Responses

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"
}