Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion source/includes/_team_users.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ end

user_details = {
userId: 1,
isPrimary: true
}

result = Learnamp::TeamUsers.new(token).add(1, user_details)
Expand All @@ -198,8 +197,25 @@ Add a user to a team.
### Required Scope
This endpoint requires the `team_users:create` scope.

### Data in Body

Parameter | Example value | Description
--------- | ------- | -----------
userId | 1 | User ID of user to add to team
response | Teams::Simple | Optional: (blank value is the default) or "Teams::Simple" or "Teams::Extended". Value of "Teams::Simple" will include basic team information in the response. Value of "Teams::Extended: will include full team information in the response, including full list of users, sub-teams and tags in the JSON response. Only use the "Teams::Extended" response if all this data is required.

> 201 Created - successful response:

```json
{
"id": 1,
"teamId": 3,
"userId": 1
}
```

> 201 Created - successful response, using response = Teams::Extended param

```json
{
"id": 1,
Expand Down Expand Up @@ -369,11 +385,22 @@ teamId | 1200 | ID of the team
teamName | "Marketing" | Name of the team
userId | 1 | User ID of user to add to team
userEmail | "user@email.com" | Email of the new team member
response | Teams::Simple | Optional: (blank value is the default) or "Teams::Simple" or "Teams::Extended". Value of "Teams::Simple" will include basic team information in the response. Value of "Teams::Extended: will include full team information in the response, including full list of users, sub-teams and tags in the JSON response. Only use the "Teams::Extended" response if all this data is required.

Parameters `teamId` and `teamName` are mutually exclusive - only one of them can be present in the request payload. Same rule applies for `userId` and `userEmail`.

> 201 Created - successful response:

```json
{
"id": 1,
"teamId": 3,
"userId": 1
}
```

> 201 Created - successful response, using response = Teams::Extended param

```json
{
"id": 1,
Expand Down