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

> ## Agent Instructions
> Treat Stackdome as an application-delivery platform for coding agents and developers, not as a Kubernetes dashboard.
> Prefer the Stackdome agent plugin as the user entry point and the stackdome CLI as the execution interface.
> Route agents who need the maintained deploy skill to npx skills add stackdome/skills and the complete operational workflow to /guides/ai-agents.
> Verify commands and flags with stackdome --help. Run stackdome init before authoring stackfile.yaml and stackdome validate before deploying.
> Use -o json for automation and verify documented terminal states before claiming success.
> Never request a user's account password. Use API-token authentication.
> During alpha, Stackdome Cloud is ephemeral and capacity-limited, and each organization can connect one cluster.
> Do not expose Kubernetes as a user concern unless the task is self-hosting or infrastructure architecture.

# Demote an organization admin

> Demotes an OrgAdmin and places them in the specified project with the given role (defaults to Viewer).



## OpenAPI

````yaml /openapi.yaml post /api/v1/organizations/{org_id}/admins/{user_id}/demote
openapi: 3.0.0
info:
  description: >-
    Deploy, debug, and operate applications through the Stackdome REST API on
    Stackdome Cloud or a self-hosted installation. This API is in alpha and may
    change before general availability.
  title: Stackdome API
  version: 0.0.1-alpha
servers:
  - url: /
security: []
paths:
  /api/v1/organizations/{org_id}/admins/{user_id}/demote:
    post:
      summary: Demote an organization admin
      description: >-
        Demotes an OrgAdmin and places them in the specified project with the
        given role (defaults to Viewer).
      parameters:
        - description: The ID of the organization
          explode: false
          in: path
          name: org_id
          required: true
          schema:
            type: string
          style: simple
        - description: The ID of the user
          explode: false
          in: path
          name: user_id
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DemoteAdminRequest'
        required: true
      responses:
        '204':
          description: Admin demoted successfully
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: User not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      security:
        - Bearer: []
components:
  schemas:
    DemoteAdminRequest:
      example:
        role: ''
        project_name: project_name
      properties:
        project_name:
          description: The name of the project to place the demoted user in
          type: string
        role:
          allOf:
            - $ref: '#/components/schemas/ProjectRole'
          description: The project role to assign (defaults to Viewer)
      required:
        - project_name
      type: object
    Error:
      allOf:
        - $ref: '#/components/schemas/ObjectReference'
        - $ref: '#/components/schemas/Error_allOf'
    ProjectRole:
      description: A role that can be assigned to a project member
      enum:
        - Developer
        - Viewer
      type: string
    ObjectReference:
      properties:
        id:
          type: string
        kind:
          type: string
        href:
          type: string
      type: object
    Error_allOf:
      properties:
        code:
          type: string
        reason:
          type: string
        operation_id:
          type: string
        details:
          additionalProperties: true
          description: Optional structured, machine-readable error context
          type: object
      type: object
  securitySchemes:
    Bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````