Skip to main content
POST
Approve the authorization (merchant consent)

Authorizations

Authorization
string
header
required

API Key Authentication

Use your API key in the Authorization header:

Key Types:

Secret Keys (Server-Side Only):

  • Format: tybrite_sk_live_* (production) or tybrite_sk_test_* (sandbox)
  • Full read/write access to all endpoints
  • ⚠️ NEVER expose in client-side code or public repositories
  • Required for: write operations, authentication, payment verification, AI recommendations

Publishable Keys (Client-Safe):

  • Format: tybrite_pk_live_* (production) or tybrite_pk_test_* (sandbox)
  • Read-only access (GET requests only, plus POST semantic search)
  • ✅ Safe for client-side JavaScript, mobile apps, and public code
  • Allowed for: browsing products, search, CMS content, pricing queries

Endpoint-Specific Requirements:

  • Authentication endpoints (/v1/auth/*): Secret key required
  • Payment verification (POST /v1/payments/verify): Secret key required
  • AI Recommendations (POST /v1/recommendations): Secret key required
  • Semantic Search (POST /v1/search): Both key types allowed (read-only operation)
  • All write operations: Secret key required
  • All read operations: Both key types allowed

Using a publishable key for restricted operations returns 403 Forbidden.

Body

application/json
client_id
string
required

Registered client identifier.

Example:

"fantastic-storefront"

redirect_uri
string<uri>
required

Must match the URI from the original GET request.

Example:

"https://yourapp.com/callback"

scope
string
required

Space-separated list of scopes from the original GET request.

Example:

"read orders:read"

state
string
required

CSRF token from the original GET request.

Example:

"a8f3d2e1c9b7"

environment
enum<string>
required

Environment for the provisioned key pair.

Available options:
sandbox,
production
Example:

"sandbox"

store_id
string<uuid>
required

UUID of the store the merchant is authorizing access to.

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Authorization approved — redirect the browser to redirect_to

redirect_to
string<uri>
required

The URL to redirect the merchant's browser to. Contains a short-lived one-time code and the original state value.

Example:

"https://yourapp.com/callback?code=abc123def456&state=a8f3d2e1c9b7"