v1

latestOpenAPI 3.0.3Apache 2.02026-07-142201861.5 MB
Teams

Add an Organization Member to a Team

This request can return various success codes depending on the context of the team:

  • 201: The member has been successfully added.
  • 202: The member needs permission to join the team and an access request has been generated.
  • 204: The member is already on the team.

If the team is provisioned through an identity provider, the member cannot join the team through Sentry.

Note the permission scopes vary depending on the organization setting "Open Membership" and the type of authorization token. The following table outlines the accepted scopes.

<table style="width: 100%;"> <thead> <tr> <th style="width: 33%;"></th> <th colspan="2" style="text-align: center; font-weight: bold; width: 33%;">Open Membership</th> </tr> </thead> <tbody> <tr> <td style="width: 34%;"></td> <td style="text-align: center; font-weight: bold; width: 33%;">On</td> <td style="text-align: center; font-weight: bold; width: 33%;">Off</td> </tr> <tr> <td style="text-align: center; font-weight: bold; vertical-align: middle;"><a href="https://docs.sentry.io/account/auth-tokens/#internal-integrations">Internal Integration Token</a></td> <td style="text-align: left; width: 33%;"> <ul style="list-style-type: none; padding-left: 0;"> <li><strong style="color: #9c5f99;">&bull; org:read</strong></li> </ul> </td> <td style="text-align: left; width: 33%;"> <ul style="list-style-type: none; padding-left: 0;"> <li><strong style="color: #9c5f99;">&bull; org:write</strong></li> <li><strong style="color: #9c5f99;">&bull; team:write</strong></li> </ul> </td> </tr> <tr> <td style="text-align: center; font-weight: bold; vertical-align: middle;"><a href="https://docs.sentry.io/account/auth-tokens/#user-auth-tokens">User Auth Token</a></td> <td style="text-align: left; width: 33%;"> <ul style="list-style-type: none; padding-left: 0;"> <li><strong style="color: #9c5f99;">&bull; org:read</strong></li> </ul> </td> <td style="text-align: left; width: 33%;"> <ul style="list-style-type: none; padding-left: 0;"> <li><strong style="color: #9c5f99;">&bull; org:read*</strong></li> <li><strong style="color: #9c5f99;">&bull; org:write</strong></li> <li><strong style="color: #9c5f99;">&bull; org:read +</strong></li> <li><strong style="color: #9c5f99;">&nbsp; &nbsp;team:write**</strong></li> </ul> </td> </tr> </tbody> </table>

*Organization members are restricted to this scope. When sending a request, it will always return a 202 and request an invite to the team.

**Team Admins must have both org:read and team:write scopes in their user authorization token to add members to their teams.

post/api/0/organizations/{organization_id_or_slug}/members/{member_id}/teams/{team_id_or_slug}/

Path parameters

organization_id_or_slugstring required

The ID or slug of the organization the resource belongs to.

member_idstring required

The ID of the organization member to add to the team

team_id_or_slugstring required

The ID or slug of the team the resource belongs to.

Response

idstring required
slugstring required
namestring required
dateCreatedstring date-time nullable required
isMemberboolean required
teamRolestring nullable required
flagsobject required
accessstring[] required
hasAccessboolean required
isPendingboolean required
memberCountinteger required