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

# Describe the calling API key

> Any valid API key; no scope needed.

The calling key, what it can do here, and the limits on it. Any valid key.



## OpenAPI

````yaml /openapi.json get /v1/partner/me
openapi: 3.1.0
info:
  title: Sahl Partner API
  version: 0.2.0
  description: >-
    Server-to-server API for lenders and banks: document reading, verification,
    risk assessment, eID checks, Moroccan company (KYB) onboarding, bank
    statements, document requests, webhooks, registry checks, cases, scoring,
    KYC policy, webhook deliveries and bank connections. Authenticate with
    `Authorization: Bearer <API key>`. Paths are relative to the server URL. New
    workspaces start in sandbox.
servers:
  - url: https://app.sahlfinancial.com/api
    description: Single API host. Send environment=sandbox (the default) for test data.
security:
  - bearerAuth: []
tags:
  - name: KYC
    description: Read documents, verify a profile, assess risk, start an eID check.
  - name: Bank connections (Growth)
    description: >-
      Growth plan, switched on per workspace by Sahl. Sandbox simulation today;
      production answers 409 until a bank data provider is live.
  - name: KYB
    description: >-
      Moroccan company file: read the Modèle J, the IF attestation and the
      manager's CIN, check an ICE. Every plan.
  - name: Statements
    description: Read a bank statement line by line and reconcile it. Every plan.
  - name: Webhooks
    description: >-
      Manage webhook endpoints with an API key (scope `webhooks:manage`). Every
      plan.
  - name: Document requests
    description: >-
      Ask an applicant for documents through a link or an embedded page, and
      follow the request.
  - name: Sandbox
    description: 'The specimen gallery: the only documents a new workspace''s Sandbox reads.'
  - name: Registry
    description: >-
      Check a SIREN, a VAT number, a LEI, an IBAN, a Moroccan RIB or ICE. Scope
      `registry:read`.
  - name: Cases
    description: >-
      Read the cases your calls filed, their documents and the fields read.
      Scope `cases:read`.
  - name: Scoring
    description: >-
      Read, re-run or simulate a case's credit score. Scopes `scoring:read`,
      `scoring:write`.
  - name: Policy
    description: >-
      Read and save the KYC policy your `/v1/kyc/*` calls run under. Scopes
      `policy:read`, `policy:write`.
  - name: Webhook deliveries
    description: >-
      See what was sent to your endpoints and send a delivery again. Scope
      `webhooks:manage`.
  - name: Account
    description: The calling key, its usage, its recent calls and the error catalogue.
paths:
  /v1/partner/me:
    get:
      tags:
        - Account
      summary: Describe the calling API key
      description: >-
        Any valid API key; no scope needed.


        The calling key, what it can do here, and the limits on it. Any valid
        key.
      operationId: account_me
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeOut'
        '401':
          description: Missing, invalid, revoked or expired API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail: Invalid or revoked API key
        '429':
          description: >-
            `rate_limit_exceeded`: Too many calls a minute: per API key on the
            partner routes, or per key / per address at the edge. Wait for
            Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail:
                  code: rate_limit_exceeded
                  message: >-
                    Too many calls a minute: per API key on the partner routes,
                    or per key / per address at the edge. Wait for Retry-After.
        '500':
          description: '`internal_error`: Unexpected error. Quote X-Request-ID to support.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail:
                  code: internal_error
                  message: Unexpected error. Quote X-Request-ID to support.
      security:
        - bearerAuth: []
