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

# Promotes a company user to a company manager.

> The user must be a company user and be part of the company.

# Access Control Rules

- Company manager of the company.
- Admins can list all companies. Requires `manage_companies` permissions.



## OpenAPI

````yaml POST /api/v0/companies/{company_id}/managers
openapi: 3.1.0
info:
  title: Cantina Client API
  description: >-
    Endpoints available to client organizations. For an overview and
    authentication, see
    https://docs.cantina.xyz/for-organizations/getting-started/api-access.
  license:
    name: Cantina
    identifier: Cantina
  version: 0.1.0
servers: []
security: []
paths:
  /api/v0/companies/{company_id}/managers:
    post:
      tags:
        - companies
      summary: Promotes a company user to a company manager.
      description: >-
        The user must be a company user and be part of the company.


        # Access Control Rules


        - Company manager of the company.

        - Admins can list all companies. Requires `manage_companies`
        permissions.
      operationId: promote_to_manager
      parameters:
        - name: company_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromoteToManager'
        required: true
      responses:
        '204':
          description: User successfully promoted to manager
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '401':
          description: Access not authorised
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '403':
          description: Access forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
        '500':
          description: Error promoting user to manager
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CantinaError'
components:
  schemas:
    PromoteToManager:
      type: object
      description: Promote a member to manager.
      required:
        - userRef
      properties:
        userRef:
          $ref: '#/components/schemas/ResourceRef'
    CantinaError:
      type: object
      description: Error returned by the Cantina API.
      required:
        - type
        - msg
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        msg:
          type: string
          description: Error message for the user.
    ResourceRef:
      oneOf:
        - type: string
          format: uuid
          description: Resource id.
        - type: string
          description: Resource handle, e.g. a user's username or a team handle.
      description: Reference to a resource, either by `id` or `handle` (`username`).
    ErrorType:
      type: string
      description: Type of error.
      enum:
        - email_not_verified
        - auth_invalid
        - auth_expired
        - auth_token_missing
        - auth_id_missing
        - invalid_password
        - disabled_user
        - tc_not_accepted
        - evicted
        - unauthorized
        - bad_request
        - not_found
        - forbidden
        - gone
        - payload_too_large
        - service_unavailable
        - internal_error

````