Skip to main content
POST
/
api
/
hooks
Get Hooks
curl --request POST \
  --url https://api.example.com/api/hooks \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_dir": "<string>"
}
'
{
  "hook_config": {
    "pre_tool_use": [
      {
        "matcher": "*",
        "hooks": [
          {
            "command": "<string>",
            "type": "command",
            "timeout": 60
          }
        ]
      }
    ],
    "post_tool_use": [
      {
        "matcher": "*",
        "hooks": [
          {
            "command": "<string>",
            "type": "command",
            "timeout": 60
          }
        ]
      }
    ],
    "user_prompt_submit": [
      {
        "matcher": "*",
        "hooks": [
          {
            "command": "<string>",
            "type": "command",
            "timeout": 60
          }
        ]
      }
    ],
    "session_start": [
      {
        "matcher": "*",
        "hooks": [
          {
            "command": "<string>",
            "type": "command",
            "timeout": 60
          }
        ]
      }
    ],
    "session_end": [
      {
        "matcher": "*",
        "hooks": [
          {
            "command": "<string>",
            "type": "command",
            "timeout": 60
          }
        ]
      }
    ],
    "stop": [
      {
        "matcher": "*",
        "hooks": [
          {
            "command": "<string>",
            "type": "command",
            "timeout": 60
          }
        ]
      }
    ]
  }
}

Body

application/json

Request body for loading hooks.

project_dir
string | null

Workspace directory path for project hooks

Response

Successful Response

Response containing hooks configuration.

hook_config
HookConfig · object

Hook configuration loaded from the workspace, or None if not found