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

# Request Vault Access

> Agent requests access to a vault item by name. Sends a push notification to the user for biometric approval. Poll GET /v1/vault/access/{id} for the status + decrypted payload.



## OpenAPI

````yaml post /v1/vault/access
openapi: 3.1.0
info:
  title: BKey API
  description: Biometric approval infrastructure for AI agents — OAuth 2.1 + CIBA
  version: 1.0.0
  contact:
    name: BKey
    url: https://bkey.id
    email: dev@bkey.id
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.bkey.id
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
    description: OAuth 2.1 token, device auth, CIBA, revocation
  - name: Checkout
    description: Agent-initiated checkout with biometric approval
  - name: Vault
    description: Encrypted secret storage with biometric access
  - name: Payments
    description: Payment methods and shared payment tokens
  - name: Identity
    description: DID and identity management
paths:
  /v1/vault/access:
    post:
      tags:
        - Vault
      summary: Request Vault Access
      description: >-
        Agent requests access to a vault item by name. Sends a push notification
        to the user for biometric approval. Poll GET /v1/vault/access/{id} for
        the status + decrypted payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                itemName:
                  type: string
                  minLength: 1
                  maxLength: 128
                fieldPath:
                  type: string
                  minLength: 1
                  maxLength: 64
                purpose:
                  type: string
                  minLength: 1
                  maxLength: 512
                ephemeralPublicKey:
                  type: string
                  minLength: 1
                  maxLength: 256
                expiresInSecs:
                  type: integer
                  minimum: 30
                  maximum: 600
                  default: 120
              required:
                - itemName
                - fieldPath
                - purpose
                - ephemeralPublicKey
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Access request ID — use this to poll status
                  status:
                    type: string
                    description: Initial status — typically "pending"
                  challengeHex:
                    type: string
                    description: Challenge the mobile device signs on approval
                  ephemeralPublicKey:
                    type: string
                  expiresAt:
                    type: string
                    format: date-time
                  createdAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - status
                  - challengeHex
                  - ephemeralPublicKey
                  - expiresAt
                  - createdAt
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code
                      message:
                        type: string
                        description: Human-readable error message
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code
                      message:
                        type: string
                        description: Human-readable error message
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code
                      message:
                        type: string
                        description: Human-readable error message
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - error
                additionalProperties: false
        '404':
          description: Vault item not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code
                      message:
                        type: string
                        description: Human-readable error message
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - success
                  - error
                additionalProperties: false
                description: Vault item not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: EdDSA-signed JWT obtained via OAuth 2.1 client_credentials or CIBA

````