{
  "openapi": "3.1.0",
  "info": {
    "title": "AppPortal Downloads browser API",
    "version": "1.0.0",
    "description": "Exact same-origin browser route and method contract. Internal service endpoints, Client API ingestion, provider callbacks outside this surface, and arbitrary proxy paths are intentionally excluded."
  },
  "servers": [
    {
      "url": "/",
      "description": "The frontend and its owning BFF share one origin."
    }
  ],
  "tags": [
    {
      "name": "download"
    },
    {
      "name": "identity"
    },
    {
      "name": "session"
    }
  ],
  "paths": {
    "/api/identity/auth/organizations/claim-presentation": {
      "post": {
        "operationId": "downloadPostApiIdentityAuthOrganizationsClaimPresentation",
        "summary": "Present organization claim documents",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": [],
            "csrfToken": []
          }
        ],
        "x-appportal-authentication": "browser-session-and-csrf",
        "x-appportal-csrf": true,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationClaimPresentation"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "private, no-store"
              }
            }
          },
          "400": {
            "description": "Invalid JSON or domain request; binding can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "A valid Downloads session is required; authentication may be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Current account/membership/channel authority is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "415": {
            "description": "Existing JSON binder/media-type rejection before execution.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Presents documents bound to the proposed name/slug without creating an organization, accepting Terms or granting authority. Unknown request members are rejected by the owning DTO. No Idempotency-Key is required for this presentation. Existing claim/admission failures remain problem details. Cross-site unsafe requests are rejected. If an existing Downloads session cookie resolves, its matching readable CSRF cookie/header is required even on an otherwise anonymous operation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganizationClaimPresentationRequest"
              }
            }
          }
        },
        "x-appportal-current-authority": "Current signed-in account; admission/brand/claim authority remains server-owned",
        "parameters": []
      }
    },
    "/api/identity/auth/organizations/claims": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthOrganizationsClaims",
        "summary": "Read this account's organization claim outcomes",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Own claim outcomes, not current membership grants.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationClaimStatus"
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "private, no-store"
              }
            }
          },
          "400": {
            "description": "Existing route-specific domain failure; inspect its machine code.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "organization_claim_idempotency_invalid"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "A valid Downloads session is required; authentication may be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Current account/membership/channel authority is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Reconcile the original claim using own-account history. Pending/replayed outcomes do not prove current account authority. The BFF preserves the original key rather than joining repeated values or inventing a new command identity.",
        "x-appportal-current-authority": "Current signed-in account; read-only own claim evidence",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional owning-service slug filter.",
            "required": false
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string",
              "x-appportal-trimmed-max-length": 200
            },
            "description": "Optional single bounded original claim key. Repeated values are rejected before forwarding; this GET does not create a command.",
            "required": false
          }
        ]
      }
    },
    "/api/session": {
      "get": {
        "operationId": "downloadGetApiSession",
        "summary": "Read the current Downloads session summary",
        "tags": [
          "session"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsSessionSummary"
                }
              }
            }
          },
          "401": {
            "description": "A valid Downloads session is required; authentication may be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Current account/membership/channel authority is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Returns 401 when no valid session exists. The actual bootstrap leaves sessionVersion null; it never returns access/refresh tokens. Unlike Dashboard, Downloads does not require a session-version header.",
        "x-appportal-current-authority": "Downloads HttpOnly session cookie",
        "parameters": []
      }
    },
    "/api/identity/auth/switch-org": {
      "post": {
        "operationId": "downloadPostApiIdentityAuthSwitchOrg",
        "summary": "Select an accessible organization for this browser session",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": [],
            "csrfToken": []
          }
        ],
        "x-appportal-authentication": "browser-session-and-csrf",
        "x-appportal-csrf": true,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsSessionSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or domain request; binding can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "A valid Downloads session is required; authentication may be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Existing route-specific domain failure; inspect its machine code.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "organization_membership_required",
              "organization_access_removed",
              "waitlisted",
              "portal_access_blocked",
              "csrf_token_required",
              "cross_site_mutation_denied"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "409": {
            "description": "Existing route-specific domain failure; inspect its machine code.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "session-changed"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "415": {
            "description": "Existing JSON binder/media-type rejection before execution.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "502": {
            "description": "identity_session_response_invalid: successful scope response was malformed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "The server resolves membership and rotates the opaque session with current scoped tokens. A losing concurrent rotation returns session-changed without replacing the winner's cookies. Downloads has no required X-AppPortal-Session-Version header. An account selector does not grant membership or channel access. Cross-site unsafe requests are rejected. If an existing Downloads session cookie resolves, its matching readable CSRF cookie/header is required even on an otherwise anonymous operation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchOrgRequest"
              }
            }
          }
        },
        "x-appportal-current-authority": "Current signed-in active membership; waitlist and explicit denials still apply",
        "parameters": []
      }
    },
    "/api/identity/auth/login": {
      "post": {
        "operationId": "downloadPostApiIdentityAuthLogin",
        "summary": "Sign in using the Downloads browser session",
        "tags": [
          "identity"
        ],
        "security": [],
        "x-appportal-authentication": "anonymous",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsSessionSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or domain request; binding can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "Existing route-specific domain failure; inspect its machine code.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "credentials_invalid"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Cross-site browser mutation, or an existing cookie without its matching CSRF nonce, is rejected before execution.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "415": {
            "description": "Existing JSON binder/media-type rejection before execution.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "502": {
            "description": "identity_sign_in_response_invalid: successful upstream Identity token response was malformed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Credentials are exchanged server-side. Only the closed session summary reaches the browser; HttpOnly session and readable CSRF cookies are issued. An existing cookie requires a matching CSRF nonce. A malformed successful Identity token response is 502, not arbitrary upstream success JSON. Cross-site unsafe requests are rejected. If an existing Downloads session cookie resolves, its matching readable CSRF cookie/header is required even on an otherwise anonymous operation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        },
        "x-appportal-current-authority": "Local credentials; same-origin browser boundary",
        "parameters": [
          {
            "name": "X-AppPortal-CSRF",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required when an existing Downloads session cookie resolves; must match its readable CSRF cookie. Anonymous requests without a session do not require a nonce. Cross-site unsafe requests remain denied."
          }
        ]
      }
    },
    "/api/identity/auth/register": {
      "post": {
        "operationId": "downloadPostApiIdentityAuthRegister",
        "summary": "Create a local account",
        "tags": [
          "identity"
        ],
        "security": [],
        "x-appportal-authentication": "anonymous",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsSessionSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or domain request; binding can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "email_invalid",
              "password_invalid"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Cross-site browser mutation, or an existing cookie without its matching CSRF nonce, is rejected before execution.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "409": {
            "description": "Existing route-specific domain failure; inspect its machine code.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "account_exists"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "415": {
            "description": "Existing JSON binder/media-type rejection before execution.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "502": {
            "description": "identity_sign_in_response_invalid: successful upstream Identity token response was malformed.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Creates a global user with zero memberships and an organization-less opaque session. No account/workspace, channel, offering or download entitlement is inferred from signup. LocalSignup agreement is required. Explicit current Terms acceptance. Read the returned immutable version. The server-issued presentation is bound to its signup surface and expires after ten minutes. Preserve presentationToken, supply a nonempty actionId, and set accepted to true only after the user agrees. Missing or invalid proof returns 400, stale or reused proof returns 409, and unavailable signing authority returns 503. Cross-site unsafe requests are rejected. If an existing Downloads session cookie resolves, its matching readable CSRF cookie/header is required even on an otherwise anonymous operation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          }
        },
        "x-appportal-current-authority": "Valid local credentials",
        "parameters": [
          {
            "name": "X-AppPortal-CSRF",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required when an existing Downloads session cookie resolves; must match its readable CSRF cookie. Anonymous requests without a session do not require a nonce. Cross-site unsafe requests remain denied."
          }
        ]
      }
    },
    "/api/identity/auth/logout": {
      "post": {
        "operationId": "downloadPostApiIdentityAuthLogout",
        "summary": "Sign out of the Downloads browser session",
        "tags": [
          "identity"
        ],
        "security": [],
        "x-appportal-authentication": "anonymous",
        "x-appportal-csrf": false,
        "responses": {
          "204": {
            "description": "Signed out; no response body."
          },
          "403": {
            "description": "Cross-site browser mutation, or an existing cookie without its matching CSRF nonce, is rejected before execution.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "No browser request body. The server revokes the retained session/refresh authority and deletes its cookies. A delayed loser does not replace or delete a winning rotated session's cookies. A missing session still completes with 204; raw refresh tokens are not accepted as a browser contract. Cross-site unsafe requests are rejected. If an existing Downloads session cookie resolves, its matching readable CSRF cookie/header is required even on an otherwise anonymous operation.",
        "x-appportal-current-authority": "Current cookie when available; matching CSRF for an existing session",
        "parameters": [
          {
            "name": "X-AppPortal-CSRF",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required when an existing Downloads session cookie resolves; must match its readable CSRF cookie. Anonymous requests without a session do not require a nonce. Cross-site unsafe requests remain denied."
          }
        ]
      }
    },
    "/api/identity/auth/external/{provider}/start": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthExternalProviderStart",
        "summary": "Begin provider sign-in",
        "tags": [
          "identity"
        ],
        "security": [],
        "x-appportal-authentication": "anonymous",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsAuthorizeUrl"
                }
              }
            }
          },
          "400": {
            "description": "Existing route-specific domain failure; inspect its machine code.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "authentication_request_invalid"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "404": {
            "description": "Unsupported provider."
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Returns JSON authorizeUrl, not a redirect. Microsoft, Google and GitHub are the supported provider names. The BFF chooses its own fixed completion URL and stores an HttpOnly flow cookie; browser-supplied return destinations are not forwarded. Invalid provider is 404 and unavailable/unconfigured provider is an existing error.",
        "x-appportal-current-authority": "Provider configuration and cookie-bound single-use social flow",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string",
              "x-appportal-canonical-values": [
                "microsoft",
                "google",
                "github"
              ]
            },
            "description": "Supported login provider; names are normalized to lower case before validation.",
            "required": true
          }
        ]
      }
    },
    "/api/identity/auth/social/complete": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthSocialComplete",
        "summary": "Complete the cookie-bound social login flow",
        "tags": [
          "identity"
        ],
        "security": [],
        "x-appportal-authentication": "anonymous",
        "x-appportal-csrf": false,
        "responses": {
          "302": {
            "description": "Continues to /signup/terms for a first-time account, / after session creation, or the sign-in error page.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                },
                "description": "Same-origin continuation."
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Completes existing sign-in or redirects a verified new account to /signup/terms. The BFF checks the matching provider flow cookie.",
        "x-appportal-current-authority": "Matching server-issued social flow cookie and one-use login grant",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque callback value; never author, log or reuse a provider/login grant.",
            "required": false
          },
          {
            "name": "flow",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque callback value; never author, log or reuse a provider/login grant.",
            "required": false
          },
          {
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque callback value; never author, log or reuse a provider/login grant.",
            "required": false
          },
          {
            "name": "consent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "description": "One-use reference bound to the original HttpOnly sign-in cookie."
          }
        ]
      }
    },
    "/api/identity/auth/social/consent": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthSocialConsent",
        "summary": "Get the account awaiting Terms acceptance",
        "tags": [
          "identity"
        ],
        "security": [],
        "x-appportal-authentication": "anonymous",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Provider, account email, and presentation context.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": "string",
                      "enum": [
                        "Microsoft",
                        "Google",
                        "GitHub"
                      ]
                    },
                    "email": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "provider",
                    "email",
                    "context"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "The sign-in is missing, expired, or already complete."
          },
          "502": {
            "description": "Identity returned an invalid response."
          },
          "503": {
            "description": "Identity is temporarily unavailable."
          }
        },
        "description": "Requires the pending HttpOnly provider flow and consent cookies.",
        "x-appportal-current-authority": "Original verified provider sign-in and matching browser cookies.",
        "parameters": []
      },
      "post": {
        "operationId": "downloadPostApiIdentityAuthSocialConsent",
        "summary": "Accept Terms and finish sign-in",
        "tags": [
          "identity"
        ],
        "security": [],
        "x-appportal-authentication": "anonymous",
        "x-appportal-csrf": false,
        "responses": {
          "204": {
            "description": "Session established. The response has no body."
          },
          "400": {
            "description": "Invalid JSON or domain request; binding can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Same-origin submission and the consent header are required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "409": {
            "description": "The pending account or Terms changed. Review them again.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "410": {
            "description": "The sign-in is missing, expired, or already complete."
          },
          "413": {
            "description": "payload_too_large: signup request exceeds 12,288 bytes. A browser navigation may receive an empty response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "415": {
            "description": "Send the signup request as JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "502": {
            "description": "Identity returned an invalid response."
          },
          "503": {
            "description": "Identity is temporarily unavailable."
          }
        },
        "description": "Requires the pending HttpOnly provider flow and consent cookies. Cross-site unsafe requests are rejected. If an existing Downloads session cookie resolves, its matching readable CSRF cookie/header is required even on an otherwise anonymous operation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agreement": {
                    "$ref": "#/components/schemas/SignupTermsAcceptance"
                  },
                  "context": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "agreement",
                  "context"
                ]
              }
            }
          }
        },
        "x-appportal-current-authority": "Original verified provider sign-in and matching browser cookies.",
        "parameters": [
          {
            "name": "X-AppPortal-Consent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "const": "1"
            }
          },
          {
            "name": "X-AppPortal-CSRF",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required when an existing Downloads session cookie resolves; must match its readable CSRF cookie. Anonymous requests without a session do not require a nonce. Cross-site unsafe requests remain denied."
          }
        ]
      }
    },
    "/api/identity/auth/me": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthMe",
        "summary": "Read the current sanitized account profile",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthenticatedUser"
                }
              }
            }
          },
          "401": {
            "description": "A valid Downloads session is required; authentication may be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Current account/membership/channel authority is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "The narrow BFF forwards the authenticated Identity /auth/me projection. Organization-less accounts are valid. Membership/access state is current source evidence, not a new download entitlement. An unavailable Identity transport can return bodyless 503.",
        "x-appportal-current-authority": "Current signed-in account; profile remains readable while waitlisted",
        "parameters": []
      }
    },
    "/api/identity/auth/legal/policies": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthLegalPolicies",
        "summary": "Read published policy revisions",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishedPolicyRevisions"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            }
          },
          "400": {
            "description": "legal_history_selection_invalid: no query accepted.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "PublishedPolicy/Notice descriptors only. No query accepted; extra query400 legal_history_selection_invalid.",
        "x-appportal-current-authority": "Public catalog; no acceptance or admission grant",
        "parameters": []
      }
    },
    "/api/identity/auth/legal/policies/{revisionId}": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthLegalPoliciesRevisionId",
        "summary": "Read exact archived policy text",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Exact archived UTF-8 policy bytes.",
            "content": {
              "text/plain; charset=utf-8": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "description": "Quoted SHA-256."
              },
              "X-Policy-SHA256": {
                "schema": {
                  "type": "string"
                },
                "description": "Exact content SHA-256."
              },
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            }
          },
          "400": {
            "description": "legal_revision_invalid or legal_history_selection_invalid.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "404": {
            "description": "legal_revision_not_found: absent or not PublishedPolicy/Notice.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "No query accepted. Exact trimmed/control-free revisionId<=128; revisionId is policyKey:sha256. Returns retained UTF-8 content; missing/unpublished404 legal_revision_not_found, invalid400 legal_revision_invalid, integrity/dependency503. ETag is quoted sha256 and X-Policy-SHA256 is the same hash.",
        "x-appportal-current-authority": "Public retained PublishedPolicy/Notice bytes; no account grant",
        "parameters": [
          {
            "name": "revisionId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "description": "Exact immutable revision identity.",
            "required": true
          }
        ]
      }
    },
    "/api/identity/auth/legal/history": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthLegalHistory",
        "summary": "Read own account acceptance history",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyAcceptanceHistoryPage"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            }
          },
          "400": {
            "description": "legal_history_selection_invalid or legal_history_cursor_invalid.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "A valid Downloads session is required; authentication may be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Current account/membership/channel authority is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Returns recorded policy acceptances newest first by actedAt, then evidenceId. Reuse the cursor with the same account, scope and page size. Invalid, repeated or unknown parameters return 400. The total is unknown and an empty page establishes no acceptance. History or integrity failures return 503. No caller subject or organization selector; Downloads exposes only own account history.",
        "x-appportal-current-authority": "Current authenticated subject only; current account evidence authority independently rechecked",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 25
            },
            "description": "One invariant unsigned decimal page size; not clamped."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4096
            },
            "description": "One unchanged protected cursor, already trimmed and control-free; no cursor grants authority."
          }
        ]
      }
    },
    "/api/identity/auth/legal/signup-presentation": {
      "get": {
        "operationId": "downloadGetApiIdentityAuthLegalSignupPresentation",
        "summary": "Read current signup Terms",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignupTermsPresentationResponse"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Explicit current Terms acceptance. Read the returned immutable version. The server-issued presentation is bound to its signup surface and expires after ten minutes. Preserve presentationToken, supply a nonempty actionId, and set accepted to true only after the user agrees. Missing or invalid proof returns 400, stale or reused proof returns 409, and unavailable signing authority returns 503.",
        "x-appportal-current-authority": "Public Terms presentation; no user creation or consent",
        "parameters": [
          {
            "name": "surface",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "LocalSignup",
                "SocialSignup",
                "InvitationLocalSignup",
                "InvitationSocialSignup"
              ]
            },
            "description": "Exactly one supported signup surface."
          }
        ]
      }
    },
    "/api/identity/auth/external/{provider}/signup-start": {
      "post": {
        "operationId": "downloadPostApiIdentityAuthExternalProviderSignupStart",
        "summary": "Begin explicit provider signup",
        "tags": [
          "identity"
        ],
        "security": [
          {
            "browserSession": [],
            "csrfToken": []
          }
        ],
        "x-appportal-authentication": "browser-session-and-csrf",
        "x-appportal-csrf": true,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsAuthorizeUrl"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "private, no-store"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or domain request; binding can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Cross-site browser mutation, or an existing cookie without its matching CSRF nonce, is rejected before execution.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "404": {
            "description": "Unsupported sign-in provider.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "409": {
            "description": "Signup Terms changed; obtain the current presentation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "413": {
            "description": "payload_too_large: signup request exceeds 12,288 bytes. A browser navigation may receive an empty response.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "415": {
            "description": "Send the signup request as JSON.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "502": {
            "description": "Identity returned an invalid provider authorization URL.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Explicit current Terms acceptance. Read the returned immutable version. The server-issued presentation is bound to its signup surface and expires after ten minutes. Preserve presentationToken, supply a nonempty actionId, and set accepted to true only after the user agrees. Missing or invalid proof returns 400, stale or reused proof returns 409, and unavailable signing authority returns 503. The browser callback destination is assigned by the BFF. Cross-site unsafe requests are rejected. If an existing Downloads session cookie resolves, its matching readable CSRF cookie/header is required even on an otherwise anonymous operation.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SocialSignupStartRequest"
              }
            }
          }
        },
        "x-appportal-current-authority": "Anonymous, explicit current-Terms signup with provider verification",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "schema": {
              "type": "string",
              "x-appportal-canonical-values": [
                "microsoft",
                "google",
                "github"
              ]
            },
            "description": "Supported login provider; names are normalized to lower case before validation.",
            "required": true
          }
        ]
      }
    },
    "/api/download/me/downloads": {
      "get": {
        "operationId": "downloadGetApiDownloadMeDownloads",
        "summary": "List currently accessible distribution channels",
        "tags": [
          "download"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadAccessView"
                }
              }
            }
          },
          "400": {
            "description": "pagination_required: the legacy view exceeds its bounded whole-result capacity, or download_page_invalid for any query. Use /me/downloads/page and each channel artifacts/page.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "pagination_required",
              "download_page_invalid"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "A valid Downloads session is required; authentication may be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Current account/membership/channel authority is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsStorageBusy"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "The server resolves current team membership, account/app denials and release-channel access. Distribution-unready IPA/Windows artifacts are filtered. Explicit account denial can return a real empty channel set; dependency failures do not become empty success. Browser roles/app selectors do not grant a channel. Legacy compatibility reads accept no query parameters and must be whole: more than 100 channels or artifacts in any channel returns 400 pagination_required, never silent truncation. Use the paged member routes.",
        "x-appportal-current-authority": "Authenticated account and current direct/team channel membership",
        "parameters": []
      }
    },
    "/api/download/me/artifacts/{artifactId}/signed-link": {
      "post": {
        "operationId": "downloadPostApiDownloadMeArtifactsArtifactIdSignedLink",
        "summary": "Mint a signed link for an accessible ready artifact",
        "tags": [
          "download"
        ],
        "security": [
          {
            "browserSession": [],
            "csrfToken": []
          }
        ],
        "x-appportal-authentication": "browser-session-and-csrf",
        "x-appportal-csrf": true,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedDownloadLinkResponse"
                }
              }
            }
          },
          "400": {
            "description": "download_request_invalid: channelId must be one already-trimmed printable ASCII value of 1-200 characters.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "A valid Downloads session is required; authentication may be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "Current account/membership/channel authority is required.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "404": {
            "description": "Artifact is absent from the selected account."
          },
          "409": {
            "description": "Artifact signing/distribution readiness is not satisfied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "423": {
            "description": "Current account operational policy denies this operation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Current source/provenance authority is unavailable. An explicit selection with an unsupported channel resolver fails closed with a potentially bodyless 503; it does not become unattributed success.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsStorageBusy"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "No request body or required idempotency header. The server derives account/app scope from the stored artifact, rechecks membership and signing readiness, audits issuance and mints a currently fifteen-minute HMAC URL. Existing account holds can deny it. A URL does not publish an artifact or prove native installation eligibility. Optional channel selection captures validated distribution provenance at issuance. Transfer evidence does not establish device installation. Cross-site unsafe requests are rejected. If an existing Downloads session cookie resolves, its matching readable CSRF cookie/header is required even on an otherwise anonymous operation.",
        "x-appportal-current-authority": "Current channel membership, denials and account DownloadExistingArtifact policy",
        "parameters": [
          {
            "name": "artifactId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "description": "Exact stored artifact identity, not an authorization grant.",
            "required": true
          },
          {
            "name": "channelId",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+(?![\\s\\S])"
            },
            "description": "Optional single already-trimmed printable ASCII channel identity. Repeated/blank/invalid values return 400; current exact artifact/app/channel membership is independently required. Omission preserves legacy authorized access with unattributed provenance, never a guessed group.",
            "required": false
          }
        ]
      }
    },
    "/api/download/artifacts/{artifactId}/content": {
      "get": {
        "operationId": "downloadGetApiDownloadArtifactsArtifactIdContent",
        "summary": "Download the signed artifact bytes",
        "tags": [
          "download"
        ],
        "security": [
          {
            "signedDownload": []
          }
        ],
        "x-appportal-authentication": "signed-download-link",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual artifact stream; APK uses application/vnd.android.package-archive, other kinds retain metadata content type.",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, changed-purpose or expired signed scope/token."
          },
          "404": {
            "description": "Scoped artifact or uploaded bytes do not exist."
          },
          "409": {
            "description": "Current signing/distribution readiness is not satisfied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsNativeError"
                }
              }
            }
          },
          "423": {
            "description": "Current policy denies or cannot verify artifact download.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantOperationDeniedResponse"
                }
              }
            },
            "x-appportal-body-may-be-absent": true
          },
          "429": {
            "description": "The organization reached its request limit. Retry after the indicated delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Delay in seconds before retrying."
              },
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Download policy or request admission is temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/TenantOperationDeniedResponse"
                    },
                    {
                      "$ref": "#/components/schemas/DownloadsStorageBusy"
                    }
                  ]
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Use the complete server-returned URL unchanged; scope headers cannot retarget it. Signature binds artifact, account/app/environment/target, expiry and purpose. Current policy is checked before bytes begin; non-owner member links also recheck signing readiness. Content comes from uploaded bytes, not registered metadata. Transfers are metered observations, not a new entitlement or a promised monetary charge.",
        "x-appportal-current-authority": "Opaque server-minted HMAC URL; current account policy remains enforced",
        "parameters": [
          {
            "name": "artifactId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "description": "Exact stored artifact identity, not an authorization grant.",
            "required": true
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": false
          },
          {
            "name": "app",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": false
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": false
          },
          {
            "name": "target",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": false
          },
          {
            "name": "expires",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Server-minted Unix expiry seconds, covered by the signature.",
            "required": true
          },
          {
            "name": "signature",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": true
          },
          {
            "name": "distribution",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "selected",
                "unattributed",
                "owner",
                "not-applicable"
              ]
            },
            "description": "Optional server-minted HMAC-bound provenance. selected requires the matching channel; other values have no channel. Legacy URLs can omit both. Preserve the complete returned tuple.",
            "required": false
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+(?![\\s\\S])"
            },
            "description": "Opaque server-minted selected channel, distinct from the member request's channelId selector. Changing/removing signed provenance invalidates the URL.",
            "required": false
          },
          {
            "name": "purpose",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional signed owner purpose; adding/changing it invalidates a member signature.",
            "required": false
          }
        ]
      }
    },
    "/api/download/artifacts/{artifactId}/install-manifest.plist": {
      "get": {
        "operationId": "downloadGetApiDownloadArtifactsArtifactIdInstallManifestPlist",
        "summary": "Read the signed internal IPA install manifest",
        "tags": [
          "download"
        ],
        "security": [
          {
            "signedDownload": []
          }
        ],
        "x-appportal-authentication": "signed-download-link",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual UTF-8 XML plist.",
            "content": {
              "text/xml": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "no-store"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "description": "no-referrer"
              }
            }
          },
          "401": {
            "description": "Missing, invalid, changed-purpose or expired signed scope/token."
          },
          "404": {
            "description": "Scoped artifact or uploaded bytes do not exist."
          },
          "409": {
            "description": "Current signing/distribution readiness is not satisfied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsNativeError"
                }
              }
            }
          },
          "423": {
            "description": "Current policy denies or cannot verify installation."
          },
          "429": {
            "description": "The organization reached its request limit. Retry after the indicated delay.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                },
                "description": "Delay in seconds before retrying."
              },
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Download policy or request admission is temporarily unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsStorageBusy"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Use the complete server-returned install URL. Requires supported ready ad-hoc/enterprise IPA, approved HTTPS public origin and install-manifest purpose. Returns XML property-list bytes with encoded artifact metadata; does not prove device eligibility or cryptographic trust. Cache-Control:no-store and Referrer-Policy:no-referrer.",
        "x-appportal-current-authority": "Opaque server-minted HMAC URL; current account policy remains enforced",
        "parameters": [
          {
            "name": "artifactId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "description": "Exact stored artifact identity, not an authorization grant.",
            "required": true
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": true
          },
          {
            "name": "app",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": true
          },
          {
            "name": "environment",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": false
          },
          {
            "name": "target",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": false
          },
          {
            "name": "expires",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Server-minted Unix expiry seconds, covered by the signature.",
            "required": true
          },
          {
            "name": "signature",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque server-minted signed URL component; preserve unchanged. New URLs include the complete scope; legacy scope-less content lookup remains distinct from a scope grant.",
            "required": true
          },
          {
            "name": "distribution",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "selected",
                "unattributed",
                "owner",
                "not-applicable"
              ]
            },
            "description": "Optional server-minted HMAC-bound provenance. selected requires the matching channel; other values have no channel. Legacy URLs can omit both. Preserve the complete returned tuple.",
            "required": false
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[!-~]+(?![\\s\\S])"
            },
            "description": "Opaque server-minted selected channel, distinct from the member request's channelId selector. Changing/removing signed provenance invalidates the URL.",
            "required": false
          },
          {
            "name": "purpose",
            "in": "query",
            "schema": {
              "const": "install-manifest"
            },
            "description": "Exact signed install-manifest purpose.",
            "required": true
          }
        ]
      }
    },
    "/api/download/branding/{tenantId}/logo": {
      "get": {
        "operationId": "downloadGetApiDownloadBrandingTenantIdLogo",
        "summary": "Read published organization branding bytes",
        "tags": [
          "download"
        ],
        "security": [],
        "x-appportal-authentication": "anonymous",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Stored logo bytes with their stored content type.",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "public, max-age=300"
              },
              "X-Content-Type-Options": {
                "schema": {
                  "type": "string"
                },
                "description": "nosniff"
              }
            }
          },
          "404": {
            "description": "No published logo is stored."
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsStorageBusy"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "x-appportal-current-authority": "Anonymous branding read; no channel access grant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "description": "Organization whose published logo is requested.",
            "required": true
          }
        ]
      }
    },
    "/api/download/me/downloads/page": {
      "get": {
        "operationId": "downloadGetApiDownloadMeDownloadsPage",
        "summary": "Page currently accessible distribution channels",
        "tags": [
          "download"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsMemberChannelPage"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "no-store, private"
              }
            }
          },
          "400": {
            "description": "download_page_invalid: invalid/repeated/unknown query, malformed cursor, changed continuation scope or invalid path selector. No caller cursor or private selection is reflected.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "download_page_invalid"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "A valid Downloads browser session is required; authentication can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "download_page_access_denied: current account/member/team or deny/source-grant authority cannot be verified. Refresh/reconcile authority rather than treating it as an empty page.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "download_page_access_denied"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "404": {
            "description": "resource_not_found: owning-source resource absence; an unavailable artifact-page path channel is404, while an unmatched channel-list filter is a valid empty page.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "resource_not_found"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "download_page_unavailable: current source/dependency is unavailable. Retry the same page; no empty result or new grant is inferred.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "download_page_unavailable"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Exact lower-case query keys only; reject unknown, repeated, blank, untrimmed or control-containing values. limit defaults to 25 and accepts 1..100 with at most 3 decoded digits, not an offset. cursor is opaque and bound to subject, account, collection, limit, selected IDs, current grants, source and ordering; preserve the original selection. Authority and source are checked again after reading. Changed grants/current authority deny 403, source ownership change returns 503, and invalid continuation returns400. totalCount is explicitly null, never inferred as 0. Channels order by app ID, rank and channel ID with ordinal database collation. channelId optionally filters the list. Optional artifactId is bound into continuation scope but does not filter this channel collection. An authorized empty items array is valid; unavailable authority is not an empty success.",
        "x-appportal-current-authority": "Current authenticated member and trusted Identity direct/team grants; Portal organization membership and Dashboard authoring roles are not required",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "One invariant unsigned integer of at most three decoded digits. Repeated, signed, whitespace or out-of-range values are 400; the handler does not clamp.",
            "required": false
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "x-appportal-max-utf16-code-units": 8192
            },
            "description": "Single opaque continuation; preserve unchanged. No client-decoded offsets or invented TTL. Already trimmed, nonblank and control-free.",
            "required": false
          },
          {
            "name": "channelId",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "x-appportal-max-utf16-code-units": 512
            },
            "description": "Optional exact channel filter, also bound into cursor scope. Already trimmed, nonblank and control-free.",
            "required": false
          },
          {
            "name": "artifactId",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "x-appportal-max-utf16-code-units": 512
            },
            "description": "Optional continuation-bound selection; does not filter this channel list. Already trimmed, nonblank and control-free.",
            "required": false
          }
        ]
      }
    },
    "/api/download/me/downloads/channels/{channelId}/artifacts/page": {
      "get": {
        "operationId": "downloadGetApiDownloadMeDownloadsChannelsChannelIdArtifactsPage",
        "summary": "Page ready artifacts in one currently accessible channel",
        "tags": [
          "download"
        ],
        "security": [
          {
            "browserSession": []
          }
        ],
        "x-appportal-authentication": "browser-session",
        "x-appportal-csrf": false,
        "responses": {
          "200": {
            "description": "Actual owning workflow result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsMemberArtifactPage"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "description": "no-store, private"
              }
            }
          },
          "400": {
            "description": "download_page_invalid: invalid/repeated/unknown query, malformed cursor, changed continuation scope or invalid path selector. No caller cursor or private selection is reflected.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "download_page_invalid"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "401": {
            "description": "A valid Downloads browser session is required; authentication can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "403": {
            "description": "download_page_access_denied: current account/member/team or deny/source-grant authority cannot be verified. Refresh/reconcile authority rather than treating it as an empty page.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "download_page_access_denied"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "404": {
            "description": "resource_not_found: owning-source resource absence; an unavailable artifact-page path channel is404, while an unmatched channel-list filter is a valid empty page.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "resource_not_found"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "500": {
            "description": "Existing dependency failure; inspect its machine code. Transport failures can be bodyless.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          },
          "503": {
            "description": "download_page_unavailable: current source/dependency is unavailable. Retry the same page; no empty result or new grant is inferred.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadsBrowserProblem"
                }
              }
            },
            "x-appportal-body-may-be-absent": true,
            "x-appportal-handler-error-codes": [
              "download_page_unavailable"
            ],
            "headers": {
              "X-AppPortal-TraceId": {
                "$ref": "#/components/headers/ManagementProblemTraceId"
              },
              "Cache-Control": {
                "$ref": "#/components/headers/ManagementProblemCacheControl"
              }
            }
          }
        },
        "description": "Exact lower-case query keys only; reject unknown, repeated, blank, untrimmed or control-containing values. limit defaults to 25 and accepts 1..100 with at most 3 decoded digits, not an offset. cursor is opaque and bound to subject, account, collection, limit, selected IDs, current grants, source and ordering; preserve the original selection. Authority and source are checked again after reading. Changed grants/current authority deny 403, source ownership change returns 503, and invalid continuation returns400. totalCount is explicitly null, never inferred as 0. The path channel must be currently accessible. Only Uploaded artifacts are listed; WindowsZip is excluded and IPA needs current signed iOS analysis. This filtering is not proof of native installation eligibility. Results order by release time then binding ID descending. artifactId filters this channel; optional query channelId is only a continuation-bound selection value and does not replace the path.",
        "x-appportal-current-authority": "Current authenticated member and trusted Identity direct/team grants; Portal organization membership and Dashboard authoring roles are not required",
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "schema": {
              "type": "string",
              "minLength": 1,
              "x-appportal-max-utf16-code-units": 512
            },
            "description": "Exact currently accessible channel. This is separate from the optional same-named query selection.",
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "One invariant unsigned integer of at most three decoded digits. Repeated, signed, whitespace or out-of-range values are 400; the handler does not clamp.",
            "required": false
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "x-appportal-max-utf16-code-units": 8192
            },
            "description": "Single opaque continuation; preserve unchanged. No client-decoded offsets or invented TTL. Already trimmed, nonblank and control-free.",
            "required": false
          },
          {
            "name": "channelId",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "x-appportal-max-utf16-code-units": 512
            },
            "description": "Optional selection bound into cursor scope; does not replace/filter the path channel. Already trimmed, nonblank and control-free.",
            "required": false
          },
          {
            "name": "artifactId",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "x-appportal-max-utf16-code-units": 512
            },
            "description": "Optional exact artifact filter within the path channel, also bound into cursor scope. Already trimmed, nonblank and control-free.",
            "required": false
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "browserSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Host-AppPortal.Download.Session",
        "description": "Opaque, Secure, HttpOnly, SameSite browser session. Development uses the same name without the __Host- prefix."
      },
      "csrfToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-AppPortal-CSRF",
        "description": "Required together with the matching non-HttpOnly CSRF cookie for authenticated mutation requests."
      },
      "signedDownload": {
        "type": "apiKey",
        "in": "query",
        "name": "signature",
        "description": "Scoped HMAC signature from a time-limited signed link; the URL also carries the signed expiry and artifact scope."
      }
    },
    "schemas": {
      "PolicyAcceptanceHistoryEntry": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "evidenceId": {
            "type": "string"
          },
          "presentationId": {
            "type": "string"
          },
          "revisionId": {
            "type": "string"
          },
          "policyKey": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "subjectUserId": {
            "type": "string"
          },
          "purpose": {
            "type": "string"
          },
          "scopeKind": {
            "type": "string"
          },
          "tenantId": {
            "type": [
              "string",
              "null"
            ]
          },
          "surface": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "presentedAt": {
            "type": "string",
            "format": "date-time"
          },
          "actedAt": {
            "type": "string",
            "format": "date-time"
          },
          "authorityBasis": {
            "type": "string"
          }
        },
        "required": [
          "evidenceId",
          "presentationId",
          "revisionId",
          "policyKey",
          "sha256",
          "subjectUserId",
          "purpose",
          "scopeKind",
          "tenantId",
          "surface",
          "locale",
          "presentedAt",
          "actedAt",
          "authorityBasis"
        ]
      },
      "PolicyAcceptanceHistoryPage": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "evidenceId": {
                  "type": "string"
                },
                "presentationId": {
                  "type": "string"
                },
                "revisionId": {
                  "type": "string"
                },
                "policyKey": {
                  "type": "string"
                },
                "sha256": {
                  "type": "string"
                },
                "subjectUserId": {
                  "type": "string"
                },
                "purpose": {
                  "type": "string"
                },
                "scopeKind": {
                  "type": "string"
                },
                "tenantId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "surface": {
                  "type": "string"
                },
                "locale": {
                  "type": "string"
                },
                "presentedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "actedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "authorityBasis": {
                  "type": "string"
                }
              },
              "required": [
                "evidenceId",
                "presentationId",
                "revisionId",
                "policyKey",
                "sha256",
                "subjectUserId",
                "purpose",
                "scopeKind",
                "tenantId",
                "surface",
                "locale",
                "presentedAt",
                "actedAt",
                "authorityBasis"
              ]
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalCount": {
            "type": [
              "integer",
              "null"
            ],
            "default": null
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "PolicyArchiveDescriptor": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "revisionId": {
            "type": "string"
          },
          "policyKey": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "effectiveOn": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "canonicalRoute": {
            "type": [
              "string",
              "null"
            ]
          },
          "classification": {
            "type": "string"
          }
        },
        "required": [
          "revisionId",
          "policyKey",
          "sha256",
          "locale",
          "effectiveOn",
          "canonicalRoute",
          "classification"
        ]
      },
      "PublishedPolicyRevisions": {
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "revisionId": {
              "type": "string"
            },
            "policyKey": {
              "type": "string"
            },
            "sha256": {
              "type": "string"
            },
            "locale": {
              "type": "string"
            },
            "effectiveOn": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "canonicalRoute": {
              "type": [
                "string",
                "null"
              ]
            },
            "classification": {
              "type": "string"
            }
          },
          "required": [
            "revisionId",
            "policyKey",
            "sha256",
            "locale",
            "effectiveOn",
            "canonicalRoute",
            "classification"
          ]
        }
      },
      "SignupTermsPresentationResponse": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "revisionId": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "presentationToken": {
            "type": "string"
          }
        },
        "required": [
          "revisionId",
          "sha256",
          "locale",
          "content",
          "presentationToken"
        ]
      },
      "SignupTermsAcceptance": {
        "type": "object",
        "properties": {
          "presentationToken": {
            "type": [
              "string",
              "null"
            ]
          },
          "actionId": {
            "type": "string",
            "format": "uuid"
          },
          "accepted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SocialSignupStartRequest": {
        "type": "object",
        "properties": {
          "agreement": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "presentationToken": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "actionId": {
                "type": "string",
                "format": "uuid"
              },
              "accepted": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "returnUrl": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          }
        }
      },
      "DownloadAccessView": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "channel": {
                  "type": "object",
                  "properties": {
                    "channelId": {
                      "type": "string"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "appId": {
                      "type": "string"
                    },
                    "key": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "rank": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "channelId",
                    "tenantId",
                    "appId",
                    "key",
                    "name",
                    "rank",
                    "createdAt"
                  ]
                },
                "artifacts": {
                  "type": "array",
                  "items": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "artifact": {
                        "type": "object",
                        "properties": {
                          "artifactId": {
                            "type": "string"
                          },
                          "kind": {
                            "enum": [
                              "Ipa",
                              "Aab",
                              "Apk",
                              "WindowsZip"
                            ]
                          },
                          "fileName": {
                            "type": "string"
                          },
                          "contentType": {
                            "type": "string"
                          },
                          "sizeBytes": {
                            "type": "integer"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "tenantId": {
                            "type": "string"
                          },
                          "appId": {
                            "type": "string"
                          },
                          "environmentName": {
                            "type": "string"
                          },
                          "deploymentTarget": {
                            "type": "string"
                          },
                          "storageKey": {
                            "type": "string"
                          },
                          "state": {
                            "type": "integer"
                          },
                          "bundleId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null
                          },
                          "appVersion": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null
                          },
                          "buildNumber": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null
                          },
                          "iconStorageKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null
                          }
                        },
                        "required": [
                          "artifactId",
                          "kind",
                          "fileName",
                          "contentType",
                          "sizeBytes",
                          "createdAt",
                          "tenantId",
                          "appId",
                          "environmentName",
                          "deploymentTarget",
                          "storageKey",
                          "state"
                        ]
                      },
                      "releasedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "signingInfo": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "platform": {
                            "type": "string"
                          },
                          "signed": {
                            "type": "boolean"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "schemes": {
                            "type": "array",
                            "items": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "signerName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "certificateSha256": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "isDebugSigned": {
                            "type": "boolean"
                          },
                          "certificateExpiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time"
                          },
                          "provisionedDeviceCount": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "distributionType": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "analyzedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "analysisVersion": {
                            "type": "integer",
                            "default": 0
                          },
                          "rootCodeSignature": {
                            "enum": [
                              "unavailable",
                              "unsupported",
                              "invalid",
                              "verified",
                              null
                            ]
                          }
                        },
                        "required": [
                          "platform",
                          "signed",
                          "summary",
                          "schemes",
                          "signerName",
                          "certificateSha256",
                          "isDebugSigned",
                          "certificateExpiresAt",
                          "provisionedDeviceCount",
                          "distributionType",
                          "analyzedAt"
                        ],
                        "default": null
                      },
                      "releaseNotes": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "releaseId": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "isTruncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "releaseId",
                          "text",
                          "isTruncated"
                        ],
                        "default": null
                      }
                    },
                    "required": [
                      "artifact",
                      "releasedAt"
                    ]
                  }
                }
              },
              "required": [
                "channel",
                "artifacts"
              ]
            }
          }
        },
        "required": [
          "channels"
        ],
        "description": "Current channel-membership view, including direct/team membership and current app/account denials, filtered by distribution readiness. A denied account can yield an empty channels array. A portal role, registered upload or signed-link possession does not itself grant channel membership."
      },
      "SignedDownloadLinkResponse": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "artifactId": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "contentType": {
            "type": "string"
          },
          "auditEventId": {
            "type": "string"
          },
          "installUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "default": null
          }
        },
        "required": [
          "artifactId",
          "url",
          "expiresAt",
          "contentType",
          "auditEventId"
        ],
        "description": "Server-minted opaque signed URL with audit identity and actual expiry, currently fifteen minutes after issuance. Preserve the entire returned URL; do not synthesize scope/signature. installUrl is nullable and present only for supported ready internal IPA installation on an approved HTTPS public origin. It proves neither physical-device eligibility nor Apple cryptographic trust."
      },
      "AuthenticatedUser": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "displayName": {
                "type": "string"
              },
              "hasPassword": {
                "type": "boolean"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "active": {
                "type": "boolean"
              }
            },
            "required": [
              "userId",
              "email",
              "displayName",
              "hasPassword",
              "createdAt",
              "active"
            ]
          },
          "memberships": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "userId": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "tenantId": {
                  "type": "string"
                },
                "tenantSlug": {
                  "type": "string"
                },
                "tenantName": {
                  "type": "string"
                },
                "status": {
                  "enum": [
                    "Active",
                    "Invited"
                  ]
                },
                "roles": {
                  "type": "array",
                  "items": {
                    "enum": [
                      "Admin",
                      "AppOwner",
                      "Developer",
                      "ProductOwner",
                      "Support",
                      "PlatformOperator"
                    ]
                  }
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "tenantKind": {
                  "enum": [
                    "Personal",
                    "Organization"
                  ],
                  "default": "Organization"
                },
                "externallyProvisioned": {
                  "type": "boolean",
                  "default": false
                },
                "ownerUserId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "default": null
                }
              },
              "required": [
                "userId",
                "email",
                "displayName",
                "tenantId",
                "tenantSlug",
                "tenantName",
                "status",
                "roles",
                "createdAt"
              ]
            }
          },
          "activeOrg": {
            "type": "string"
          },
          "access": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "orgAdmin": {
                "type": "boolean"
              },
              "canManageApps": {
                "type": "boolean"
              },
              "allApps": {
                "type": "boolean"
              },
              "baselineCapabilities": {
                "type": "array",
                "items": {
                  "enum": [
                    "ViewAnalytics",
                    "ViewCrashes",
                    "ManageCrashWorkflow",
                    "AssignCrashOwners",
                    "ViewLogs",
                    "ManageReleases",
                    "AccessDistribution",
                    "ManageMessaging",
                    "ViewLocation",
                    "ManageIssueConnections",
                    "ManageTeamMembers"
                  ]
                }
              },
              "apps": {
                "type": "array",
                "items": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "appId": {
                      "type": "string"
                    },
                    "capabilities": {
                      "type": "array",
                      "items": {
                        "enum": [
                          "ViewAnalytics",
                          "ViewCrashes",
                          "ManageCrashWorkflow",
                          "AssignCrashOwners",
                          "ViewLogs",
                          "ManageReleases",
                          "AccessDistribution",
                          "ManageMessaging",
                          "ViewLocation",
                          "ManageIssueConnections",
                          "ManageTeamMembers"
                        ]
                      }
                    }
                  },
                  "required": [
                    "appId",
                    "capabilities"
                  ]
                }
              },
              "deniedAppIds": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default": null
              },
              "tenantRoles": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "enum": [
                    "Admin",
                    "AppOwner",
                    "Developer",
                    "ProductOwner",
                    "Support",
                    "PlatformOperator"
                  ]
                },
                "default": null
              }
            },
            "required": [
              "orgAdmin",
              "canManageApps",
              "allApps",
              "baselineCapabilities",
              "apps"
            ],
            "default": null
          },
          "isWaitlisted": {
            "type": "boolean",
            "default": false
          },
          "canCreateWorkspaces": {
            "type": "boolean",
            "default": true
          },
          "portalAccess": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "decidedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "default": null
              },
              "revision": {
                "type": "integer",
                "default": 0
              },
              "isWaitlisted": {
                "type": "boolean",
                "readOnly": true
              }
            },
            "required": [
              "status",
              "source"
            ],
            "default": null
          },
          "profileAvatarAvailable": {
            "type": "boolean"
          }
        },
        "required": [
          "user",
          "memberships",
          "activeOrg"
        ],
        "description": "Actual sanitized Identity profile and membership/access projection. Password hash and bearer/refresh tokens are absent. Membership history, waitlist state and workspace-creation eligibility do not substitute for current channel access; activeOrg may be empty and access null."
      },
      "OrganizationClaimPresentation": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "claimPresentationId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "terms": {
            "type": "object",
            "properties": {
              "revisionId": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "locale": {
                "type": "string"
              },
              "content": {
                "type": "string"
              }
            },
            "required": [
              "revisionId",
              "sha256",
              "locale",
              "content"
            ]
          },
          "organizationAuthority": {
            "type": "object",
            "properties": {
              "revisionId": {
                "type": "string"
              },
              "sha256": {
                "type": "string"
              },
              "locale": {
                "type": "string"
              },
              "content": {
                "type": "string"
              }
            },
            "required": [
              "revisionId",
              "sha256",
              "locale",
              "content"
            ]
          }
        },
        "required": [
          "claimPresentationId",
          "name",
          "slug",
          "expiresAt",
          "terms",
          "organizationAuthority"
        ]
      },
      "OrganizationClaimStatus": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "status": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "tenantSlug": {
            "type": "string"
          },
          "ticketId": {
            "type": [
              "string",
              "null"
            ]
          },
          "caseId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "name",
          "tenantId",
          "tenantSlug",
          "ticketId",
          "caseId",
          "createdAt"
        ]
      },
      "TenantOperationDeniedResponse": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "errorCode": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "errorCode",
          "error"
        ]
      },
      "SignInIdentity": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "identityId": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "accountName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "identityId",
          "provider",
          "email",
          "accountName"
        ]
      },
      "LoginRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "password": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "RegisterRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "password": {
            "type": [
              "string",
              "null"
            ]
          },
          "displayName": {
            "type": [
              "string",
              "null"
            ]
          },
          "agreement": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "presentationToken": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "actionId": {
                "type": "string",
                "format": "uuid"
              },
              "accepted": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "description": "Local signup: valid trimmed email, password at least eight characters are domain requirements beyond JSON binding. Creates a global account with no memberships; the response is a browser session summary, never AuthTokens or implicit workspace admission."
      },
      "SwitchOrgRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "tenantId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OrganizationClaimPresentationRequest": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "type": [
              "string",
              "null"
            ],
            "default": null
          }
        },
        "additionalProperties": false
      },
      "DownloadsMemberChannelPage": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "channelId": {
                  "type": "string"
                },
                "tenantId": {
                  "type": "string"
                },
                "appId": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "rank": {
                  "type": "integer"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "channelId",
                "tenantId",
                "appId",
                "key",
                "name",
                "rank",
                "createdAt"
              ]
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalCount": {
            "type": [
              "integer",
              "null"
            ],
            "default": null
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "DownloadsMemberArtifactPage": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "artifact": {
                  "type": "object",
                  "properties": {
                    "artifactId": {
                      "type": "string"
                    },
                    "kind": {
                      "enum": [
                        "Ipa",
                        "Aab",
                        "Apk",
                        "WindowsZip"
                      ]
                    },
                    "fileName": {
                      "type": "string"
                    },
                    "contentType": {
                      "type": "string"
                    },
                    "sizeBytes": {
                      "type": "integer"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "tenantId": {
                      "type": "string"
                    },
                    "appId": {
                      "type": "string"
                    },
                    "environmentName": {
                      "type": "string"
                    },
                    "deploymentTarget": {
                      "type": "string"
                    },
                    "storageKey": {
                      "type": "string"
                    },
                    "state": {
                      "type": "integer"
                    },
                    "bundleId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    },
                    "appVersion": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    },
                    "buildNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    },
                    "displayName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    },
                    "iconStorageKey": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "default": null
                    }
                  },
                  "required": [
                    "artifactId",
                    "kind",
                    "fileName",
                    "contentType",
                    "sizeBytes",
                    "createdAt",
                    "tenantId",
                    "appId",
                    "environmentName",
                    "deploymentTarget",
                    "storageKey",
                    "state"
                  ]
                },
                "releasedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "signingInfo": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "platform": {
                      "type": "string"
                    },
                    "signed": {
                      "type": "boolean"
                    },
                    "summary": {
                      "type": "string"
                    },
                    "schemes": {
                      "type": "array",
                      "items": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "signerName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "certificateSha256": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isDebugSigned": {
                      "type": "boolean"
                    },
                    "certificateExpiresAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "provisionedDeviceCount": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "distributionType": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "analyzedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "analysisVersion": {
                      "type": "integer",
                      "default": 0
                    },
                    "rootCodeSignature": {
                      "enum": [
                        "unavailable",
                        "unsupported",
                        "invalid",
                        "verified",
                        null
                      ]
                    }
                  },
                  "required": [
                    "platform",
                    "signed",
                    "summary",
                    "schemes",
                    "signerName",
                    "certificateSha256",
                    "isDebugSigned",
                    "certificateExpiresAt",
                    "provisionedDeviceCount",
                    "distributionType",
                    "analyzedAt"
                  ],
                  "default": null
                },
                "releaseNotes": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "releaseId": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "isTruncated": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "releaseId",
                    "text",
                    "isTruncated"
                  ],
                  "default": null
                }
              },
              "required": [
                "artifact",
                "releasedAt"
              ]
            }
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalCount": {
            "type": [
              "integer",
              "null"
            ],
            "default": null
          }
        },
        "required": [
          "items",
          "nextCursor"
        ]
      },
      "DownloadsSessionSummary": {
        "type": "object",
        "required": [
          "expiresAt",
          "tenantId",
          "tenantSlug"
        ],
        "properties": {
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "tenantId": {
            "type": "string"
          },
          "tenantSlug": {
            "type": "string"
          },
          "sessionVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "signInIdentity": {
            "$ref": "#/components/schemas/SignInIdentity"
          }
        },
        "description": "Actual BffSessionSummary browser projection. Tokens remain server-held. Downloads GET /api/session writes null sessionVersion; sign-in/scope rotation can return its correlation value. Downloads does not require a session-version request header. An organization-less signed-in account has empty tenantId/tenantSlug, not a granted workspace."
      },
      "DownloadsBrowserProblem": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "instance": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          },
          "errorCode": {
            "type": "string"
          }
        },
        "description": "Existing shared Identity/BFF/Download management problem details. Machine code, public message, traceId and legacy error alias remain distinct from native signed-content errors and account-policy JSON. Authentication, binding and transport failures can be bodyless."
      },
      "DownloadsNativeError": {
        "type": "object",
        "required": [
          "error",
          "code",
          "message",
          "traceId"
        ],
        "properties": {
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          },
          "retryAction": {
            "type": "string"
          }
        },
        "description": "Actual shared DownloadNativeErrors application/json fields. Signed content/manifest signing-readiness failures use this representation, not a rewritten management problem. retryAction is optional; no credential-purge or entitlement instruction is inferred."
      },
      "DownloadsStorageBusy": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "const": "storage_operation_busy"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "DownloadsAuthorizeUrl": {
        "type": "object",
        "required": [
          "authorizeUrl"
        ],
        "properties": {
          "authorizeUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "headers": {
      "ManagementProblemTraceId": {
        "description": "Opaque error correlation; matches the shared problem body's traceId.",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        }
      },
      "ManagementProblemCacheControl": {
        "description": "Includes no-store for shared management problems; additional directives may be present. Browser JSON and bodyless failures retain their native behavior.",
        "schema": {
          "type": "string"
        }
      }
    }
  },
  "x-appportal-typed-fragments": [
    {
      "source": [
        "FrontendIngressContracts.Download",
        "DownloadBffEndpoints",
        "BffIdentityDocumentEndpoints",
        "BffSessionManager",
        "BffSessionMiddleware",
        "Download.Api/Program",
        "DownloadMemberPageEndpoints",
        "DownloadAccessReadSession",
        "DownloadPageAuthority",
        "Identity.Auth endpoints",
        "actual Contracts/Web serializer"
      ],
      "coverage": "Twenty-two Downloads browser operations: seven distribution routes, including two protected member pages, and fifteen identity/session/social/legal routes. CLI/Upload aliases remain separate. Source metadata is not deployment, provider or native-device qualification.",
      "representedRelease": null,
      "deployedRelease": null
    }
  ],
  "x-appportal-reference-source": "8bda8e8302d4ea5bd005ef1132f7267e82e6337c"
}
