Aperçu

Test chat hook

GET/api/v1/test_chat_hook
Features

Send a test ping to one of the configured AI chat hooks and return status.

Price — $0.00003 per call (twice what serving it costs us), charged to the workspace balance, the same as over MCP.

Also reachable by name at POST /api/v1/tools/test_chat_hook.

Input1
Authorizationheaderrequired
Your API key, sent as Authorization: Bearer dbk_YOUR_API_KEY.Sent from your browser straight to the API — never to Docsbook, never stored.
hook_typestring · queryrequired
Which hook to test
Output3
okboolean
Whether the tool itself succeeded. A tool that ran and refused — an exhausted balance, a plan restriction, a bad argument — answers 200 with ok: false: the call was made and billed, and that refusal is its answer.
resultobject
The tool's own JSON answer, already parsed — not a string to parse a second time.
Show child attributes6
statusstring
"ok" | "error" | "not_configured".
hook_typestring
http_statusnumber
latency_msnumber
urlstring
response_previewstring
duration_msinteger
Server-side wall time for the call.
Limitations
  • REQUIRES the PRO plan or above.
Responses
200The tool ran. Read ok to see whether it succeeded.
401Missing or invalid API key.
Example input
curl 'https://docsbook.io/api/v1/test_chat_hook?hook_type=<hook_type>' \
  -H 'Authorization: Bearer dbk_YOUR_API_KEY'
Example output
{
  "ok": true,
  "result": {
    "status": "<status>",
    "hook_type": "<hook_type>",
    "http_status": 0,
    "latency_ms": 0,
    "url": "<url>",
    "response_preview": "<response_preview>"
  },
  "duration_ms": 0
}

Mis à jour

Cette page vous a-t-elle été utile ?