Github API - Test Config

PUT /orgs/{org}/memberships/{username}
users
orgs

Only authenticated organization owners can add a member to the organization or update the member's role.

  • If the authenticated user is adding a member to the organization, the invited user will receive an email inviting them to the organization. The user's membership status will be pending until they accept the invitation.

  • Authenticated users can update a user's membership by passing the role parameter. If the authenticated user changes a member's role to admin, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to member, no email will be sent.

Rate limits

To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
Set organization membership for a user

Arguments
key org

org [scalar]

The organization name. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

key username

username [scalar]

The handle for the GitHub user account.

API:
Github Open API
(version: 1.1.4)

Returns
200 application/json org-membership

org-membership [object]

Org Membership

Attributes
organization organization-simple

organization_url string

permissions 2042

role string

The user's membership type in the organization.

state string

The state of the member in the organization. The pending state indicates the user has not yet accepted an invitation.

url string

API:
Github Open API
(version: 1.1.4)
403 forbidden

forbidden [scalar]

Forbidden

API:
Github Open API
(version: 1.1.4)
422 validation_failed

validation_failed [scalar]

Validation failed, or the endpoint has been spammed.

API:
Github Open API
(version: 1.1.4)
API:
Github Open API
(version: 1.1.4)