GET
/user/memberships/orgs/{org}Get an organization membership for the authenticated user
If the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a 404 is returned. This endpoint will return a 403 if the request is made by a GitHub App that is blocked by the organization.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
200Response
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
Error handling
A 403 is returned: Forbidden. A 404 is returned: Resource not found.
Was this helpful?