Test 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
POST /api/configs/inline-hooks/test

Test an inline hook script with a sample context.

application/json

Body Required

Responses

POST /api/configs/inline-hooks/test
curl \
 --request POST 'https://[tenant_id].logto.app/api/configs/inline-hooks/test' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"script":"string","hookType":"inlineHook.postFirstFactorVerification","event":{},"environmentVariables":{"additionalProperty1":"string","additionalProperty2":"string"}}'
Request examples
{
  "script": "string",
  "hookType": "inlineHook.postFirstFactorVerification",
  "event": {},
  "environmentVariables": {
    "additionalProperty1": "string",
    "additionalProperty2": "string"
  }
}
Response examples (200)
{}
[
  "string"
]
string
42.0
true