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

# Download the platform's scope file

> Platform operator downloads this once after registering scopes and
drops it into their project root. The FastAPI middleware reads it at
startup to build the route → required-scope map.

Returned as `text/yaml`; structure documented in the
`MudraidScopesYaml` component.




## OpenAPI

````yaml /openapi.yaml get /api/v1/platforms/{platform_id}/scopes.yaml
openapi: 3.0.3
info:
  title: MudraID Public Contracts (v1)
  version: 1.0.0
  description: |
    This document defines the **stable public contracts** between MudraID and
    the Python Agent SDK + FastAPI Platform Middleware. Per-service
    administrative and internal endpoints are intentionally omitted here —
    they are documented by each FastAPI service's auto-generated
    `/openapi.json` at runtime and may evolve more freely.

    What lives in *this* file (and may not change without a v1 deprecation
    window):

      - `POST /api/v1/auth/token` — agent → JWT exchange
      - `POST /api/v1/auth/agents/me/platforms` — SDK bootstrap
      - `GET /.well-known/jwks.json` — JWKS for platform middleware
      - `GET /api/v1/platforms/{platform_id}/scopes.yaml` — scope file for middleware
      - JWT claim shape
      - mudraid_scopes.yaml schema
servers:
  - url: https://api.mudraid.ai
    description: Production
security: []
tags:
  - name: agent-sdk
    description: |
      Endpoints called by the Python Agent SDK. These contracts are stable
      v1 — any breaking change requires a deprecation cycle.
  - name: platform-middleware
    description: |
      Endpoints called by the FastAPI Platform Middleware. Stable v1.
paths:
  /api/v1/platforms/{platform_id}/scopes.yaml:
    get:
      tags:
        - platform-middleware
      summary: Download the platform's scope file
      description: |
        Platform operator downloads this once after registering scopes and
        drops it into their project root. The FastAPI middleware reads it at
        startup to build the route → required-scope map.

        Returned as `text/yaml`; structure documented in the
        `MudraidScopesYaml` component.
      parameters:
        - in: path
          name: platform_id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: scopes.yaml body
          content:
            text/yaml:
              schema:
                type: string
                description: YAML body conforming to MudraidScopesYaml
        '404':
          description: Platform not found

````