Skip to main content
This guide walks you through creating your first application using the Klara API.

Prerequisites

  • A Klara organization account with admin access
  • Access to your organization’s API settings
New to Klara? Use our sandbox environment at sandbox.klara-ai.com to test your integration before going live. Sandbox uses separate API keys from production.

Step 1: Generate an API key

  1. Log in to your Klara dashboard
  2. Navigate to Settings → Integrations → API Keys
  3. Click Create API Key
  4. Enter a name for your key (e.g., “Production API Key”)
  5. Copy the full API key immediately—it will only be shown once
Store your API key securely. The secret portion is only displayed once at creation. If you lose it, you’ll need to create a new key.
Your API key follows this format:
klara_{client_id}.{secret}

Step 2: Create an Application

Make a POST request to create a new application. The API requires company information and a primary contact:
# Use sandbox.klara-ai.com for testing, app.klara-ai.com for production
curl -X POST https://sandbox.klara-ai.com/api/external/applications \
  -H "Authorization: Bearer klara_abc123def456.your-secret-here" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Acme Financial Ltd",
    "company_number": "12345678",
    "country": "GB",
    "primary_contact": {
      "name": "Sophie Mitchell",
      "email": "sophie@acme.com",
      "role": "CEO"
    },
    "pre_auth": true
  }'

Required fields

FieldDescription
company_nameName of the company being onboarded
countryISO country code (e.g., GB, IE)
company_numberRegistration number (required for UK companies)
primary_contact.nameFull name of the primary contact
primary_contact.emailEmail address of the primary contact
For UK companies (country: "GB"), the company_number is validated against the Companies House registry. The company_name must also match the registered name exactly as it appears in Companies House.

Step 3: Handle the response

A successful request returns:
{
  "application_id": "550e8400-e29b-41d4-a716-446655440000",
  "link": "https://app.klara-ai.com/external/your-org/apply/ABC123?auth_code=X7K9M2P4Q8R1S5T3",
  "participants": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "access_token": "at_7f3k9m2p4q8r1s5t",
      "email": "sophie@acme.com",
      "role": "primary"
    }
  ],
  "pre_auth_code": "X7K9M2P4Q8R1S5T3"
}

Step 4: Redirect the user

Redirect the user to the link URL. If you used pre_auth: true, they’ll land directly on the submission form without needing to verify their email.
The pre-auth code expires after 72 hours. If the user doesn’t access the link in time, they’ll be prompted to verify their email instead.

Step 5: Re-entry with refreshed pre-auth

If a user leaves the form and comes back later via your platform, you don’t need to create a new application. Instead, refresh the pre-auth code on the existing one:
  1. User starts the application but leaves before completing it
  2. User returns to your platform and wants to continue
  3. Your backend calls POST /api/external/applications/{id}/pre-auth to get a fresh link
  4. Redirect the user — they’re authenticated instantly with the new code
curl -X POST https://sandbox.klara-ai.com/api/external/applications/550e8400-e29b-41d4-a716-446655440000/pre-auth \
  -H "Authorization: Bearer klara_abc123def456.your-secret-here"
See the full Refresh Pre-Auth API reference for response details and error handling.

Next steps

Authentication

Learn more about API key management and security.

API Reference

See the full API specification with all parameters.