> ## 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.

# Invite an admin to the cockpit

> Invite a person to your company's Primo cockpit as an admin (role org:admin), by email or by employee: an employee who already has a Primo login is promoted, anyone else gets Primo's invitation email, whose text is fixed. Answers ALREADY_IN_COCKPIT, and sends nothing, for a person already in the cockpit on a role other than employee, whose role is left as it is, and ALREADY_INVITED, sending nothing again, for a person whose invitation is still pending. To find an employee by name, use getEmployees with its search first; to list the current admins, use getAdmins.

Key: WriteScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /admins/invitations
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/invitations:
    post:
      tags:
        - Admins
      summary: Invite an admin to the cockpit
      description: >-
        Invite a person to your company's Primo cockpit as an admin (role
        org:admin), by email or by employee: an employee who already has a Primo
        login is promoted, anyone else gets Primo's invitation email, whose text
        is fixed. Answers ALREADY_IN_COCKPIT, and sends nothing, for a person
        already in the cockpit on a role other than employee, whose role is left
        as it is, and ALREADY_INVITED, sending nothing again, for a person whose
        invitation is still pending. To find an employee by name, use
        getEmployees with its search first; to list the current admins, use
        getAdmins.
      operationId: inviteAdmin
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteAdminBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteAdmin_Output'
components:
  schemas:
    InviteAdminBody:
      type: object
      properties:
        email:
          description: The email to invite. Give it, or `employeeId`, 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,}$
        employeeId:
          description: >-
            The employee to invite, as getEmployees returns them. Give it, or
            `email`, not both.
          type: string
          pattern: ^[a-f\d]{24}$
    InviteAdmin_Output:
      type: object
      properties:
        status:
          type: string
          description: >-
            INVITED: the invitation was sent, or the employee promoted.
            ALREADY_INVITED: an invitation is still pending, nothing was sent.
            ALREADY_IN_COCKPIT: already in the cockpit on a role other than
            employee, nothing was sent.
          enum:
            - INVITED
            - ALREADY_INVITED
            - ALREADY_IN_COCKPIT
      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.