Users
The user's APIs are primarily used to interact with the BoldSign application to create, send, and manage documents. This section demonstrates how to create users, update user roles, cancel user invitations, resend user invitations and get user details. Users can be created programmatically or via the BoldSign web interface and they can be used by your application.
Create users
post/v1/users/createThe create user API is used to invite new users to their BoldSign organization with their unique email addresses if they don't already have one. You can create the maximum number of users based on their BoldSign subscription plan.
All newly invited users will receive a verification email from BoldSign, and a member account will be created by default. After verification, the invited user can create a password.
Code snippet
curl --location 'https://api.boldsign.com/v1/users/create' \ --header 'accept: */*' \ --header 'X-API-KEY: {your API key}' \ --header 'Content-Type: application/json' \ --data-raw '[ { "emailId": "luthercooper@cubeflakes.com", "teamId": "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx", "userRole": "Admin", "metaData": { "Employee": "Permanent", "Department": "Sales", "Designation": "Sales Manager" } }, { "emailId": "hankwhite@cubeflakes.com", "teamId": "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx", "userRole": "Member", "metaData": { "Employee": "Contract", "Department": "Sales", "Designation": "Sales Executive" } } ]'
// Metadata property 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 createUserRequest = new List<CreateUserRequest>() { new CreateUserRequest() { EmailId = "luthercooper@cubeflakes.com", TeamId = "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx", UserRole = UserRoleType.TeamAdmin, MetaData = new Dictionary<string, string>() { ["Employee"] = "Permanent", ["Department"] = "Sales", ["Designation"] = "Sales Manager", }, }, new CreateUserRequest() { EmailId = "hankwhite@cubeflakes.com", TeamId = "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx", UserRole = UserRoleType.Member, MetaData = new Dictionary<string, string>() { ["Employee"] = "Contract", ["Department"] = "Sales", ["Designation"] = "Sales Executive", }, }, }; var createUserResponse = await userClient.CreateUserAsync(createUserRequest).ConfigureAwait(false);
import boldsign configuration = boldsign.Configuration( api_key = "YOUR_API_KEY" ) with boldsign.ApiClient(configuration) as api_client: user_api = boldsign.UserApi(api_client) create_user = [ boldsign.CreateUser( emailId= "luthercooper@cubeflakes.com", teamId="YOUR_TEAM_ID", userRole="Admin", metaData= { "Employee": "Permanent", "Department": "Sales", "Designation": "Sales Manager" } ) ] create_user_response = user_api.create_user( create_user=create_user )
const axios = require('axios'); axios.post( 'https://api.boldsign.com/v1/users/create', [ { "emailId": "luthercooper@cubeflakes.com", "teamId": "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx", "userRole": "Admin", "metaData": { "Employee": "Permanent", "Department": "Sales", "Designation": "Sales Manager", }, }, { "emailId": "hankwhite@cubeflakes.com", "teamId": "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx", "userRole": "Member", "metaData": { "Employee": "Contract", "Department": "Sales", "Designation": "Sales Executive", }, }, ], { 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 = [ [ "emailId" => "luthercooper@cubeflakes.com", "teamId" => "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx", "userRole" => "Admin", "metaData" => [ "Employee" => "Permanent", "Department" => "Sales", "Designation" => "Sales Manager", ], ], [ "emailId" => "hankwhite@cubeflakes.com", "teamId" => "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx", "userRole" => "Member", "metaData" => [ "Employee" => "Contract", "Department" => "Sales", "Designation" => "Sales Executive", ], ], ]; $body = json_encode($data); $request = new Request('POST', 'https://api.boldsign.com/v1/users/create', $headers, $body); $res = $client->sendAsync($request)->wait(); echo $res->getBody();
Request body
emailIdstringRequired | The email address of the user. |
teamIdstringRequired | The id of the team. |
userRolestringRequired | Represents a user role in their organization. |
metaDatadictionary | Additional information about the user in the form of key-value pairs. Up to 50 key-value pairs can be added. The key is limited to 50 characters, and the value is limited to 500 characters. |
Example response
200 Success
{ "users": [ { "emailId": "luthercooper@cubeflakes.com", "userId": "e892ea92-xxxx-xxxx-xxxx-bbdbcaa5xxxx", "teamId": "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx" }, { "emailId": "hankwhite@cubeflakes.com", "userId": "8eec6e8d-xxxx-xxxx-xxxx-bfc81abcxxxx", "teamId": "xxc5b097-xxxx-xxxx-xxxx-afd07c66xxxx" } ] }