Teams Resource
Teams are groups of developers on Discord who want to collaborate on apps. On other platforms, these may be referred to as "organizations", "companies", or "teams". Discord went with the name Teams because it best encompassed all the awesome conglomerates of devs that work together to make awesome things on Discord. Also, none of you ever got picked for kickball in gym class, so now you get to be on a team.
Teams allow you and other Discord users to share access to apps. No more sharing login credentials in order to reset the token on a bot that your friend owns but you work on, or other such cases.
For game developers, this means that you can get your engineers access to your app for credentials they may need, your marketing folks access to store page management, and your finance people access to sales and performance metrics.
Team Object
Team Structure
Field | Type | Description |
---|---|---|
id | snowflake | The ID of the team |
name | string | The name of the team |
icon 1 | ?string | The team's icon hash |
owner_user_id | snowflake | The ID of the team's owner |
members? 2 | array[team member object] | The members in the team |
payout_account_status? 3 | integer | The status of the team's payout account |
stripe_connect_account_id? 4 | string | The ID of the team's Stripe Connect account |
1 The default team icon uses the same images as default avatars and can be calculated using team_id % 5
.
2 Only provided in the application object.
3 Only included when fetched from Get Team or Get Teams with include_payout_account_status
set to true
.
4 Only included when fetched from Get Team.
Team Payout Account Status
Value | Name | Description |
---|---|---|
1 | UNSUBMITTED | The team has not submitted a payout account application |
2 | PENDING | The team's payout account application is pending approval |
3 | ACTION_REQUIRED | The team's payout account requires action to receive payouts |
4 | ACTIVE | The team's payout account is active and can receive payouts |
5 | BLOCKED | The team's payout account is blocked and cannot receive payouts |
6 | SUSPENDED | The team's payout account is suspended and cannot receive payouts |
Example Team
{"id": "1110738998453837384","icon": null,"name": "Power","owner_user_id": "852892297661906993","payout_account_status": 1}
Team Member Object
Team Member Structure
Field | Type | Description |
---|---|---|
user | partial user object | The user this team member represents |
team_id | snowflake | The ID of the team the user is a member of |
membership_state | integer | The user's team membership state |
role | string | The user's role on the team |
Membership State
Value | Name | Description |
---|---|---|
1 | INVITED | The user is invited |
2 | ACCEPTED | The user has accepted the invite |
Team Member Roles
Team members can be one of four roles (owner, admin, developer, and read-only), and each role inherits the access of those below it. Roles for team members can be configured under Team Members in a team's settings.
Team Member Role Types
Value | Description |
---|---|
admin | Admins have similar access to owners, except they cannot take destructive actions on the team or team-owned apps. |
developer | Developers can access information about team-owned apps, like the client secret or public key. They can also take limited actions on team-owned apps, like configuring interaction endpoints or resetting the bot token. Members with the Developer role cannot manage the team or its members, or take destructive actions on team-owned apps. |
read_only | Read-only members can access information about a team and any team-owned apps. Some examples include getting the IDs of applications and exporting payout records. |
Example Team Member
{"user": {"id": "852892297661906993","username": "alien","global_name": "Alien","avatar": "05145cc5646fbcba277b6d5ea2030610","discriminator": "0","public_flags": 64,"avatar_decoration_data": null},"team_id": "1110738998453870732","membership_state": 2,"role": "admin"}
Team Payout Object
Team Payout Structure
Field | Type | Description |
---|---|---|
id | snowflake | The ID of the payout |
user_id | snowflake | The ID of the user who receives the payout |
amount | integer | The amount of the payout |
status | integer | The status of the payout |
period_start | ISO8601 timestamp | When the payout period started |
period_end | ?ISO8601 timestamp | When the payout period ended |
payout_date | ?ISO8601 timestamp | When the payout was made |
latest_tipalti_submission_response? | object | The latest response from Tipalti |
Team Payout Status
Value | Name | Description |
---|---|---|
1 | OPEN | The payout is open |
2 | PAID | The payout has been paid out |
3 | PENDING | The payout is pending completion |
4 | MANUAL | The payout has been manually made |
5 | CANCELLED | The payout has been cancelled |
6 | DEFERRED | The payout has been deferred |
7 | DEFERRED_INTERNAL | The payout has been deferred internally |
8 | PROCESSING | The payout is processing |
9 | ERROR | The payout has errored |
10 | REJECTED | The payout has been rejected |
11 | RISK_REVIEW | The payout is under risk review |
12 | SUBMITTED | The payout has been submitted for completion |
13 | PENDING_FUNDS | The payout is pending sufficient funds |
Example Team Payout
{"id": "1110738998453870732","user_id": "852892297661906993","amount": 1000000,"status": 1,"period_start": "2021-01-01","period_end": null,"payout_date": null}
Company Object
A development/publishing company working on a game on Discord.
Company Structure
Field | Type | Description |
---|---|---|
id | snowflake | The ID of the company |
name | string | The name of the company |
Example Company
{"id": "1058932127820939295","name": "AlienTec"}
Endpoints
Get Teams
GET
/teams
Returns a list of team objects that the current user is a member of.
Query String Params
Field | Type | Description |
---|---|---|
include_payout_account_status? | boolean | Whether to include team payout account status in the response (default false) |
Create Team
POST
/teams
Creates a new team. Returns a team object on success. Users can join a maximum of 30 teams.
JSON Params
Field | Type | Description |
---|---|---|
name | string | The name of the team |
Get Team
GET
/teams/{team.id}
Returns a team object for the given team ID.
Modify Team
PATCH
/teams/{team.id}
Modifies a team. User must be an admin of the team. Returns the updated team object on success.
JSON Params
Field | Type | Description |
---|---|---|
name? | string | The name of the team |
icon? | ?image data | The team's icon |
owner_user_id? | snowflake | The ID of the team's owner (must be the current owner) |
Delete Team
POST
/teams/{team.id}/delete
Deletes a team permanently. User must be the owner of the team. Returns a 204 empty response on success.
Accept Team Invite
POST
/teams/invite/accept
Accepts an invite to join a team. Returns a team object on success. Users can join a maximum of 30 teams.
JSON Params
Field | Type | Description |
---|---|---|
token 1 | string | The team invite token |
1 This token can be retrieved by visiting the emailed https://click.discord.com/
link and extracting the #token
URI fragment from the redirect URL.
Get Team Members
GET
/teams/{team.id}/members
Returns a list of team member objects for the given team ID.
Add Team Member
POST
/teams/{team.id}/members
Invites a user to the team. User must be an admin of the team. Returns a team member object on success.
JSON Params
Field | Type | Description |
---|---|---|
username | string | The username of the user to invite |
discriminator 1 | ?string | The discriminator of the user to invite, if not migrated |
1 null
for migrated users. See the section on Discord's new username system for more information.
Modify Team Member
PATCH
/teams/{team.id}/members/{user.id}
Modifies a team member. User must be an admin of the team. Returns the updated team member object on success.
JSON Params
Field | Type | Description |
---|---|---|
role? | string | The user's role on the team |
Remove Team Member
DELETE
/teams/{team.id}/members/{user.id}
Removes a team member. User must be the an admin of the team unless removing themselves. Returns a 204 empty response on success.
Get Team Applications
GET
/teams/{team.id}/applications
Returns a list of application objects for the given team ID.
Get Team Stripe Connect URL
POST
/teams/{team.id}/stripe/connect/redirect-url
Returns a link that can be used to access the team's Stripe Connect payout account dashboard.
JSON Params
Field | Type | Description |
---|---|---|
country_code? | string | The ISO 3166-1 alpha-2 country code country code to use |
Response Body
Field | Type | Description |
---|---|---|
stripe_connect_redirect_url | string | The Stripe Connect redirect URL |
Example Response
{"stripe_connect_redirect_url": "https://connect.stripe.com/setup/e/acct_123456/789abcd"}
Get Team Payout Onboarding
GET
/teams/{team.id}/payouts/onboarding
Returns a link that can be embedded in an IFrame to allow the user to access the team's Tipalti payout account dashboard. User must be the owner of the team.
Response Body
Field | Type | Description |
---|---|---|
url | string | The payee dashboard URL |
Example Response
{"url": "https://ui2.tipalti.com/payeedashboard/home?ts=12345&idap=10418817887227111107389984538707326773&payer=Discord&hashkey=123456abcd"}
Get Team Payouts
GET
/teams/{team.id}/payouts
Returns a list of team payout objects for the given team ID.
Query String Params
Field | Type | Description |
---|---|---|
limit? | number | Max number of payouts to return (1-96, default 96) |
after? | snowflake | Return payouts after this ID |
Get Team Payout Report
GET
/teams/{team.id}/payouts/{payout.id}/report
Returns a CSV file containing the payout report for the given payout ID.
Query String Params
Field | Type | Description |
---|---|---|
type | string | The type of report to generate |
Team Payout Report Type
Value | Description |
---|---|
sku | Report by SKU |
transaction | Report by transaction |
Search Companies
GET
/companies
Returns a list of company objects that match the given query. If no results are found, returns a 204 empty response.
Query String Params
Field | Type | Description |
---|---|---|
query? | string | Query to match company names against |
Create Company
POST
/teams/{team.id}/companies
Creates a new company under this team. Returns a company object on success.
JSON Params
Field | Type | Description |
---|---|---|
name | string | The name of the company |