components:
  schemas:
    MeOut:
      properties:
        key:
          $ref: '#/components/schemas/KeyInfo'
          description: The calling key.
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
          description: The workspace the key belongs to.
        plan:
          type: string
          title: Plan
          description: The workspace's plan (free, starter, growth, enterprise).
        subscription_status:
          type: string
          title: Subscription Status
          description: The subscription's status.
        scopes:
          items:
            $ref: '#/components/schemas/ScopeInfo'
          type: array
          title: Scopes
          description: Every scope the key holds.
        environments:
          items:
            $ref: '#/components/schemas/EnvironmentInfo'
          type: array
          title: Environments
          description: Sandbox and Production.
        go_live:
          $ref: '#/components/schemas/GoLiveInfo'
          description: The Production go-live state.
        rate_limits:
          $ref: '#/components/schemas/RateLimits'
          description: The limits that apply to this key.
      type: object
      required:
        - key
        - tenant_id
        - plan
        - subscription_status
        - scopes
        - environments
        - go_live
        - rate_limits
      title: MeOut
    Error:
      type: object
      title: Error
      description: >-
        FastAPI error body. `detail` is a string, a list (validation 422), or an
        object with `code` and `message` (extra keys possible).
      properties:
        detail:
          oneOf:
            - type: string
            - type: array
              items:
                additionalProperties: true
                type: object
              description: Validation errors (422).
            - type: object
              additionalProperties: true
              properties:
                code:
                  type: string
                message:
                  type: string
      required:
        - detail
    KeyInfo:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The API key's id (as in the call log).
        name:
          type: string
          title: Name
          description: The name given to the key in Settings > API.
        prefix:
          type: string
          title: Prefix
          description: The key's public prefix (sk_...); never the secret.
        status:
          type: string
          enum:
            - active
            - expiring
          title: Status
          description: '''expiring'' when the key was rotated and works until expires_at.'
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the key was issued.
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
          description: Last authenticated call.
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
          description: End of the rotation grace period; null = never expires.
        identity_bound:
          type: boolean
          title: Identity Bound
          description: >-
            Calls must also send X-Partner-Identity for the bound service
            account.
      type: object
      required:
        - id
        - name
        - prefix
        - status
        - created_at
        - identity_bound
      title: KeyInfo
    ScopeInfo:
      properties:
        scope:
          type: string
          title: Scope
          description: A scope the key holds.
        usable:
          type: boolean
          title: Usable
          description: Whether a call with this key can use it now.
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: >-
            Why not: kyc_scope_not_allowed / bank_scope_not_allowed (workspace
            not enabled), not_served (no route for it on this API),
            unknown_scope.
      type: object
      required:
        - scope
        - usable
      title: ScopeInfo
    EnvironmentInfo:
      properties:
        name:
          type: string
          enum:
            - sandbox
            - production
          title: Name
          description: The environment.
        available:
          type: boolean
          title: Available
          description: Whether calls in it are accepted now.
        blocked_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Blocked By
          description: The error code a call would get (see GET /v1/partner/errors).
        specimen_only:
          type: boolean
          title: Specimen Only
          description: Sandbox reads specimen documents only for this workspace.
          default: false
      type: object
      required:
        - name
        - available
      title: EnvironmentInfo
    GoLiveInfo:
      properties:
        gate_enabled:
          type: boolean
          title: Gate Enabled
          description: Production needs Sahl's approval.
        approved:
          type: boolean
          title: Approved
          description: The workspace is approved for Production.
        approved_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Approved At
          description: When it was approved (ISO 8601).
        request_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Status
          description: 'The workspace''s go-live request: pending, approved, or null.'
        requested_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Requested At
          description: When it was requested (ISO 8601).
      type: object
      required:
        - gate_enabled
        - approved
      title: GoLiveInfo
    RateLimits:
      properties:
        partner_per_key_per_minute:
          anyOf:
            - type: integer
            - type: 'null'
          title: Partner Per Key Per Minute
          description: Calls a minute per API key on the partner routes; null = off.
        edge_per_key_per_minute:
          type: integer
          title: Edge Per Key Per Minute
          description: Calls a minute per API key at the edge, on every route.
        edge_per_ip_per_minute:
          type: integer
          title: Edge Per Ip Per Minute
          description: Calls a minute per source address carrying API keys, at the edge.
        window_seconds:
          type: integer
          title: Window Seconds
          description: Length of a rate-limit window.
      type: object
      required:
        - partner_per_key_per_minute
        - edge_per_key_per_minute
        - edge_per_ip_per_minute
        - window_seconds
      title: RateLimits
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key created in the console. Scopes: kyc:extract, kyc:verify,
        kyc:eid; kyb:onboard, kyb:ice; statements:read; webhooks:manage;
        requests:read, requests:write; bank:read, bank:write (Growth plan,
        enabled per workspace by Sahl); registry:read; cases:read; scoring:read,
        scoring:write; policy:read, policy:write; usage:read. The Sandbox
        specimen routes, `GET /v1/partner/me` and `GET /v1/partner/errors` need
        any valid key.

````

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