> For the complete documentation index, see [llms.txt](https://docs.discloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.discloud.com/en/api-and-sdks/api-overview/team-apps.md).

# Team Apps

Manage through the API the applications a Team has shared with you.

## List team apps

> Returns other users' applications you moderate, with your permissions on each one

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"TeamAppListResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"apps":{"type":"array","items":{"$ref":"#/components/schemas/TeamApp"}}}},"TeamApp":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the application"},"name":{"type":"string","description":"Name of the application"},"type":{"type":"integer","description":"Type of the application (0 = bot, 1 = site)"},"online":{"type":"boolean","description":"Whether the application is currently online"},"ram":{"type":"integer","description":"RAM allocated to the application (in MB)"},"ramKilled":{"type":"boolean","description":"Whether the application was terminated due to RAM usage"},"exitCode":{"type":"integer","description":"Exit code of the application if it has stopped"},"lang":{"type":"string","description":"Programming language of the application"},"owner":{"type":"object","description":"Owner of the application","properties":{"name":{"type":"string","description":"Owner's name"},"avatar":{"type":"string","description":"URL of the owner's avatar"}}},"perms":{"type":"array","items":{"$ref":"#/components/schemas/AppModeratorPermission"},"description":"Your permissions on this application"}}},"AppModeratorPermission":{"type":"string","enum":["backup_app","commit_app","edit_ram","logs_app","restart_app","start_app","status_app","stop_app"]},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/team":{"get":{"tags":["Team Apps"],"summary":"List team apps","description":"Returns other users' applications you moderate, with your permissions on each one","operationId":"listTeamApps","responses":{"200":{"description":"Applications returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamAppListResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"You are not a moderator of any application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get team app status

> Returns the status of an application you moderate. Requires the status\_app permission.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"AppStatusResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"apps":{"oneOf":[{"$ref":"#/components/schemas/AppStatus"},{"type":"array","items":{"$ref":"#/components/schemas/AppStatus"}}]}}},"AppStatus":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the application"},"container":{"type":"string","description":"Status of the application container"},"cpu":{"type":"string","description":"Current CPU usage of the application"},"memory":{"type":"string","description":"Current memory usage and allocation"},"ssd":{"type":"string","description":"Storage space used by the application"},"netIO":{"type":"object","properties":{"down":{"type":"string","description":"Network download usage"},"up":{"type":"string","description":"Network upload usage"}}},"last_restart":{"type":"string","description":"Time since the last application restart"},"startedAt":{"type":"string","format":"date-time","description":"Timestamp when the application was started"}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}},"UploadErrorResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/team/{appID}/status":{"get":{"tags":["Team Apps"],"summary":"Get team app status","description":"Returns the status of an application you moderate. Requires the status_app permission.","operationId":"getTeamAppStatus","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application","schema":{"type":"string"}}],"responses":{"200":{"description":"Application status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStatusResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Application not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadErrorResponse"}}}}}}}}}
```

## Get team app logs

> Returns the logs of an application you moderate, or of all of them with "all". Requires the logs\_app permission.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"AppLogsResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"apps":{"oneOf":[{"$ref":"#/components/schemas/AppLogs"},{"type":"array","items":{"$ref":"#/components/schemas/AppLogs"}}]}}},"AppLogs":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the application"},"terminal":{"type":"object","properties":{"big":{"type":"string","description":"Complete application logs"},"small":{"type":"string","description":"Condensed application logs"},"url":{"type":"string","description":"URL to view logs online"}}}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/team/{appID}/logs":{"get":{"tags":["Team Apps"],"summary":"Get team app logs","description":"Returns the logs of an application you moderate, or of all of them with \"all\". Requires the logs_app permission.","operationId":"getTeamAppLogs","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application or \"all\" for all team apps","schema":{"type":"string"}}],"responses":{"200":{"description":"Logs retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppLogsResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get team app backup

> Generates and returns the backup of an application you moderate, or of all of them with "all". Requires the backup\_app permission.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"AppBackupResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"backups":{"oneOf":[{"$ref":"#/components/schemas/AppBackup"},{"type":"array","items":{"$ref":"#/components/schemas/AppBackup"}}]}}},"AppBackup":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the application"},"url":{"type":"string","description":"URL to download the application backup"},"status":{"type":"string","description":"Backup status (only present when appID is \"all\")"}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/team/{appID}/backup":{"get":{"tags":["Team Apps"],"summary":"Get team app backup","description":"Generates and returns the backup of an application you moderate, or of all of them with \"all\". Requires the backup_app permission.","operationId":"getTeamAppBackup","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application or \"all\" for all team apps","schema":{"type":"string"}}],"responses":{"200":{"description":"Backup generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppBackupResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Start team app

> Starts an application you moderate, or all of them with "all". Requires the start\_app permission.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"AppStartResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"appStatus":{"$ref":"#/components/schemas/AppStartStatus"},"apps":{"type":"object","description":"Per-application result (only present when appID is \"all\")","properties":{"started":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were started"},"alreadyOnline":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were already online"},"alreadyInProcess":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were already being processed"}}}}},"AppStartStatus":{"type":"object","properties":{"online":{"type":"boolean","description":"Whether the application is online"},"ramKilled":{"type":"boolean","description":"Whether the application was terminated due to RAM issues"},"exitCode":{"type":"integer","description":"The exit code of the application process"}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/team/{appID}/start":{"put":{"tags":["Team Apps"],"summary":"Start team app","description":"Starts an application you moderate, or all of them with \"all\". Requires the start_app permission.","operationId":"startTeamApp","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application or \"all\" for all team apps","schema":{"type":"string"}}],"responses":{"200":{"description":"Application start response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStartResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Restart team app

> Restarts an application you moderate, or all of them with "all". Requires the restart\_app permission.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"AppRestartResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"apps":{"type":"object","description":"Per-application result (only present when appID is \"all\")","properties":{"restarted":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were restarted"},"alreadyOffline":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were offline"},"alreadyInProcess":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were already being processed"}}}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/team/{appID}/restart":{"put":{"tags":["Team Apps"],"summary":"Restart team app","description":"Restarts an application you moderate, or all of them with \"all\". Requires the restart_app permission.","operationId":"restartTeamApp","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application or \"all\" for all team apps","schema":{"type":"string"}}],"responses":{"200":{"description":"Application restart response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRestartResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Stop team app

> Stops an application you moderate, or all of them with "all". Requires the stop\_app permission.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"AppStopResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"apps":{"type":"object","description":"Per-application result (only present when appID is \"all\")","properties":{"stoped":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were stopped"},"alreadyOffline":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were already offline"},"alreadyInProcess":{"type":"array","items":{"type":"string"},"description":"IDs of the applications that were already being processed"}}}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/team/{appID}/stop":{"put":{"tags":["Team Apps"],"summary":"Stop team app","description":"Stops an application you moderate, or all of them with \"all\". Requires the stop_app permission.","operationId":"stopTeamApp","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application or \"all\" for all team apps","schema":{"type":"string"}}],"responses":{"200":{"description":"Application stop response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppStopResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Update team app RAM

> Updates the RAM of an application you moderate. Requires the edit\_ram permission.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"AppRamUpdateRequest":{"type":"object","required":["ramMB"],"properties":{"ramMB":{"type":"integer","description":"The amount of RAM in MB to allocate to the application. Minimum of 100 MB for bots and 512 MB for sites."}}},"AppRamUpdateResponse":{"type":"object","properties":{"status":{"type":"string"},"statusCode":{"type":"integer"},"message":{"type":"string"}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/team/{appID}/ram":{"put":{"tags":["Team Apps"],"summary":"Update team app RAM","description":"Updates the RAM of an application you moderate. Requires the edit_ram permission.","operationId":"updateTeamAppRam","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRamUpdateRequest"}}}},"responses":{"200":{"description":"RAM update response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRamUpdateResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Update team app code

> Uploads a new version of the code of an application you moderate. Requires the commit\_app permission.

```json
{"openapi":"3.0.3","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Apps","description":"Operations about other users' applications you moderate"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"AppCommitResponse":{"type":"object","properties":{"status":{"type":"string"},"statusCode":{"type":"integer"},"message":{"type":"string"},"logs":{"type":"string","description":"Application logs, if it fails to start"}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/team/{appID}/commit":{"put":{"tags":["Team Apps"],"summary":"Update team app code","description":"Uploads a new version of the code of an application you moderate. Requires the commit_app permission.","operationId":"commitTeamAppChanges","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"Application file to upload (.ZIP format)"}}}}}},"responses":{"200":{"description":"Commit response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppCommitResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
