InsureTrek
InsureTrek API

Sessions

Embed license applications into your platform with the Sessions API.
Early Access — The Sessions API is in development. If you're interested in integrating, reach out to hello@insuretrek.com and we'll get you set up as an early partner.

Overview

The Sessions API lets you embed InsureTrek license applications directly into your platform. Instead of building complex application forms yourself, you create a session via API and redirect your user to InsureTrek. We handle the hard parts — SSN collection, ~150 dynamic background questions, state-specific disclosures, and payment — then redirect the user back to your app when they're done.

How It Works

  1. Sync profile data — Pre-fill what you already know (name, NPN, address, etc.) so your user doesn't have to re-enter it.
  2. Create a session — Call the API with the license type, states, and payment preference. You get back a URL.
  3. Redirect your user — Send them to the InsureTrek application URL. They complete SSN entry, background questions, disclosures, and payment in our secure environment.
  4. Receive webhooks — Get notified when the application is submitted, approved, denied, or needs action.

Pre-filling Profile Data

Sync your user's profile ahead of time so the application is pre-filled when they arrive.

curl -X PATCH https://api.insuretrek.com/v1/users/usr_abc123/licensing-profile \
  -H "Authorization: Bearer your-access-token" \
  -H "Content-Type: application/json" \
  -d '{
    "npn": "12345678",
    "firstName": "Jane",
    "lastName": "Smith",
    "email": "jane@example.com",
    "phone": "555-123-4567",
    "dateOfBirth": "1990-01-15",
    "residentialAddress": {
      "street": "123 Main St",
      "city": "Austin",
      "state": "TX",
      "zip": "78701"
    }
  }'

Sensitive data like SSN and background question answers are never transmitted through your systems — they're always collected directly by InsureTrek.

Creating a Session

curl -X POST https://api.insuretrek.com/v1/applications/sessions \
  -H "Authorization: Bearer your-access-token" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "usr_abc123",
    "applicationType": "new",
    "licenseType": "life_health",
    "states": ["TX", "CA"],
    "paymentMethod": "user_pays",
    "returnUrl": "https://yourapp.com/callback",
    "webhookUrl": "https://yourapp.com/webhooks"
  }'

Response:

{
  "sessionId": "sess_xyz",
  "applicationId": "app_abc",
  "applicationUrl": "https://apply.insuretrek.com/s/xyz",
  "estimatedFees": { "total": 155.00 },
  "prefilled": { "npn": true, "ssn": false, "backgroundQuestions": false }
}

Redirect your user to applicationUrl. When they finish, they're sent back to your returnUrl with a status parameter (e.g., ?status=submitted).

Checking Application Status

curl https://api.insuretrek.com/v1/applications/app_abc \
  -H "Authorization: Bearer your-access-token"

Returns status per state: pending_review, approved, denied, or requires_action.

Webhooks

Subscribe to events instead of polling. InsureTrek sends POST requests to your webhookUrl as the application progresses.

EventDescription
application.session_startedUser opened the application URL
application.progress_updatedUser completed a step
application.submittedApplication submitted to the state
application.status_changedState approved, denied, or updated the application
application.requires_actionUser action needed — includes an actionUrl to send them back

Payment Options

MethodDescription
user_paysUser pays state + processing fees during the application (default)
partner_billingPartner invoiced monthly. User skips the payment step.
Interested? The Sessions API is in early access. Email hello@insuretrek.com to get started.