Toni API Reference
The Toni API is organized around REST. Follow this step-by-step guide to get Toni identity verification fully integrated into your application in under 10 minutes.
Add the Verification Button (Frontend)
Create a simple button in your app that triggers a request to your backend. When the user clicks this, you'll generate a secure Toni session and redirect them to it.
Initialize the Session (Backend)
On your server, use your API Keys to securely request a session URL from the Toni API. Do not expose your Secret Key on the frontend.
Listen for Webhooks
Once the user completes verification, Toni will instantly send a webhook to your server so you can update your database.
Authentication
The Toni API uses API keys to authenticate requests. You can view and manage your API keys in the Toni Dashboard.
Keep your keys secure
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Test Keys
Toni does not use a separate sandbox server. Instead, we use Test Keys to safely test your integration without affecting live data. Use your test API keys (prefixed with sk_test_) to interact with the API in Test Mode. The Toni API will automatically return mock data and bypass real verification flows when a test key is detected.
OAuth 2.0 Authorization
Instead of building your own identity capture UI, you redirect users to Toni. After they verify their identity, we redirect them back to your application with a secure authorization code.
1. Redirect the user
Send the user to our authorize endpoint.
Webhooks
Toni uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when a user's manual document review completes.
Signed Claims (JWT)
Once a user is verified, we issue cryptographic JWT claims. You can verify these independently using our public key.