Team
Lists the user's teams (owned and where the user is a member).
Teams listed successfully
Authentication error
GET /v2/teams HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Teams listed successfully",
"data": [
{
"_id": "team1719010867306",
"name": "My Team",
"isOwner": true
}
]
}Creates a new team. Requires a compatible plan.
Team name (max. 50 characters)
Team created successfully
Invalid data
Authentication error
Plan does not allow creating teams or limit reached
POST /v2/teams HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"name": "My Team",
"description": "Development team"
}{
"status": "ok",
"message": "Team created successfully",
"data": {
"_id": "team1719010867306",
"ownerID": "470638301895294976",
"name": "My Team"
}
}Lists the apps accessible by the user through the teams they belong to.
Accessible apps listed successfully
Authentication error
GET /v2/teams/apps HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Apps accessible via teams",
"data": [
{
"_id": "1719010867306",
"nameTAG": "My Bot",
"teamID": "team1719010867306"
}
]
}Returns the permissions associated with a role (admin, developer or viewer).
Role (admin, developer or viewer)
Role permissions
Invalid role
Authentication error
GET /v2/teams/roles/{role}/permissions HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Permissions for role admin",
"data": {
"role": "admin",
"permissions": [
"config_app",
"start_stop",
"view_logs"
]
}
}Returns the details of a team, including members and projects.
Team ID
Team details
Authentication error
No permission to view the team
Team not found
GET /v2/teams/{teamID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Team details",
"data": {
"team": {
"_id": "team1719010867306",
"name": "My Team"
},
"members": [
{
"userID": "470638301895294976",
"role": "owner"
}
],
"projects": [
{
"_id": "proj1719010867306",
"name": "My Project"
}
]
}
}Removes a team. Owner only.
Team ID
Team deleted successfully
Authentication error
Not the team owner
Team not found
DELETE /v2/teams/{teamID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Team deleted successfully"
}Updates the name and/or description of a team. Owner only.
Team ID
Team updated successfully
Invalid data
Authentication error
Not the team owner
Team not found
PATCH /v2/teams/{teamID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 23
{
"name": "Renamed Team"
}{
"status": "ok",
"message": "Team updated successfully",
"data": {
"_id": "team1719010867306",
"name": "Renamed Team"
}
}Lists the members of a team.
Team ID
Members listed successfully
Authentication error
No permission to view the members
Team not found
GET /v2/teams/{teamID}/members HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Members listed successfully",
"data": [
{
"userID": "470638301895294976",
"role": "owner",
"username": "owner"
}
]
}Adds a member to the team with a specific role.
Team ID
admin, developer or viewer
Member added successfully
Invalid data
Authentication error
No permission to manage members
Team or user not found
POST /v2/teams/{teamID}/members HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 50
{
"userID": "123456789012345678",
"role": "developer"
}{
"status": "ok",
"message": "Member added successfully",
"data": {
"userID": "123456789012345678",
"role": "developer",
"username": "johndoe"
}
}Removes a member from the team.
Team ID
Member user ID
Member removed successfully
Authentication error
No permission to manage members
Team or member not found
DELETE /v2/teams/{teamID}/members/{memberUserID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "Member removed successfully"
}Updates the role of a team member.
Team ID
Member user ID
admin, developer or viewer
Role updated successfully
Invalid data
Authentication error
No permission to manage members
Team or member not found
PATCH /v2/teams/{teamID}/members/{memberUserID} HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"role": "admin"
}{
"status": "ok",
"message": "Role updated successfully",
"data": {
"userID": "123456789012345678",
"role": "admin"
}
}Removes the current user from the team. The owner cannot leave.
Team ID
Left the team successfully
Authentication error
The owner cannot leave the team
Team not found or not a member
POST /v2/teams/{teamID}/leave HTTP/1.1
Host: api.discloud.app
api-token: YOUR_API_KEY
Accept: */*
{
"status": "ok",
"message": "You have left the team successfully"
}Last updated