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
FieldTypeDescription
idsnowflakeThe ID of the team
namestringThe name of the team
icon 1?stringThe team's icon hash
owner_user_idsnowflakeThe ID of the team's owner
members? 2array[team member object]The members in the team
payout_account_status? 3integerThe status of the team's payout account
stripe_connect_account_id? 4stringThe 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
ValueNameDescription
1UNSUBMITTEDThe team has not submitted a payout account application
2PENDINGThe team's payout account application is pending approval
3ACTION_REQUIREDThe team's payout account requires action to receive payouts
4ACTIVEThe team's payout account is active and can receive payouts
5BLOCKEDThe team's payout account is blocked and cannot receive payouts
6SUSPENDEDThe 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
FieldTypeDescription
userpartial user objectThe user this team member represents
team_idsnowflakeThe ID of the team the user is a member of
membership_stateintegerThe user's team membership state
rolestringThe user's role on the team
Membership State
ValueNameDescription
1INVITEDThe user is invited
2ACCEPTEDThe 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
ValueDescription
adminAdmins have similar access to owners, except they cannot take destructive actions on the team or team-owned apps.
developerDevelopers 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_onlyRead-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
FieldTypeDescription
idsnowflakeThe ID of the payout
user_idsnowflakeThe ID of the user who receives the payout
amountintegerThe amount of the payout
statusintegerThe status of the payout
period_startISO8601 timestampWhen the payout period started
period_end?ISO8601 timestampWhen the payout period ended
payout_date?ISO8601 timestampWhen the payout was made
latest_tipalti_submission_response?objectThe latest response from Tipalti
Team Payout Status
ValueNameDescription
1OPENThe payout is open
2PAIDThe payout has been paid out
3PENDINGThe payout is pending completion
4MANUALThe payout has been manually made
5CANCELLEDThe payout has been cancelled
6DEFERREDThe payout has been deferred
7DEFERRED_INTERNALThe payout has been deferred internally
8PROCESSINGThe payout is processing
9ERRORThe payout has errored
10REJECTEDThe payout has been rejected
11RISK_REVIEWThe payout is under risk review
12SUBMITTEDThe payout has been submitted for completion
13PENDING_FUNDSThe 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
FieldTypeDescription
idsnowflakeThe ID of the company
namestringThe 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
FieldTypeDescription
include_payout_account_status?booleanWhether 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
FieldTypeDescription
namestringThe 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
FieldTypeDescription
name?stringThe name of the team
icon??image dataThe team's icon
owner_user_id?snowflakeThe 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
FieldTypeDescription
token 1stringThe 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
FieldTypeDescription
usernamestringThe username of the user to invite
discriminator 1?stringThe 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
FieldTypeDescription
role?stringThe 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
FieldTypeDescription
country_code?stringThe ISO 3166-1 alpha-2 country code country code to use
Response Body
FieldTypeDescription
stripe_connect_redirect_urlstringThe 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
FieldTypeDescription
urlstringThe 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
FieldTypeDescription
limit?numberMax number of payouts to return (1-96, default 96)
after?snowflakeReturn 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
FieldTypeDescription
typestringThe type of report to generate
Team Payout Report Type
ValueDescription
skuReport by SKU
transactionReport 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
FieldTypeDescription
query?stringQuery 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
FieldTypeDescription
namestringThe name of the company