Change team
put/v1-beta/users/changeTeamThis API allows you to move users from one team to another. You can also set it to either transfer their documents to another user or retain them.
Code snippet
curl --location --request PUT 'https://api.boldsign.com/v1-beta/users/changeTeam?userId=d98c14c5-60e0-411f-b02d-b39ca83c0da8' \
--header 'accept: */*' \
--header 'X-API-KEY: {apikey}' \
--header 'Content-Type: application/json' \
--data '{
"toTeamId": "9bca0986-xxx-xxxx-xxx-30ffe3a2c5b7",
"transferDocumentsToUserId": "8117b911-xxx-xxxx-xxx-819aab1e2bd5"
}'
// requires beta version of the SDK at least v4.10.18-beta
var apiClient = new ApiClient("https://api.boldsign.com", "{apikey}");
var userClient = new UserClient(apiClient);
var changeTeam = new ChangeTeam()
{
ToTeamId = "9bca0986-xxx-xxxx-xxx-30ffe3a2c5b7",
TransferDocumentsToUserId = "8117b911-xxx-xxxx-xxx-819aab1e2bd5"
};
await userClient.ChangeTeam("UserId", changeTeam);
import requests
import json
url = "https://api.boldsign.com/v1-beta/users/changeTeam?userId=d98c14c5-60e0-411f-b02d-b39ca83c0da8"
payload = {
"toTeamId": "9bca0986-xxx-xxxx-xxx-30ffe3a2c5b7",
"transferDocumentsToUserId": "8117b911-xxx-xxxx-xxx-819aab1e2bd5"
}
headers = {
"accept": "*/*",
"X-API-KEY": "{your API key}",
"Content-Type": "application/json",
}
response = requests.put(url, headers=headers, data=json.dumps(payload))
const axios = require('axios');
axios
.put(
'https://api.boldsign.com/v1-beta/users/changeTeam?userId=d98c14c5-60e0-411f-b02d-b39ca83c0da8',
{
"toTeamId": "9bca0986-xxx-xxxx-xxx-30ffe3a2c5b7",
"transferDocumentsToUserId": "8117b911-xxx-xxxx-xxx-819aab1e2bd5",
},
{
headers: {
accept: '*/*',
'X-API-KEY': '{your API key}',
'Content-Type': 'application/json',
},
}
)
.then((response) => {
console.log(response.data);
});
<?php
require_once "vendor/autoload.php";
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use \GuzzleHttp\Psr7\Utils;
$client = new Client();
$headers = [
'accept' => '*/*',
'X-API-KEY' => '{your API key}',
'Content-Type' => 'application/json'
];
$data = [
"toTeamId": "9bca0986-xxx-xxxx-xxx-30ffe3a2c5b7",
"transferDocumentsToUserId": "8117b911-xxx-xxxx-xxx-819aab1e2bd5",
];
$body = json_encode($data);
$request = new Request('PUT', 'https://api.boldsign.com/v1-beta/users/changeTeam?userId=d98c14c5-60e0-411f-b02d-b39ca83c0da8', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
Query parameters
| userIdStringRequired | The User ID of the user. It can be obtained from users and teams from the web app. |
Request body
| ToTeamIdstringRequired | The team ID to which the user is transferred. |
TransferDocumentsToUserIdstring | The target user ID to which the user can transfer documents while changing the team. Note:
|
Example response
200 Success