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;">• 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;">• org:write</strong></li> <li><strong style="color: #9c5f99;">• 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;">• 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;">• org:read*</strong></li> <li><strong style="color: #9c5f99;">• org:write</strong></li> <li><strong style="color: #9c5f99;">• org:read +</strong></li> <li><strong style="color: #9c5f99;"> 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.
Path parameters
The ID or slug of the organization the resource belongs to.
The ID of the organization member to add to the team
The ID or slug of the team the resource belongs to.