ContactGroups

The contact Group's APIs are primarily used to interact with the BoldSign application to create, update, delete and get contact group details. This section demonstrates how to to create contact, update contact group details, delete contact group details, get contact group details and get contact list from your Organizations.

Create contactGroup

post/v1/contactGroups/create

The create contactGroups API is used to add contact details for adding signer details while creating document in BoldSign Application with their unique email address.

Code snippet

curl --location 'https://api.boldsign.com/v1/contactGroups/create' \
--header 'accept: */*' \
--header 'X-API-KEY: {your API key}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "groupName": "Grouptest1",
    "contacts": [
        {
            "name": "Luther Cooper",
            "email": "luthercooper@gmail.com"
        },
        {
            "name": "Hank White",
            "email": "hankwhite@gmail.com"
        }
     ]
}'
var apiClient = new ApiClient("https://api.boldsign.com", "{apikey}");
var groupContactClient = new GroupContactClient(apiClient);

var groupContact = new GroupContactDetails ()
{
  GroupName = "Testsdk",
  GroupUsers = new List<GroupUser>
  {
    new GroupUser
    {
      Name = "test 01",
      Email = "test01@gmail.com"
    },
      new GroupUser
      {
        Name = "test 02",
        Email = "test02@gmail.com"
      }
  }
};

var createGroupContactResponse = await groupContactClient.CreateGroupContactAsync(groupContact).ConfigureAwait(false);
import boldsign

configuration = boldsign.Configuration(
    api_key = "YOUR_API_KEY"
)

with boldsign.ApiClient(configuration) as api_client:

  contactgroups_api = boldsign.ContactGroupsApi(api_client)

  contactgroup_details = boldsign.ContactGroupDetails(
    groupName="CubeFlakesTeam",
    contacts=[
        boldsign.GroupUser(
            name="Luther Cooper",
            email="luthercooper@cubeflakes.com"
        ),
        boldsign.GroupUser(
            name="Hank White",
            email="hankwhite@cubeflakes.com"
        )
    ]
  )

    create_contactgroup_response = contactgroups_api.create_contactgroup(
        contactgroup_details=contactgroup_details
    )
const axios = require('axios');

axios.post(
  'https://api.boldsign.com/v1/contactGroups/create',
  {
    "groupName": "Grouptest1",
    "contacts": [
        {
            "name": "Luther Cooper",
            "email": "luthercooper@gmail.com"
        },
        {
            "name": "Hank White",
            "email": "hankwhite@gmail.com"
        }
     ]
},
  {
    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;

$client = new Client();
$headers = [
  'accept' => '*/*',
  'X-API-KEY' => '{your API key}',
  'Content-Type' => 'application/json'
];

$data = 
{
    "groupName" => "Grouptest1",
    "contacts" => [
        {
            "name" => "Luther Cooper",
            "email" => "luthercooper@gmail.com"
        },
        {
            "name" => "Hank White",
            "email"  => "hankwhite@gmail.com"
        }
     ]
};

$body = json_encode($data);

$request = new Request('POST', 'https://api.boldsign.com/v1/contactGroups/create', $headers, $body);

$res = $client->sendAsync($request)->wait();

echo $res->getBody();

Request body

groupNamestringRequiredThe group name of the user.

contactslistRequired

The list of the contacts

namestringRequiredThe name of the user
emailstringRequiredthe email of the user.

Example response

200 Success

{
  "createdContacts": {
    "groupId": "6797a07d-26d7-41fa-b3a8-c8f72378a7a6c_ErZHN",
    "groupName": "Grouptest1"
  }
}