apicheats.dev Cheat sheet Raw .md
POST

Try POST /orgs/{org}/invitations — GitHub API

GitHub playground

Create an organization invitation

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

4 body fields
  • invitee_id · optional · integer — **Required unless you provide `email`**. GitHub user ID for the person you are inviting.
  • email · optional · string — **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user.
  • role · optional · string — The role for the new member. * `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. * `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. * `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. * `reinstate` - The previous role assigned to the invitee before they were removed from your organization. Can be one of the roles listed above. Only works if the invitee was previously part of your organization.
  • team_ids · optional · integer[] — Specify IDs for the teams you want to invite new members to.