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

# Introspect the calling partner API key

> Returns the partner the key acts as, its scopes and its mode. A partner key acts as the partner organisation: there is no agency and no broker behind it. Requires no scope; use it to verify a key.

For partner API keys. Use it to confirm a new key works, and to see which partner account it belongs to, its scopes and its mode. A partner key acts as your partner account itself: there is no agency and no broker behind it. See [partner quotes](https://docs.bridgelinepf.com/guides/partner-quotes.md).

An agency key gets [`403 KEY_TYPE_NOT_ALLOWED`](https://docs.bridgelinepf.com/errors/KEY_TYPE_NOT_ALLOWED) here; agencies use [`GET /v1/whoami`](https://docs.bridgelinepf.com/api-reference/whoami).

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

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

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

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

```json 200 theme={null}
{
  "object": "partner_whoami",
  "livemode": true,
  "partner": {"name": "Gulf Coast Wholesale Brokers"},
  "api_key": {
    "type": "partner",
    "scopes": ["quotes:read", "quotes:write"]
  },
  "api_version": "2026-09-23"
}
```

```json 403 theme={null}
{
  "error": {
    "type": "permission",
    "code": "KEY_TYPE_NOT_ALLOWED",
    "message": "This endpoint takes a partner API key.",
    "doc_url": "https://docs.bridgelinepf.com/errors#KEY_TYPE_NOT_ALLOWED",
    "request_id": "req_8fJ2kQ9xLm4TzW7nB3cY5pDv"
  }
}
```


## OpenAPI

````yaml GET /v1/partner/whoami
openapi: 3.1.0
info:
  title: Bridgeline Public API
  version: '2026-09-23'
  description: >-
    Premium finance quotes and applications for agencies. Authenticate with an
    API key from Agency Portal → API Keys. Scopes: `quotes:read` (Read quotes),
    `quotes:write` (Create quotes), `applications:read` (Read applications),
    `applications:write` (Create and edit applications and policies),
    `agreements:write` (Send and void agreements, attest down payments),
    `loans:read` (Read agreements, loans and payouts), `webhooks:manage` (Manage
    webhook endpoints).
servers:
  - url: https://portal.bridgelinepf.com/api
    description: Production (base URL not final, see D2)
security:
  - bearerAuth: []
paths:
  /v1/partner/whoami:
    get:
      tags:
        - Partners
      summary: Introspect the calling partner API key
      description: >-
        Returns the partner the key acts as, its scopes and its mode. A partner
        key acts as the partner organisation: there is no agency and no broker
        behind it. Requires no scope; use it to verify a key.
      operationId: getPartnerWhoami
      parameters:
        - name: Bridgeline-Version
          in: header
          required: false
          description: >-
            API version (a date). Defaults to 2026-09-23; echoed on every
            response.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
      responses:
        '200':
          description: The principal summary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    const: partner_whoami
                  livemode:
                    type: boolean
                    description: false for bl_test_ keys.
                  partner:
                    type: object
                    properties:
                      name:
                        type: string
                    required:
                      - name
                  api_key:
                    type: object
                    properties:
                      type:
                        type: string
                        const: partner
                      scopes:
                        type: array
                        items:
                          type: string
                    required:
                      - type
                      - scopes
                  api_version:
                    type: string
                    description: The resolved Bridgeline-Version for this request.
                required:
                  - object
                  - livemode
                  - partner
                  - api_key
                  - api_version
                description: Who the calling partner API key acts as.
        '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 partner (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) or a missing
            scope.
          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'
      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
            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
                - NOT_FOUND
                - METHOD_NOT_ALLOWED
                - IDEMPOTENCY_KEY_REUSED
                - IDEMPOTENCY_REQUEST_IN_PROGRESS
                - QUOTE_EXPIRED
                - QUOTE_ALREADY_INTERESTED
                - 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
            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.