From 8faac04f977da5bd33a7d87b988b38127119677d Mon Sep 17 00:00:00 2001 From: Richard Larcombe Date: Mon, 6 Oct 2025 14:42:08 +0100 Subject: [PATCH 1/2] Updated API docs --- source/includes/_team_users.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/includes/_team_users.md b/source/includes/_team_users.md index 2784658e88e..4870399e3ad 100644 --- a/source/includes/_team_users.md +++ b/source/includes/_team_users.md @@ -183,7 +183,6 @@ end user_details = { userId: 1, - isPrimary: true } result = Learnamp::TeamUsers.new(token).add(1, user_details) @@ -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 | Simple | Optional: Either "Simple" (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, From 76d7d0d1ab571e22b5003a856c17122bbd99214c Mon Sep 17 00:00:00 2001 From: Richard Larcombe Date: Tue, 7 Oct 2025 11:05:21 +0100 Subject: [PATCH 2/2] PR feedback --- source/includes/_team_users.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/includes/_team_users.md b/source/includes/_team_users.md index 4870399e3ad..e01f593adb8 100644 --- a/source/includes/_team_users.md +++ b/source/includes/_team_users.md @@ -202,7 +202,7 @@ This endpoint requires the `team_users:create` scope. Parameter | Example value | Description --------- | ------- | ----------- userId | 1 | User ID of user to add to team -response | Simple | Optional: Either "Simple" (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. +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: @@ -385,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,