Skip to content
Dashboard
Theme
Theme

Add a redirect URI

POST /v1/redirect_uris: Add a redirect URI.

View Markdown

POST /v1/redirect_uris

Scope
environment:write
Auth
Secret key (sk_…)
Since
1.0
  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

  • uri string (uri) Required

    Exact match. An absolute https URL; http://localhost (or another loopback host) in sandbox environments only; or, for native apps, a reverse-domain private-use scheme such as com.example.app:/oauth/callback (RFC 8252 §7.1: lowercase, at least one dot, a path, no authority, user info or fragment). javascript:, data:, file:, vbscript: and single-word schemes are refused. Sign-in from a publishable key always requires PKCE S256.

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/redirect_uris" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"uri": "https://app.acme.com/callback"
}'
Response 201
{
"id": "ruri_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "redirect_uri",
"uri": "https://app.acme.com/callback",
"created_at": "2026-01-15T09:30:00Z"
}