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

# Remove an admin from the cockpit

> Remove an admin from your company's Primo cockpit, by email or by adminId (an employee `id` or an external `userId`, as `getAdmins` returns them). An employee admin goes back to the employee role and keeps their employee access; an external admin leaves your company, and their Primo login is deleted when your company was their only one. Answers REMOVED. A person who is not an admin yet but has a pending admin invitation sees it revoked, and the answer is INVITATION_REVOKED. Answers 404 when no admin nor pending invitation matches, and 409 for an admin whose role Primo manages, which is left as it is. To invite an admin, use `inviteAdmin`.

Key: WriteScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json delete /admins
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /admins:
    delete:
      tags:
        - Admins
      summary: Remove an admin from the cockpit
      description: >-
        Remove an admin from your company's Primo cockpit, by email or by
        adminId (an employee `id` or an external `userId`, as `getAdmins`
        returns them). An employee admin goes back to the employee role and
        keeps their employee access; an external admin leaves your company, and
        their Primo login is deleted when your company was their only one.
        Answers REMOVED. A person who is not an admin yet but has a pending
        admin invitation sees it revoked, and the answer is INVITATION_REVOKED.
        Answers 404 when no admin nor pending invitation matches, and 409 for an
        admin whose role Primo manages, which is left as it is. To invite an
        admin, use `inviteAdmin`.
      operationId: removeAdmin
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveAdminBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveAdmin_Output'
components:
  schemas:
    RemoveAdminBody:
      type: object
      properties:
        email:
          description: >-
            The email of the admin, or of the pending admin invitation, to
            remove. Give it, or `adminId`, not both.
          type: string
          format: email
          pattern: >-
            ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        adminId:
          description: >-
            The admin to remove, as getAdmins returns them (an employee `id` or
            an external `userId`). Give it, or `email`, not both.
          type: string
          minLength: 1
    RemoveAdmin_Output:
      type: object
      properties:
        status:
          type: string
          description: >-
            REMOVED: the admin left the cockpit, an employee keeping their
            employee access. INVITATION_REVOKED: the person was not an admin
            yet, and their pending admin invitation was revoked.
          enum:
            - REMOVED
            - INVITATION_REVOKED
      required:
        - status
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

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