For developers

Integration guide

Register an environment. Finish one sign-in round trip. Check one protected action on your backend. Add roles, workloads, and agent grants when you need them.

Step by step

Your first integration in three steps

Start hosted. Go API-first when you want your own UI.

1

Register an app and its environment

  • Choose the sign-in methods for the app.
  • Set a return URL for the hosted flow.
  • Keep the environment credential on your server.

ResultAn app environment with its own product directory and environment credential.

2

Finish one sign-in round trip

  • Send the browser to the hosted flow with state and your registered return URL.
  • Check the returned state.
  • Exchange the one-time code on your backend.
  • Create your own session.

ResultA signed-in person and a session that your product owns.

3

Check one protected action

  • Ask Keyrox for effective access in the selected environment and scope.
  • Enforce the decision on your backend.
  • Reflect the same result in your UI.

POST/v1/apps/{appId}/environments/{environmentId}/access

Then add what the product needs

Vocabulary

Key terms

Five terms you’ll see everywhere.

Keyrox tenant

Owns app registrations and teammate permissions

App environment

Product directory and an environment credential

Organization

Workspace

Members hold product roles

Keyrox tenant
Owns app registrations and teammate permissions.
App environment
Has the product directory and an environment credential.
Organization or workspace
Groups users inside a product.
Product role
Controls what those users can do.
Keyrox teammate role
Governs management of Keyrox and its app environments.

Who owns what

Keyrox holds the rules. You keep control.

Keyrox stores configuration, issues credentials, and resolves current access. Your product owns its session, data, and enforcement. The target API decides.

Who calls

  • Customers
  • Services
  • Agents

Your product or target API

Owns and enforces

  • Its session and screens
  • Its business data
  • The decision to allow or deny

Keyrox

Stores, issues, resolves

  • Identity and access configuration
  • Credentials for people, services, agents
  • Current effective access
  • Recorded audit events

Effective access changes on the next live check. If a change must apply on the next request, your product asks Keyrox with a live authorization check.

Technical shape

How each integration works

Six integrations, one pattern: Keyrox issues or resolves. Your product or API decides.

IntegrationHow it worksIn short
Hosted customer sign-inThe app sends the browser to a branded hosted flow with state and a registered return URL. The app checks the returned state, exchanges the one-time code on its backend, and creates its own session.Add branded sign-in to your product.
App-owned sign-in and directoryThe product renders its pages and calls the app-environment APIs from its backend. The environment secret stays on the server. Eligible managed or app-specific SSO connections require provider setup.Keep your existing customer experience and integrate Keyrox behind it.
Product authorizationThe live app access endpoint resolves effective roles, permissions, feature grants, and configuration for the selected environment and scope. The product enforces the decision.Apply the right permissions inside each app and workspace.
Service identityA registered service requests an audience-bound access token. The resource API validates issuer and audience, then checks the action and resource as required by its policy.Give a worker its own identity and scoped API access.
Agent delegationA person approves a grant through a browser or device flow. The agent obtains short-lived tokens for the approved service and uses them at the resource API.Let a person approve a specific job for an agent.
Keyrox managementThe console and CLI use Keyrox sessions. Supported API and MCP operations can use scoped management credentials. The management endpoint is distinct from a product’s own protected MCP endpoint.Manage Keyrox from your console, CLI, or supported automation tools.

Verification behavior

Token snapshots and live checks

Effective access changes on the next live check. Pick the check that matches how fast a change must apply.

A token can carry a snapshot

A token can carry a snapshot of permissions from when it was issued.

Offline checks follow the token

An offline signature check follows the verifier’s token validity rules.

Use a live check for the next request

Integrations that need a role change on the next request should use the relevant live authorization check.

Two checks, not one

Revocation-aware token validation and recomputing current product permissions are separate checks.

Reference points

Endpoints at a glance

The four you’ll meet first.

  • POST/v1/apps/{appId}/environments/{environmentId}/access

    App-scoped access

    Resolves effective roles, permissions, feature grants, and configuration for the selected environment and scope. Your product enforces the decision.

  • POST/v1/workload/token

    Workload issuance

    A registered service requests an audience-bound access token for the API it intends to call.

  • POST/v1/check

    Resource authorization

    A live authorization check of an action and resource, as required by the resource API’s policy.

  • POST/v1/mcp

    MCP management

    Credential-scoped management tools, filtered by the credential’s permissions. This is distinct from a product’s own protected MCP endpoint.

Meet developers where they work

Console, CLI, REST, SDK, MCP

Pick the surface. Same environments, same rules.

Console

Set up apps and environments, then review and change access. The console uses Keyrox sessions, and its own sign-in runs on Keyrox.

Open the console

CLI

Sign in and create a personal credential for the intended service, with scopes and expiry choices, plus revocation.

REST API

Call app-environment, workload, and authorization endpoints from your backend.

TypeScript SDK

Integrate from TypeScript behind your own UI.

MCP management tools

Supported, credential-scoped tools. The operations available follow the credential’s permissions.

Before you go live

A short checklist

Seven things to confirm.

  • Keep the environment secret on your server. Use it only from your backend.
  • Check state and exchange the code on the backend. Then create your own session.
  • Enforce on the backend, reflect in the UI. Both should use the same effective access.
  • Use a live check where a change must apply on the next request. Don’t rely on a token snapshot for that.
  • Set up each SSO provider. Each one needs its credentials and callback setup.
  • Test email end to end. Email delivery needs compatible notification configuration and a live inbox test.
  • Qualify your own deployment. Confirm live routing, providers, mail, and any client migration before you rely on them.

Ready when you are

Start with one round trip.

Everything else builds on one environment, one sign-in, and one check.