> ## 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.

# Send the agreement

> Sends the finance agreement to the insured's signer for an application whose price was fixed when its quote was accepted. Bridgeline emails the signing request to the insured. An application has one agreement: calling again returns the same one. Before anything is sent we check that the price is still good and that nothing on the deal needs a person first; a 409 says which. If the price is no longer good the application is canceled and stays closed. Every policy needs a commission rate: send it in policies, or rely on the one given when the quote was accepted. Corrections to the phone or the signer are saved only when the agreement is sent, and are ignored once one is out, as are commission rates. Live keys only, and only for agencies Bridgeline has turned straight-through binding on for.

Sends the finance agreement to the insured's signer, for an application whose price was fixed when you [accepted its quote](https://docs.bridgelinepf.com/api-reference/quotes/accept.md). Nobody at your agency has to open the portal first. The response is the [application](https://docs.bridgelinepf.com/concepts/applications.md), now `awaiting_signature`.

* **Live keys only, and off unless Bridgeline turns it on.** Straight-through binding is enabled agency by agency, on top of accepting quotes. Otherwise every call is a [`403 STRAIGHT_THROUGH_NOT_ENABLED`](https://docs.bridgelinepf.com/errors/STRAIGHT_THROUGH_NOT_ENABLED) (or [`403 APPLICATIONS_NOT_ENABLED`](https://docs.bridgelinepf.com/errors/APPLICATIONS_NOT_ENABLED) if accepting is off). These two are not stored under your `Idempotency-Key`: the same key works once it is on.
* **An `Idempotency-Key` is required.**
* **One agreement per application.** Calling send again returns the same agreement. It never creates a second one, and it never changes the price.
* **Only for a price the API fixed.** An application on the portal path, or one an agent has since repriced in the portal, is refused with a `409` that says which.
* Needs the `applications:write` and `agreements:write` scopes. A key without either gets [`403 MISSING_SCOPE`](https://docs.bridgelinepf.com/errors/MISSING_SCOPE).

## What happens

1. We check that the application's price is still the one fixed at accept, and that the deal is unchanged.
2. We check that nothing on the deal needs a person first: the same [reasons](https://docs.bridgelinepf.com/concepts/applications.md#straight-through-reasons) as at accept, on the application as it stands now. Every policy needs a [commission rate](#commission).
3. We run the [price check](https://docs.bridgelinepf.com/concepts/indicative-quotes.md#how-long-a-price-holds) again, measured from the day the quote was priced. If the price is no longer good, nothing is sent. If the quote is more than 30 days old, the application is also canceled for good.
4. We record each policy's commission and agency fee as you stated them, then create the agreement for exactly the price we checked. Bridgeline emails the signing request to the insured's signer.

The insured signs from that link, then pays the down payment. A person at your agency countersigns in the portal, as today: the person chosen on the application if there is one, otherwise your agency's default signer, otherwise the broker who owns the application. That person must still be able to sign for your agency when you call send, or the call is refused with `COUNTERSIGNER_MISSING`.

Bridgeline emails the signing request to the insured. The API doesn't return a signing link.

## Commission

A send needs your agency's commission rate on every policy. We take it from this call's `policies`, and for a policy with no rate here, from the rate you sent when you [accepted the quote](https://docs.bridgelinepf.com/api-reference/quotes/accept.md#commission).

```json theme={null}
"policies": [
  {"commission_rate": 0.125}
]
```

* One entry per policy, in the order the quote listed its policies. Use `{}` for a policy whose saved rate should stand. The wrong number of entries is a `422` on `policies`.
* `commission_rate` is a fraction of the policy's base premium: `0.125` means 12.5%. It can be `0`. It must be below `1`, with at most 4 decimal places. `12.5` is a `422` that tells you to send `0.125`.
* A rate sent here replaces the saved one for this agreement.
* If a policy has no rate anywhere, the answer is `409 APPLICATION_NOT_SENDABLE` with `COMMISSION_MISSING` on that policy, such as `policies[0].commission_rate`.

The `200` shows what was recorded in [`payout`](https://docs.bridgelinepf.com/concepts/applications#payout): each policy's commission in dollars, your agency fee from the quote, and what is due to your agency and to the billing company. `payout.confirmed_at` is when we recorded it. We record exactly what you state and infer nothing.

## Corrections

`insured_phone` and `signer` are optional. Send them only to add or correct something.

* `insured_phone`: the insured's phone, US only. An agreement can't be sent without one, so send it here if the accept call had none.
* `signer`: the first name, last name and email of the person who signs for the insured. It replaces the one named at accept, and the agreement is emailed there.

Corrections are saved on the application only when this call creates the agreement, so the application always matches the agreement that went out. A call that is refused changes nothing. Once an agreement is out they are ignored, and so are commission rates: this call can't change an agreement that was already sent.

There is no CC field. The signing email copies the people your agency has set up on the application.

To correct an agreement that is already out, [void](https://docs.bridgelinepf.com/api-reference/applications/void.md) it first, then send again. A new commission rate on that send is recorded as a new payout; with no new rate, the new agreement uses the payout already recorded. An application can have at most 3 agreements voided; after the third, send answers `409 APPLICATION_NOT_SENDABLE` with `VOID_LIMIT_REACHED` and your broker sends the next one in the portal.

## When nothing is sent

| Response | Meaning | What to do |
| - | - | - |
| [`409 APPLICATION_NOT_SENDABLE`](https://docs.bridgelinepf.com/errors/APPLICATION_NOT_SENDABLE) | Something has to happen first; `details[]` lists every reason | Fix what you can (a phone, the signer, a commission rate) and call again with a new key. Your broker handles the rest in the portal |
| [`422 VALIDATION_FAILED`](https://docs.bridgelinepf.com/errors/VALIDATION_FAILED) on `policies` | `policies` doesn't have one entry per policy on the application | Send one entry per policy, with a new key |
| [`409 APPLICATION_PRICE_LAPSED`](https://docs.bridgelinepf.com/errors/APPLICATION_PRICE_LAPSED) | The fixed price is no longer good; `details[]` says why. When it says `EXPIRED`, the application is now [canceled](https://docs.bridgelinepf.com/concepts/applications.md#canceled-applications) | Create a new quote and accept it |
| [`409 APPLICATION_CANCELED`](https://docs.bridgelinepf.com/errors/APPLICATION_CANCELED) | The application was canceled earlier; its `cancellation` field says why | Create a new quote and accept it |
| [`409 APPLICATION_MANAGED_IN_PORTAL`](https://docs.bridgelinepf.com/errors/APPLICATION_MANAGED_IN_PORTAL) | An agent changed the price in the portal | Nothing. The agent sends it from the portal |
| [`403 STRAIGHT_THROUGH_NOT_ENABLED`](https://docs.bridgelinepf.com/errors/STRAIGHT_THROUGH_NOT_ENABLED) | Not turned on for your agency, or a test key | Ask your Bridgeline contact. The same key works once it is on |
| [`403 DEFAULT_BROKER_INACTIVE`](https://docs.bridgelinepf.com/errors/DEFAULT_BROKER_INACTIVE) | The key's default broker is no longer active | Ask an agency admin for a new API key |
| [`404 NOT_FOUND`](https://docs.bridgelinepf.com/errors/NOT_FOUND) | No application with this id that your key can see | Check the id and the key |
| [`503 SERVICE_UNAVAILABLE`](https://docs.bridgelinepf.com/errors/SERVICE_UNAVAILABLE) | We couldn't read current rates, the e-signature service couldn't take the agreement, or another send of this application with different commission rates is still in progress | Wait for `Retry-After`, then retry with the **same** key |

A `404` or `409` is stored under the key you sent, so a corrected call needs a new key. A `403` and a `503` are not stored: nothing was sent, and the same key runs the send again.

## Retries

| What you got | What to do |
| - | - |
| `200` | Done. Bridgeline has emailed the signing request to the insured |
| No answer (timeout, network error) | Send the same request again with the same key |
| `503` | Wait for `Retry-After`, then the same request with the same key |
| `409 IDEMPOTENCY_REQUEST_IN_PROGRESS` | Wait for `Retry-After`, then the same request with the same key |
| `500` | Retry with the same key. If it answers [`500 IDEMPOTENCY_RECORD_LOST`](https://docs.bridgelinepf.com/errors/IDEMPOTENCY_RECORD_LOST) or a replayed `500`, read the application: `agreement` set means it was sent. Otherwise call send again with a new key: it can't create a second agreement |

```bash cURL theme={null}
curl -X POST https://portal.bridgelinepf.com/api/v1/applications/app_1rvJBK4j6przAMoe6NxpXJ/send \
  -H "Authorization: Bearer $BRIDGELINE_API_KEY" \
  -H "Bridgeline-Version: 2026-09-23" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "insured_phone": "713-555-0142",
    "policies": [{"commission_rate": 0.125}]
  }'
```

```javascript Node theme={null}
const res = await fetch(`https://portal.bridgelinepf.com/api/v1/applications/${applicationId}/send`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.BRIDGELINE_API_KEY}`,
    'Bridgeline-Version': '2026-09-23',
    'Content-Type': 'application/json',
    'Idempotency-Key': crypto.randomUUID(),
  },
  body: JSON.stringify({ insured_phone: '713-555-0142', policies: [{ commission_rate: 0.125 }] }),
})
const application = await res.json()
```

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

res = requests.post(
    f"https://portal.bridgelinepf.com/api/v1/applications/{application_id}/send",
    headers={
        "Authorization": f"Bearer {os.environ['BRIDGELINE_API_KEY']}",
        "Bridgeline-Version": "2026-09-23",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={"insured_phone": "713-555-0142", "policies": [{"commission_rate": 0.125}]},
    timeout=60,
)
application = res.json()
```

```json 200 theme={null}
{
  "id": "app_1rvJBK4j6przAMoe6NxpXJ",
  "object": "application",
  "livemode": true,
  "status": "awaiting_signature",
  "created_via": "api",
  "quote_id": "qte_2lo4LFk5rf8toDFJHSUZ2O",
  "accepted_option_id": "opt_25_10",
  "pricing": {
    "option_id": "opt_25_10",
    "down_payment_rate": 0.25,
    "term_months": 10,
    "apr": 0.1094,
    "down_payment": "12146.46",
    "amount_financed": "36439.39",
    "monthly_payment": "3830.26",
    "finance_charge": "1863.20",
    "total_of_payments": "38302.59",
    "total_cost": "50449.05",
    "selected_by": "system"
  },
  "price_guaranteed_until": "2026-11-27T15:04:05Z",
  "straight_through": {"route": "straight_through", "reasons": []},
  "agreement": {"sent_at": "2026-11-20T15:04:09Z"},
  "payout": {
    "confirmed_at": "2026-11-20T15:04:08Z",
    "policies": [
      {"id": "pol_2o9fj1oLkchQ9qNzyigGf8", "commission_rate": 0.125, "commission": "5762.50", "agency_fee": "0.00"}
    ],
    "due_to_agency": "5762.50",
    "due_to_billing_company": "42823.35",
    "total": "48585.85"
  },
  "cancellation": null,
  "insured": {
    "name": "Lone Star Fabrication LLC",
    "address": {
      "line1": "1200 Industrial Blvd",
      "city": "Houston",
      "state": "TX",
      "postal_code": "77002"
    }
  },
  "broker": {"email": "maria@lonestarrisk.example"},
  "policies": [
    {
      "id": "pol_2o9fj1oLkchQ9qNzyigGf8",
      "carrier": {"name": "Scottsdale Insurance Company", "match": "matched"},
      "total": "48585.85",
      "effective_date": "2026-10-15",
      "expiration_date": "2027-10-15",
      "document_type": "binder",
      "policy_number": "CPS7712045"
    }
  ],
  "requirements": {"blocking": [], "outstanding": []},
  "portal_url": "https://portal.bridgelinepf.com/application/3d6f1c2e-9a3b-4d4c-8e5f-60718293a4b5",
  "client_reference_id": "EPIC-PROP-2026-0412",
  "metadata": {},
  "created_at": "2026-11-20T15:04:05Z"
}
```

```json 409 Not sendable theme={null}
{
  "error": {
    "type": "conflict",
    "code": "APPLICATION_NOT_SENDABLE",
    "message": "This application's agreement can't be sent yet. See details for what is needed.",
    "details": [
      {
        "code": "INSURED_PHONE_MISSING",
        "message": "The insured's phone number is missing. The broker adds it in the portal.",
        "param": "insured.phone"
      }
    ],
    "doc_url": "https://docs.bridgelinepf.com/errors#APPLICATION_NOT_SENDABLE",
    "request_id": "req_8fJ2kQ9xLm4TzW7nB3cY5pDv"
  }
}
```

```json 409 Price lapsed theme={null}
{
  "error": {
    "type": "conflict",
    "code": "APPLICATION_PRICE_LAPSED",
    "message": "The price fixed for this application is no longer good, so nothing was sent. See details for why.",
    "details": [
      {
        "code": "RATES_MOVED",
        "message": "The benchmark rate has moved by more than 0.50 percentage points since the quote was priced."
      }
    ],
    "doc_url": "https://docs.bridgelinepf.com/errors#APPLICATION_PRICE_LAPSED",
    "request_id": "req_8fJ2kQ9xLm4TzW7nB3cY5pDv"
  }
}
```


## OpenAPI

````yaml POST /v1/applications/{id}/send
openapi: 3.1.0
info:
  title: Bridgeline Public API
  version: '2026-09-23'
  description: >-
    Premium finance quotes and applications for agencies, and partner quotes for
    distribution partners (the endpoints under /v1/partner/). Authenticate with
    an API key: an agency admin creates agency and broker keys in the Bridgeline
    portal under API Keys; a distribution partner's admin creates partner keys
    in the partner console under Settings, then API keys. Scopes: `quotes:read`
    (Read quotes), `quotes:write` (Create quotes and replace their links),
    `applications:read` (Read applications), `applications:write` (Accept a
    quote into an application), `agreements:write` (Send and void finance
    agreements). `loans:read` and `webhooks:manage` are reserved for endpoints
    that are not built yet and allow nothing today.
servers:
  - url: https://portal.bridgelinepf.com/api
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/applications/{id}/send:
    post:
      tags:
        - Applications
      summary: Send the agreement
      description: >-
        Sends the finance agreement to the insured's signer for an application
        whose price was fixed when its quote was accepted. Bridgeline emails the
        signing request to the insured. An application has one agreement:
        calling again returns the same one. Before anything is sent we check
        that the price is still good and that nothing on the deal needs a person
        first; a 409 says which. If the price is no longer good the application
        is canceled and stays closed. Every policy needs a commission rate: send
        it in policies, or rely on the one given when the quote was accepted.
        Corrections to the phone or the signer are saved only when the agreement
        is sent, and are ignored once one is out, as are commission rates. Live
        keys only, and only for agencies Bridgeline has turned straight-through
        binding on for.
      operationId: sendApplication
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: The application id (app_…).
          description: The application id (app_…).
        - name: Bridgeline-Version
          in: header
          required: false
          description: >-
            API version (a date). Defaults to the version the API key is pinned
            to (set when the key is created); only a released version is
            accepted. Every response echoes the version used.
          schema:
            type: string
            enum:
              - '2026-09-23'
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            Retrying with the same key and body within 24h replays the original
            response.
          schema:
            type: string
            minLength: 1
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                insured_phone:
                  description: >-
                    The insured's phone, when the application has none or it
                    needs correcting. A US number (ten digits, area code first),
                    with an optional extension: "713-555-0142 x204". An
                    agreement can't be sent without one.
                  anyOf:
                    - type: string
                      maxLength: 40
                    - type: 'null'
                signer:
                  description: >-
                    Who signs for the insured, when it needs correcting.
                    Replaces the signer named at accept, and is where the
                    agreement is emailed.
                  anyOf:
                    - type: object
                      properties:
                        first_name:
                          description: >-
                            First name of the person who will sign for the
                            insured. 1 to 100 characters after trimming, in
                            characters the financing agreement can print (Latin
                            letters, accents included).
                          minLength: 1
                          maxLength: 100
                          type: string
                        last_name:
                          description: Their last name. The same rules as first_name.
                          minLength: 1
                          maxLength: 100
                          type: string
                        email:
                          type: string
                          maxLength: 254
                          format: email
                          pattern: >-
                            ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                          description: >-
                            Where the financing agreement is sent for signature.
                            Stored on the application; not returned by the API.
                      required:
                        - first_name
                        - last_name
                        - email
                      additionalProperties: false
                    - type: 'null'
                policies:
                  description: >-
                    Each policy's commission, one entry per policy in the order
                    the quote lists its policies. Use {} for a policy you are
                    not stating a rate for. The number of entries must equal the
                    number of policies.
                  anyOf:
                    - minItems: 1
                      maxItems: 25
                      type: array
                      items:
                        type: object
                        properties:
                          commission_rate:
                            description: >-
                              The agency's commission on this policy, as a
                              fraction of its base premium: 0.125 means 12.5%.
                              From 0 to below 1, with at most 4 decimal places.
                              0 is allowed. null or omitted: nothing is stated
                              for this policy in this call.
                            minimum: 0
                            exclusiveMaximum: 1
                            type:
                              - number
                              - 'null'
                        additionalProperties: false
                    - type: 'null'
              additionalProperties: false
      responses:
        '200':
          description: The application, with its agreement sent.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: app_…
                  object:
                    type: string
                    const: application
                  livemode:
                    type: boolean
                  status:
                    type: string
                    enum:
                      - processing
                      - requires_information
                      - ready_for_agreement
                      - awaiting_signature
                      - pending_activation
                      - active
                      - canceled
                    description: >-
                      processing, requires_information (an item in
                      requirements.blocking holds the agreement back),
                      ready_for_agreement, awaiting_signature (the agreement was
                      sent), pending_activation (the borrower signed; the loan
                      goes live once the down payment settles and the agreement
                      is countersigned), active (final), canceled (final;
                      cancellation says why). New values may be added: treat an
                      unknown one as "in progress". Additional values may be
                      added.
                    x-extensible-enum: true
                  created_via:
                    type: string
                    enum:
                      - api
                      - portal
                      - email
                    description: >-
                      api: accepted from a quote through the API. portal:
                      created in the Bridgeline portal. email: created from an
                      email to an intake address. Additional values may be
                      added.
                    x-extensible-enum: true
                  quote_id:
                    description: >-
                      The application's current quote (qte_…), or null when it
                      has none.
                    type:
                      - string
                      - 'null'
                  accepted_option_id:
                    description: >-
                      The option chosen when the application was created from a
                      quote (opt_…): accepted through POST
                      /v1/quotes/{id}/accept, or picked with "I'm interested" on
                      a partner's quote link. Null otherwise. A record of the
                      choice, not a price lock.
                    type:
                      - string
                      - 'null'
                  pricing:
                    anyOf:
                      - type: object
                        properties:
                          option_id:
                            description: >-
                              opt_<down payment percent>_<term months>; null
                              when the down payment is not a whole percent.
                            type:
                              - string
                              - 'null'
                          down_payment_rate:
                            type: number
                            description: 'A fraction: 0.25 means 25%.'
                          term_months:
                            type: integer
                            minimum: -9007199254740991
                            maximum: 9007199254740991
                          apr:
                            type: number
                            description: 'A fraction: 0.25 means 25%.'
                          down_payment:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: >-
                              US dollars, a decimal string with two decimal
                              places.
                          amount_financed:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: >-
                              US dollars, a decimal string with two decimal
                              places.
                          monthly_payment:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: >-
                              US dollars, a decimal string with two decimal
                              places.
                          finance_charge:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: >-
                              US dollars, a decimal string with two decimal
                              places.
                          total_of_payments:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: >-
                              US dollars, a decimal string with two decimal
                              places.
                          total_cost:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: >-
                              US dollars, a decimal string with two decimal
                              places.
                          selected_by:
                            type: string
                            enum:
                              - broker
                              - system
                            description: >-
                              broker: the broker picked these terms in the
                              portal. system: fixed without a broker choosing
                              it: the option accepted through the API on a
                              straight-through application, or our recommended
                              option, which the broker kept. Additional values
                              may be added.
                            x-extensible-enum: true
                        required:
                          - option_id
                          - down_payment_rate
                          - term_months
                          - apr
                          - down_payment
                          - amount_financed
                          - monthly_payment
                          - finance_charge
                          - total_of_payments
                          - total_cost
                          - selected_by
                      - type: 'null'
                    description: >-
                      The terms the broker has priced in the portal, which the
                      agreement will carry; once the agreement is sent, its own
                      terms. null until the application reaches pricing.
                      total_of_payments is amount_financed + finance_charge, as
                      on the agreement; total_cost is down_payment +
                      total_of_payments.
                  price_guaranteed_until:
                    description: >-
                      The accepted quote's price_guaranteed_until: 7 days after
                      that quote was priced. null when the application was not
                      accepted from a quote through the API.
                    type:
                      - string
                      - 'null'
                  straight_through:
                    anyOf:
                      - type: object
                        properties:
                          route:
                            type: string
                            enum:
                              - straight_through
                              - portal_path
                              - managed_in_portal
                            description: >-
                              straight_through: the price is fixed at the
                              accepted option and the agreement can be sent
                              through the API. portal_path: the broker reviews,
                              prices and sends in the portal. managed_in_portal:
                              the price was fixed, and an agent has since
                              changed it in the portal; the API no longer sends
                              this application. Additional values may be added.
                            x-extensible-enum: true
                          reasons:
                            type: array
                            items:
                              type: object
                              properties:
                                code:
                                  type: string
                                param:
                                  type:
                                    - string
                                    - 'null'
                                description:
                                  type: string
                              required:
                                - code
                                - param
                                - description
                            description: >-
                              Why the deal is on the portal path. Empty on the
                              other routes. New codes may be added.
                        required:
                          - route
                          - reasons
                      - type: 'null'
                    description: >-
                      Whether this application can go to the insured without a
                      portal visit. null for an application that was not
                      accepted with straight-through binding turned on.
                  agreement:
                    anyOf:
                      - type: object
                        properties:
                          sent_at:
                            type:
                              - string
                              - 'null'
                        required:
                          - sent_at
                      - type: 'null'
                    description: >-
                      The finance agreement, once it has been sent (by your
                      broker or through the API). null before that. Bridgeline
                      emails the signing request to the insured; the
                      application's status says where it stands.
                  payout:
                    anyOf:
                      - type: object
                        properties:
                          confirmed_at:
                            description: >-
                              When these figures were recorded for the agreement
                              that was sent. null before an agreement is sent:
                              the figures are then worked out from what is on
                              each policy now.
                            type:
                              - string
                              - 'null'
                          policies:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  description: The policy (pol_…), as in policies.
                                commission_rate:
                                  type: number
                                  description: >-
                                    The agency's commission as a fraction of the
                                    policy's base premium: 0.125 means 12.5%.
                                commission:
                                  type: string
                                  pattern: ^-?\d+\.\d{2}$
                                  description: >-
                                    Base premium times commission_rate, rounded
                                    half up to the cent.
                                agency_fee:
                                  type: string
                                  pattern: ^-?\d+\.\d{2}$
                                  description: >-
                                    The agency's own fee on this policy. 0.00
                                    when the quote stated none.
                              required:
                                - id
                                - commission_rate
                                - commission
                                - agency_fee
                          due_to_agency:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: Every commission plus every agency fee.
                          due_to_billing_company:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: total minus due_to_agency.
                          total:
                            type: string
                            pattern: ^-?\d+\.\d{2}$
                            description: >-
                              The total premium financed: every policy total,
                              taxes, fees and agency fees included.
                        required:
                          - confirmed_at
                          - policies
                          - due_to_agency
                          - due_to_billing_company
                          - total
                      - type: 'null'
                    description: >-
                      The agency's commission and agency fee on each policy, and
                      how the financed premium divides between the agency and
                      the billing company. null until every policy has a
                      commission rate. We record exactly what you state and
                      infer nothing.
                  cancellation:
                    anyOf:
                      - type: object
                        properties:
                          reason:
                            type: string
                            enum:
                              - price_lapsed
                            description: >-
                              price_lapsed: the quote behind the fixed price had
                              expired (it was more than 30 days old) when the
                              agreement was about to be sent. New values may be
                              added. Additional values may be added.
                            x-extensible-enum: true
                          at:
                            type: string
                            description: When the application was canceled.
                        required:
                          - reason
                          - at
                      - type: 'null'
                    description: >-
                      Why and when the application was canceled. null unless
                      status is canceled. A canceled application is closed for
                      good: create a new quote to start again.
                  insured:
                    type: object
                    properties:
                      name:
                        type:
                          - string
                          - 'null'
                      address:
                        type: object
                        properties:
                          line1:
                            type:
                              - string
                              - 'null'
                          city:
                            type:
                              - string
                              - 'null'
                          state:
                            type:
                              - string
                              - 'null'
                          postal_code:
                            type:
                              - string
                              - 'null'
                        required:
                          - line1
                          - city
                          - state
                          - postal_code
                    required:
                      - name
                      - address
                  broker:
                    type: object
                    properties:
                      email:
                        type: string
                    required:
                      - email
                    description: The broker who owns the application.
                  policies:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            pol_… (22 characters on an application; a quote's
                            policy ids are 8).
                        carrier:
                          type: object
                          properties:
                            name:
                              type:
                                - string
                                - 'null'
                            match:
                              type: string
                              enum:
                                - matched
                                - pending
                              description: >-
                                matched once the carrier is linked to our
                                carrier records. Additional values may be added.
                              x-extensible-enum: true
                          required:
                            - name
                            - match
                        total:
                          anyOf:
                            - type: string
                              pattern: ^-?\d+\.\d{2}$
                              description: >-
                                US dollars, a decimal string with two decimal
                                places.
                            - type: 'null'
                          description: >-
                            Premium plus all taxes and fees; null when not known
                            yet.
                        effective_date:
                          anyOf:
                            - type: string
                              description: A calendar date, YYYY-MM-DD.
                            - type: 'null'
                        expiration_date:
                          anyOf:
                            - type: string
                              description: A calendar date, YYYY-MM-DD.
                            - type: 'null'
                        document_type:
                          anyOf:
                            - type: string
                              enum:
                                - quote
                                - binder
                                - policy
                              description: Additional values may be added.
                              x-extensible-enum: true
                            - type: 'null'
                        policy_number:
                          description: >-
                            null when missing, or when only a placeholder such
                            as "TBD" is on file.
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - carrier
                        - total
                        - effective_date
                        - expiration_date
                        - document_type
                        - policy_number
                  requirements:
                    type: object
                    properties:
                      blocking:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: >-
                                Stable, machine-readable code. Branch on this,
                                never on description.
                            param:
                              description: >-
                                Where the fix goes, e.g.
                                policies[pol_…].policy_number, insured.address,
                                signer.borrower or pricing; null when no single
                                field applies.
                              type:
                                - string
                                - 'null'
                            description:
                              type: string
                            due_by:
                              anyOf:
                                - type: string
                                  description: A calendar date, YYYY-MM-DD.
                                - type: 'null'
                              description: >-
                                The date an outstanding policy number or
                                document is owed by: 30 days after the agreement
                                is executed (the carrier notice deadline); null
                                before execution. Always null for blocking
                                items, and for CARRIER_UNMATCHED and
                                INSURED_ADDRESS_INCOMPLETE, which have no
                                deadline of their own.
                          required:
                            - code
                            - param
                            - description
                            - due_by
                        description: >-
                          Must clear before the agreement can be sent.
                          CARRIER_UNMATCHED and INSURED_ADDRESS_INCOMPLETE are
                          listed here early but do not hold the status back yet.
                          Empty once the agreement is sent (except
                          AGREEMENT_DECLINED).
                      outstanding:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              description: >-
                                Stable, machine-readable code. Branch on this,
                                never on description.
                            param:
                              description: >-
                                Where the fix goes, e.g.
                                policies[pol_…].policy_number, insured.address,
                                signer.borrower or pricing; null when no single
                                field applies.
                              type:
                                - string
                                - 'null'
                            description:
                              type: string
                            due_by:
                              anyOf:
                                - type: string
                                  description: A calendar date, YYYY-MM-DD.
                                - type: 'null'
                              description: >-
                                The date an outstanding policy number or
                                document is owed by: 30 days after the agreement
                                is executed (the carrier notice deadline); null
                                before execution. Always null for blocking
                                items, and for CARRIER_UNMATCHED and
                                INSURED_ADDRESS_INCOMPLETE, which have no
                                deadline of their own.
                          required:
                            - code
                            - param
                            - description
                            - due_by
                        description: >-
                          Owed after signing, by due_by. Never blocks the
                          agreement.
                    required:
                      - blocking
                      - outstanding
                    description: >-
                      What's left on the deal. New codes may be added: show
                      description for a code you don't know.
                  portal_url:
                    type: string
                    description: >-
                      Where the broker works on this application in the
                      Bridgeline portal (requires a portal login).
                  client_reference_id:
                    type:
                      - string
                      - 'null'
                  metadata:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: string
                  created_at:
                    type: string
                required:
                  - id
                  - object
                  - livemode
                  - status
                  - created_via
                  - quote_id
                  - accepted_option_id
                  - pricing
                  - price_guaranteed_until
                  - straight_through
                  - agreement
                  - payout
                  - cancellation
                  - insured
                  - broker
                  - policies
                  - requirements
                  - portal_url
                  - client_reference_id
                  - metadata
                  - created_at
                description: >-
                  A deal in progress toward a signed premium finance agreement
                  and loan.
        '400':
          description: Malformed request (bad JSON, version or header).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid, revoked or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            API access not enabled for this agency (API_ACCESS_NOT_ENABLED for a
            live key, TEST_MODE_NOT_ENABLED for a test key), an API key whose
            type cannot call this endpoint (KEY_TYPE_NOT_ALLOWED), missing
            scope, or the acting broker is not active.
            STRAIGHT_THROUGH_NOT_ENABLED: sending agreements through the API
            (which also needs accepting quotes) is not turned on for this
            agency, or the key is a test key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found (also returned for other agencies' ids).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Idempotency-Key reused with a different request, or still in flight.
            APPLICATION_NOT_SENDABLE: something is needed before the agreement
            can be sent (details lists every reason). APPLICATION_PRICE_LAPSED:
            the price fixed at accept is no longer good (see details); nothing
            was sent. When the detail is EXPIRED the application is now
            canceled. APPLICATION_CANCELED: the application was canceled earlier
            and is closed (its cancellation field says why).
            APPLICATION_MANAGED_IN_PORTAL: an agent changed the price in the
            portal; the agreement is sent, and withdrawn, from there.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited. See Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal error. Safe to retry with the same Idempotency-Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            Temporarily unable to serve the request (e.g. pricing inputs
            unavailable). Retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - doc_url
            - request_id
          properties:
            type:
              type: string
              enum:
                - invalid_request
                - authentication
                - permission
                - not_found
                - conflict
                - rate_limit
                - api_error
              description: The broad category of the error. Additional values may be added.
              x-extensible-enum: true
            code:
              type: string
              description: >-
                Stable, machine-readable error code. Branch on this, never on
                `message`.
              examples:
                - INVALID_REQUEST
                - INVALID_JSON
                - INVALID_API_VERSION
                - INVALID_PAGINATION
                - IDEMPOTENCY_KEY_REQUIRED
                - IDEMPOTENCY_KEY_INVALID
                - VALIDATION_FAILED
                - INVALID_API_KEY
                - KEY_REVOKED
                - KEY_EXPIRED
                - MISSING_SCOPE
                - BROKER_NOT_ACTIVE
                - DEFAULT_BROKER_INACTIVE
                - ACTING_BROKER_NOT_ALLOWED
                - API_ACCESS_NOT_ENABLED
                - TEST_MODE_NOT_ENABLED
                - TEST_MODE_ONLY
                - KEY_TYPE_NOT_ALLOWED
                - APPLICATIONS_NOT_ENABLED
                - STRAIGHT_THROUGH_NOT_ENABLED
                - NOT_FOUND
                - METHOD_NOT_ALLOWED
                - IDEMPOTENCY_KEY_REUSED
                - IDEMPOTENCY_REQUEST_IN_PROGRESS
                - QUOTE_EXPIRED
                - QUOTE_ALREADY_INTERESTED
                - QUOTE_ALREADY_ACCEPTED
                - QUOTE_NOT_ACCEPTABLE
                - QUOTE_PRICE_CHANGED
                - APPLICATION_NOT_SENDABLE
                - APPLICATION_PRICE_LAPSED
                - APPLICATION_CANCELED
                - AGREEMENT_ALREADY_SIGNED
                - AGREEMENT_NOT_VOIDABLE
                - APPLICATION_MANAGED_IN_PORTAL
                - RATE_LIMITED
                - INTERNAL
                - IDEMPOTENCY_RECORD_LOST
                - SERVICE_UNAVAILABLE
            message:
              type: string
            param:
              type: string
            details:
              type: array
              items:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  param:
                    type: string
            application_id:
              type: string
              description: >-
                Only on QUOTE_ALREADY_ACCEPTED: the id (app_…) of the
                application the quote became. It may have been created by a
                different call than yours.
            doc_url:
              type: string
              format: uri
            request_id:
              type: string
              pattern: ^req_
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: bl_live_… or bl_test_… API key.

````

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