# Team Management

## Get application team members

> Retrieves the list of team members for a specific application

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Management","description":"Operations about team management"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"TeamResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string","description":"Present only in error responses"},"team":{"type":"array","items":{"$ref":"#/components/schemas/TeamMember"}}}},"TeamMember":{"type":"object","properties":{"modID":{"type":"string","description":"The unique identifier of the team member"},"perms":{"type":"array","items":{"type":"string"},"description":"Permissions granted to the team member"}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/app/{appID}/team":{"get":{"tags":["Team Management"],"summary":"Get application team members","description":"Retrieves the list of team members for a specific application","operationId":"getAppTeam","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application to retrieve team for","schema":{"type":"string"}}],"responses":{"200":{"description":"Team retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Team not found or plan limitation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"team":{"type":"array","items":{"type":"object"},"description":"Present only in no team members response"}}}}}}}}}}}
```

## Add team member

> Adds a new team member to an application with specified permissions

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Management","description":"Operations about team management"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"TeamMemberAddRequest":{"type":"object","required":["modID","perms"],"properties":{"modID":{"type":"string","description":"The unique identifier of the user to add as a team member"},"perms":{"type":"array","items":{"type":"string","enum":["start_app","stop_app","restart_app","logs_app","commit_app","edit_ram","backup_app","status_app"]},"description":"Permissions to grant to the team member"}}},"TeamMemberAddResponse":{"type":"object","properties":{"status":{"type":"string"},"app":{"type":"object","properties":{"modID":{"type":"string","description":"The unique identifier of the team member"},"appID":{"type":"string","description":"The unique identifier of the application"},"perms":{"type":"array","items":{"type":"string"},"description":"Permissions granted to the team member"}}}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/app/{appID}/team":{"post":{"tags":["Team Management"],"summary":"Add team member","description":"Adds a new team member to an application with specified permissions","operationId":"addAppTeamMember","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application to add a team member to","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberAddRequest"}}}},"responses":{"200":{"description":"Team member added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberAddResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found errors","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Conflict error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}
```

## Update team member permissions

> Updates permissions for an existing team member of an application

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Management","description":"Operations about team management"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"TeamMemberAddRequest":{"type":"object","required":["modID","perms"],"properties":{"modID":{"type":"string","description":"The unique identifier of the user to add as a team member"},"perms":{"type":"array","items":{"type":"string","enum":["start_app","stop_app","restart_app","logs_app","commit_app","edit_ram","backup_app","status_app"]},"description":"Permissions to grant to the team member"}}},"TeamMemberAddResponse":{"type":"object","properties":{"status":{"type":"string"},"app":{"type":"object","properties":{"modID":{"type":"string","description":"The unique identifier of the team member"},"appID":{"type":"string","description":"The unique identifier of the application"},"perms":{"type":"array","items":{"type":"string"},"description":"Permissions granted to the team member"}}}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/app/{appID}/team":{"put":{"tags":["Team Management"],"summary":"Update team member permissions","description":"Updates permissions for an existing team member of an application","operationId":"updateAppTeamMember","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application to update team member in","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberAddRequest"}}}},"responses":{"200":{"description":"Team member permissions updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberAddResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found errors","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}
```

## Remove team member

> Removes a team member from an application

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Team Management","description":"Operations about team management"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"TeamMemberRemoveResponse":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}},"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/app/{appID}/team/{modID}":{"delete":{"tags":["Team Management"],"summary":"Remove team member","description":"Removes a team member from an application","operationId":"removeAppTeamMember","parameters":[{"name":"appID","in":"path","required":true,"description":"ID of the application to remove the team member from","schema":{"type":"string"}},{"name":"modID","in":"path","required":true,"description":"ID of the team member to remove","schema":{"type":"string"}}],"responses":{"200":{"description":"Team member removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberRemoveResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found errors","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.discloud.com/en/api-and-integrations/api-overview/team-management-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
