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

# Issue scoped API key

> Issue a scoped bearer API key for an authenticated user or organization.



## OpenAPI

````yaml https://api.foreverbetter.xyz/openapi.json post /api-keys
openapi: 3.1.0
info:
  title: ForeverBetter API
  version: 0.4.8
  description: >-
    ForeverBetter API and MCP-compatible service for genetics, biomarkers,
    wearables, lab locator handoffs, and dashboard specs.
servers:
  - url: https://api.foreverbetter.xyz
security:
  - bearerAuth: []
paths:
  /api-keys:
    post:
      summary: Issue scoped API key
      description: Issue a scoped bearer API key for an authenticated user or organization.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                name:
                  type: string
                  description: Display name for the key.
                user_id:
                  type: string
                  minLength: 1
                organization_id:
                  type: string
                  minLength: 1
                tier:
                  type: string
                  enum:
                    - free
                    - builder
                    - growth
                    - enterprise
                  default: free
                  description: >-
                    free is self-serve for personal use. Paid tiers require an
                    admin token.
                intended_use:
                  type: string
                  enum:
                    - personal_agent
                    - app_platform_service
                  default: personal_agent
                  description: >-
                    personal_agent keys act for one person. Products serving
                    other users need app_platform_service on the builder tier or
                    higher.
                scopes:
                  type: array
                  description: Defaults to the standard personal grant set when omitted.
                  items:
                    type: string
                    enum:
                      - health:data:read
                      - health:data:write
                      - health:connections:write
                      - health:labs:read
                      - health:admin
                enabled_endpoints:
                  type: array
                  description: >-
                    Defaults to the standard personal endpoint grants when
                    omitted.
                  items:
                    type: string
                expires_in_days:
                  type: number
                  minimum: 1
                  maximum: 730
                  default: 365
      responses:
        '201':
          description: Created
        '400':
          description: Invalid request or source modality
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Source not found
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````