Authentication

Partner API key authentication, scopes, and security practices.

Partner API requests authenticate with an API key, not a staff JWT.

Header

X-API-Key: clfy_test_xxxxxxxxxxxxxxxx

Keys are issued in the Cladfy admin under Developers → API Keys. The full secret is shown once at create or regenerate.

Key formats

PrefixEnvironment
clfy_test_Test / sandbox
clfy_live_Live / production data

Scopes

Keys may be limited to scopes such as clients:read, loans:write, portal:read, or * (all). Missing scopes return 403 with a clear error code.

Tenant binding

The tenant slug in the URL must match the key’s tenant. Cross-tenant keys are rejected.

Portal borrower scope

For /portal/* routes in live mode, also send:

X-Client-Id: {borrower-client-uuid}

(or client_id query). Test mode uses fixtures and does not require this header.

Security practices

  • Store keys only on your server.
  • Never ship keys in mobile apps, SPAs, or public repos.
  • Rotate via Regenerate (email OTP) if compromised.
  • Prefer least-privilege scopes.

Errors

HTTPTypical cause
401Missing / invalid key
403Wrong tenant or missing scope
429Rate limit exceeded