PATCH
/user/memberships/orgs/{org}Update an organization membership for the authenticated user
Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
statestringrequired
The state that the membership should be in. Only `"active"` will be accepted.
200The user's organization invitation was accepted synchronously.
urlstringrequired
statestringrequired
The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation.
rolestringrequired
The user's membership type in the organization.
direct_membershipbooleanoptional
Whether the user has direct membership in the organization.
enterprise_teams_providing_indirect_membershiparray<string>optional
The slugs of the enterprise teams providing the user with indirect membership in the organization.
A limit of 100 enterprise team slugs is returned.
organization_urlstringrequired
organizationobjectrequired
A GitHub organization.
userobjectrequired
A GitHub user.
permissionsobjectoptional
202The acceptance of the user's organization invitation is being processed asynchronously.
urlstringrequired
statestringrequired
The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation.
rolestringrequired
The user's membership type in the organization.
direct_membershipbooleanoptional
Whether the user has direct membership in the organization.
enterprise_teams_providing_indirect_membershiparray<string>optional
The slugs of the enterprise teams providing the user with indirect membership in the organization.
A limit of 100 enterprise team slugs is returned.
organization_urlstringrequired
organizationobjectrequired
A GitHub organization.
userobjectrequired
A GitHub user.
permissionsobjectoptional
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed.
Was this helpful?