PUT /orgs/{org}/memberships/{username}
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
pendinguntil they accept the invitation. -
Authenticated users can update a user's membership by passing the
roleparameter. If the authenticated user changes a member's role toadmin, 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 tomember, no email will be sent.
Rate limits
To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 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.
Servers
- https://api.github.com
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
username |
String | Yes |
The handle for the GitHub user account. |
org |
String | Yes |
The organization name. The name is not case sensitive. |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
role |
String | No |
The role to give the user in the organization. Can be one of:
Valid values:
Default value: "member" |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.