Biogen Keys API

API key management and usage

OpenAPI Specification

biogen-keys-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Biogen Developer Keys API
  description: The Biogen Developer API provides programmatic access to Biogen services including the CCS-CRX API following REST standard specifications. The portal offers interactive I/O docs for testing, access key management, usage reporting, and documentation covering supported methods, HTTP headers, request/response formats, and response codes.
  version: v1
  contact:
    name: Biogen Developer Portal
    url: https://developer.biogen.com/
  license:
    name: Proprietary
    url: https://www.biogen.com/
  x-generated-from: documentation
servers:
- url: https://developer.biogen.com
  description: Biogen Developer API
tags:
- name: Keys
  description: API key management and usage
paths:
  /api/keys:
    get:
      operationId: listApiKeys
      summary: Biogen List API Keys
      description: Retrieves API keys associated with the authenticated developer account including usage statistics.
      tags:
      - Keys
      security:
      - apiKeyAuth: []
      responses:
        '200':
          description: List of API keys.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeysResponse'
              examples:
                ListApiKeys200Example:
                  summary: Default listApiKeys 200 response
                  x-microcks-default: true
                  value:
                    keys:
                    - id: key-abc123
                      name: Production Key
                      key: bde7f3...
                      status: active
                      created_at: '2024-01-01T00:00:00Z'
                      usage:
                        requests_today: 150
                        requests_month: 4200
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createApiKey
      summary: Biogen Create API Key
      description: Creates a new API key for the authenticated developer account.
      tags:
      - Keys
      security:
      - apiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyRequest'
            examples:
              CreateApiKey201Example:
                summary: Default createApiKey request example
                x-microcks-default: true
                value:
                  name: Production Key
                  description: Key for production CCS-CRX integration
      responses:
        '201':
          description: API key created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
              examples:
                CreateApiKey201Example:
                  summary: Default createApiKey 201 response
                  x-microcks-default: true
                  value:
                    id: key-abc123
                    name: Production Key
                    key: bde7f3...
                    status: active
                    created_at: '2024-04-13T00:00:00Z'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    CreateApiKeyRequest:
      title: Create API Key Request
      description: Request body for creating a new API key.
      type: object
      required:
      - name
      properties:
        name:
          type: string
          description: Display name for the key.
          example: Production Key
        description:
          type: string
          description: Optional key description.
          example: Key for production CCS-CRX integration
    ApiKey:
      title: API Key
      description: A developer API key for accessing Biogen services.
      type: object
      properties:
        id:
          type: string
          description: Key ID.
          example: key-abc123
        name:
          type: string
          description: Key display name.
          example: Production Key
        key:
          type: string
          description: The API key value (shown once at creation).
          example: bde7f3...
        status:
          type: string
          description: Key status.
          enum:
          - active
          - inactive
          - revoked
          example: active
        created_at:
          type: string
          format: date-time
          description: Key creation timestamp.
          example: '2024-01-01T00:00:00Z'
        usage:
          $ref: '#/components/schemas/ApiKeyUsage'
    ApiKeyUsage:
      title: API Key Usage
      description: Usage statistics for an API key.
      type: object
      properties:
        requests_today:
          type: integer
          description: Number of requests made today.
          example: 150
        requests_month:
          type: integer
          description: Number of requests made this month.
          example: 4200
    ErrorResponse:
      title: Error Response
      description: Standard error response.
      type: object
      properties:
        error:
          type: string
          description: Error message.
          example: unauthorized
        code:
          type: integer
          description: HTTP status code.
          example: 401
    ApiKeysResponse:
      title: API Keys Response
      description: List of API keys for the developer account.
      type: object
      properties:
        keys:
          type: array
          description: Array of API keys.
          items:
            $ref: '#/components/schemas/ApiKey'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Biogen Developer API key passed in X-API-Key header