> ## Documentation Index
> Fetch the complete documentation index at: https://prismspace-5c919a09.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set rank

> Rank someone in the group, by role_id or rank number.

Send role_id or rank. Goes through Auto Ranking, so the workspace needs it connected, and is recorded in the ranking log.



## OpenAPI

````yaml ankra/api-reference/openapi.json PATCH /set-rank
openapi: 3.1.0
info:
  title: Ankra API
  version: 1.0.0
  description: >-
    Read and write an Ankra workspace from your games and scripts. Generate a
    key in Ankra's Settings › Developer.


    Every request sends the key as `Authorization: Bearer ws_…` and the
    workspace as `?workspace_id=`: the ID in the

    workspace's Ankra address, or its UUID. Each key works for its own workspace
    only.


    People are named by `roblox_user_id`. Parameters go in the query string for
    GET and DELETE, and in a JSON body

    otherwise. An action belonging to a module answers 403 while that module is
    turned off. Errors come back as

    `{ "error": "…" }`.
servers:
  - url: https://api.lumonol.co.uk/ankra
security:
  - apiKey: []
tags:
  - name: Workspace
    description: The workspace, its roles and its Roblox group.
  - name: Staff
    description: Members, the directory, ranks. Needs the staff module.
  - name: Labels
    description: Labels on staff. Needs the staff module.
  - name: Logbook
    description: Promotions, warnings and notes. Needs the staff module.
  - name: Time off
    description: Inactivity requests. Needs the staff module.
  - name: Activity
    description: In-game minutes and messages. Needs the activity module.
  - name: Sessions
    description: Scheduled sessions, their servers and roles. Needs the activity module.
  - name: Assignments
    description: Weekly assignments. Needs the assignments module.
  - name: Knowledge
    description: The knowledge base, read only. Needs the knowledge module.
  - name: Bans
    description: Game bans.
  - name: Orders
    description: Game orders.
paths:
  /set-rank:
    patch:
      tags:
        - Staff
      summary: Set rank
      description: >-
        Rank someone in the group, by role_id or rank number.


        Send role_id or rank. Goes through Auto Ranking, so the workspace needs
        it connected, and is recorded in the ranking log.
      operationId: set-rank
      parameters:
        - $ref: '#/components/parameters/workspace_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - roblox_user_id
              properties:
                roblox_user_id:
                  type: integer
                  description: The Roblox user ID of the person.
                role_id:
                  type: string
                  description: The Roblox role ID to rank them to.
                rank:
                  type: integer
                  minimum: 1
                  maximum: 255
                  description: >-
                    The rank number to rank them to, looked up in the group's
                    roles.
                executor_roblox_user_id:
                  type: integer
                  description: >-
                    Roblox user ID of whoever did this in game. Recorded as the
                    actor when they are linked to someone in the workspace.
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
        '400':
          description: A parameter is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The staff module is turned off for this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    workspace_id:
      name: workspace_id
      in: query
      required: true
      description: 'The workspace: the 24-character ID in its Ankra address, or its UUID.'
      schema:
        type: string
  schemas:
    Success:
      type: object
      properties:
        success:
          type: boolean
          const: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          examples:
            - roblox_user_id is required
  responses:
    Unauthorized:
      description: The key is wrong, or is not for this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: ws_ key
      description: A workspace API key from Settings › Developer.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.