> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bridgelinepf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Your first quote in five minutes: get a key, price a policy, read the options and send your client the link.

By the end of this page you'll have priced a real policy and have a link you could send to a client.

<Steps>
  <Step title="Get an API key">
    Bridgeline turns on the API for your agency, then an agency admin creates a key in the Bridgeline portal under **API Keys**. The full key is shown once, so put it straight into your secret manager.

    **Start with a test key if you can.** A `bl_test_` key gets real pricing with no real-world effects: nobody is emailed, and test quotes are kept apart from live ones. Test mode is enabled per agency, so ask your Bridgeline contact to enable test mode. Live keys (`bl_live_`) are by invitation during the beta, and they're safe to build with too: creating a quote prices it and stores it, and nothing reaches your client until you send them the link. See [test and live mode](/concepts/test-and-live-mode).

    Store the key in an environment variable:

    ```bash theme={null}
    export BRIDGELINE_API_KEY="bl_test_..."   # or bl_live_...
    ```
  </Step>

  <Step title="Check the key">
    `GET /v1/whoami` tells you which agency the key belongs to and which broker it acts as.

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://portal.bridgelinepf.com/api/v1/whoami \
        -H "Authorization: Bearer $BRIDGELINE_API_KEY"
      ```

      ```javascript Node theme={null}
      const res = await fetch('https://portal.bridgelinepf.com/api/v1/whoami', {
        headers: { Authorization: `Bearer ${process.env.BRIDGELINE_API_KEY}` },
      })
      console.log(await res.json())
      ```

      ```python Python theme={null}
      import os
      import requests

      res = requests.get(
          "https://portal.bridgelinepf.com/api/v1/whoami",
          headers={"Authorization": f"Bearer {os.environ['BRIDGELINE_API_KEY']}"},
          timeout=30,
      )
      print(res.json())
      ```
    </CodeGroup>

    ```json Response theme={null}
    {
      "object": "whoami",
      "livemode": true,
      "brokerage": { "name": "Lone Star Risk Partners" },
      "acting_broker": { "email": "maria@lonestarrisk.example", "name": "Maria Delgado" },
      "api_key": { "type": "agency", "scopes": ["quotes:read", "quotes:write"] },
      "api_version": "2026-09-23"
    }
    ```

    A `403` with `API_ACCESS_NOT_ENABLED` (a live key) or `TEST_MODE_NOT_ENABLED` (a test key) means that mode isn't switched on for your agency yet. Ask your Bridgeline contact.
  </Step>

  <Step title="Create a quote">
    Send the insured's name and state, and for each policy its premium, minimum earned premium, dates, carrier and coverage. That's enough to price.

    The state must be a two-letter USPS code, such as `TX`. A full name like `"Texas"` is refused with a `422` whose message names the code to send (`Use the two-letter state code, e.g. "TX" for Texas.`). Today we finance insureds in Texas; any other valid code still gets a quote, marked [ineligible](/concepts/eligibility).

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://portal.bridgelinepf.com/api/v1/quotes \
        -H "Authorization: Bearer $BRIDGELINE_API_KEY" \
        -H "Content-Type: application/json" \
        -H "Idempotency-Key: $(uuidgen)" \
        -d '{
          "insured": {
            "name": "Lone Star Fabrication LLC",
            "address": { "state": "TX" }
          },
          "policies": [{
            "premium": "46100.00",
            "minimum_earned": { "rate": 0.25 },
            "effective_date": "2026-10-15",
            "expiration_date": "2027-10-15",
            "carrier": { "name": "Scottsdale Insurance Company" },
            "coverages": [{ "type": "general_liability" }]
          }]
        }'
      ```

      ```javascript Node theme={null}
      const res = await fetch('https://portal.bridgelinepf.com/api/v1/quotes', {
        method: 'POST',
        headers: {
          Authorization: `Bearer ${process.env.BRIDGELINE_API_KEY}`,
          'Content-Type': 'application/json',
          'Idempotency-Key': crypto.randomUUID(),
        },
        body: JSON.stringify({
          insured: {
            name: 'Lone Star Fabrication LLC',
            address: { state: 'TX' },
          },
          policies: [{
            premium: '46100.00',
            minimum_earned: { rate: 0.25 },
            effective_date: '2026-10-15',
            expiration_date: '2027-10-15',
            carrier: { name: 'Scottsdale Insurance Company' },
            coverages: [{ type: 'general_liability' }],
          }],
        }),
      })
      const quote = await res.json()
      ```

      ```python Python theme={null}
      import os
      import uuid
      import requests

      res = requests.post(
          "https://portal.bridgelinepf.com/api/v1/quotes",
          headers={
              "Authorization": f"Bearer {os.environ['BRIDGELINE_API_KEY']}",
              "Idempotency-Key": str(uuid.uuid4()),
          },
          json={
              "insured": {
                  "name": "Lone Star Fabrication LLC",
                  "address": {"state": "TX"},
              },
              "policies": [{
                  "premium": "46100.00",
                  "minimum_earned": {"rate": 0.25},
                  "effective_date": "2026-10-15",
                  "expiration_date": "2027-10-15",
                  "carrier": {"name": "Scottsdale Insurance Company"},
                  "coverages": [{"type": "general_liability"}],
              }],
          },
          timeout=30,
      )
      quote = res.json()
      ```
    </CodeGroup>

    Money is a decimal string (`"46100.00"`) and rates are fractions (`0.25` means 25%). The policy dates must be within the last 30 days or in the future; change them if you run this later.

    The quote comes back as `201 Created`. If you're quoting for a colleague, add `"broker_email"` to the body; otherwise the quote belongs to the key's default broker.
  </Step>

  <Step title="Read the options">
    The response is the whole quote. These are the parts you'll use first (abridged, illustrative figures):

    ```json 201 Created theme={null}
    {
      "id": "qte_2lo4LFk5rf8toDFJHSUZ2O",
      "object": "quote",
      "status": "active",
      "expires_at": "2026-11-03T15:04:05Z",
      "hosted_url": "https://portal.bridgelinepf.com/q/p98_xZUO2zaltiX49vC59BgOE1EUoRZSpIGtWjFUs0M",
      "eligibility": { "status": "eligible", "checks": [ ... ], "reasons": [] },
      "assumptions": [
        {
          "code": "TAXES_AND_FEES_NOT_PROVIDED",
          "param": "policies[0].taxes_and_fees",
          "message": "No taxes or fees provided; the amount financed is the premium only."
        },
        {
          "code": "AUDITABLE_ASSUMED",
          "param": "policies[0].auditable",
          "message": "Not provided; assumed auditable (the conservative choice)."
        }
      ],
      "recommended_option_id": "opt_25_10",
      "options": [
        {
          "id": "opt_25_10",
          "down_payment_rate": 0.25,
          "term_months": 10,
          "apr": 0.1195,
          "down_payment": "11525.00",
          "amount_financed": "34575.00",
          "monthly_payment": "3649.71",
          "finance_charge": "1922.08",
          "total_of_payments": "36497.08",
          "total_cost": "48022.08",
          "spread_clamped": false
        }
      ]
    }
    ```

    * **`options`** is every down payment and term we can offer: 30 of them here, five down payments by six terms.
    * **`recommended_option_id`** is a sensible one to show first. It's a default, not advice.
    * **`assumptions`** lists what we filled in because you didn't send it. Send the real value and quote again to remove one.
    * **`eligibility.status`** is `eligible` or `ineligible`. A deal we can't finance still returns `201`, with the reasons and no options.

    The full response also has `policies`, `totals`, `warnings` and `binding_readiness`. [Quote in one call](/guides/quote-in-one-call) walks through all of it.
  </Step>

  <Step title="Send your client the link">
    `hosted_url` opens a page where your client compares every option, picks one and taps **I'm interested**. Email or text it to them yourself; we don't send it for you.

    <Warning>
      `hosted_url` is returned only when the quote is created. Store it. If you lose it, [get a new link](/api-reference/quotes/hosted-link); the old one stops working.
    </Warning>

    When your client responds, we email your broker, and `GET /v1/quotes/{id}` shows `status: "interested"` with their choice and note.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Quote in one call" icon="calculator" href="/guides/quote-in-one-call">
    Taxes and fees, several policies, your own ids, and every field in the response.
  </Card>

  <Card title="The interactive quote" icon="mobile" href="/guides/hosted-quote-page">
    What your client sees and how their response reaches you.
  </Card>

  <Card title="Retries and idempotency" icon="rotate" href="/guides/idempotency">
    Make every call safe to retry.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/guides/errors">
    Branch on stable codes, not messages.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.