Skip to content
Dashboard
Theme
Theme

Update a sign-in hook

PATCH /v1/sign_in_hooks/{hook}: Update a sign-in hook.

View Markdown

PATCH /v1/sign_in_hooks/{hook}

Changes the URL, fail mode, timeout or enabled flag. Omitted fields keep their value.

Scope
policies:write
Auth
Secret key (sk_…)
Since
1.0
  • hook string Required

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • url string

    min length 9 · max length 2048

  • fail_mode string

    closed (default) refuses the sign-in when the hook does not answer validly; open continues without claims.

    one of closed, open

  • timeout_ms integer

    min 100 · max 5000

  • enabled boolean

Errors share one shape; see the error code catalogue.

curl -X PATCH \
"https://api.ohauthcat.com/v1/sign_in_hooks/hook_01J9ZQ4M7K2X8V3N5B6C1D0E9F" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://app.acme.com/callback",
"fail_mode": "closed",
"timeout_ms": 100,
"enabled": true
}'
Response 200
{
"id": "hook_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"object": "sign_in_hook",
"point": "pre_profile_issue",
"url": "https://app.acme.com/callback",
"fail_mode": "closed",
"timeout_ms": 100,
"enabled": true,
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z"
}