Documentation/Update ContactGroup

Update ContactGroup

put/v1-beta/contactGroups/update

This API allows you to update the group name, directories, and contacts in an existing contact group.

Code snippet

curl  -X PUT 'https://api.boldsign.com/v1-beta/contactGroups/update?groupId=10f9d70b-be90-42c3-9295-68d7a1545f40' \
-H 'accept: */*' \
-H 'X-API-KEY: {your API key}' \
-H 'Content-Type: application/json' \
-d '{
    "GroupName": "Grouptest1000",
    "Contacts": [
        {
            "Name": "Luther Cooper",
            "Email": "luthercooper@gmail.com"
        },
        {
            "Name": "Hank White",
            "Email": "hankwhite@gmail.com"
        }
    ],
    "Directories": ["Sales", "Legal"]
}'

var apiClient = new ApiClient("https://api.boldsign.com", "{apikey}");
var groupContactClient = new GroupContactClient(apiClient);
var groupId = "6797a07d-26d7-41fa-b3a8-c8f72378a7a6c_ErZHN";
var groupContact = new GroupContactDetails ()
{
  GroupName = "Testsdk",
  Contacts = new List<Contacts>
  {
    new Contacts
    {
      Name = "test 01",
      Email = "test01@gmail.com"
    },
      new Contacts
      {
        Name = "test 02",
        Email = "test02@gmail.com"
      }
  },
  Directories = new List<string> { "Sales", "Legal" }
};

await groupContactClient.UpdateGroupContactAsync(groupId, groupContact).ConfigureAwait(false);
import boldsign

configuration = boldsign.Configuration(host="https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:   

  groupcontacts_api = boldsign.GroupContactsApi(api_client)

  group_contact = boldsign.GroupContactDetails(
    groupName="CubeFlakesTeam",
    contacts=[
        boldsign.Contacts(
            name="Luther Cooper",
            email="luthercooper@cubeflakes.com"
        ),
        boldsign.Contacts(
            name="Hank White",
            email="hankwhite@cubeflakes.com"
        )
    ],
    directories=["Sales", "Legal"]
  )

    update_groupcontact_response = groupcontacts_api.update_groupcontact(
        groupId="YOUR_CONTACT_ID",
        group_contact=group_contact
    )
const axios = require('axios');

axios.put(
  'https://api.boldsign.com/v1-beta/contactGroups/update',
  {
    "groupName": "Grouptest3332",
    "contacts": [
        {
            "name": "Luther Cooper",
            "email": "luthercooper@gmail.com"
        },
        {
            "name": "Hank White",
            "email": "hankwhite@gmail.com"
        }
     ],
     "directories": ["Sales", "Legal"]
  },
   {
    params: {
      groupId:'{Paste your contactgroup ID}',
    },
    headers: {
      accept: '*/*',
      'X-API-KEY':  '{your API key}',
    },
  },
);
<?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'
];

$body = '{
    "groupName" => "Grouptest1",
    "contacts" => [
        {
            "name" => "Luther Cooper",
            "email" => "luthercooper@gmail.com"
        },
        {
            "name" => "Hank White",
            "email"  => "hankwhite@gmail.com"
        }
     ],
     "directories" => ["Sales", "Legal"]
}';
$request = new Request('PUT', 'https://api.boldsign.com/v1-beta/contactGroups/update?groupId=6797a07d-26d7-41fa-b3a8-c8f72378a7a6c_ErZHN', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

Query parameters

idStringRequiredContactGroup Id of the user.

Request body

GroupNamestringThe group name of the user.

Contactslist

The list of the contacts

NamestringRequiredThe name of the user
EmailstringRequiredthe email of the user.
DirectorieslistThe list of directories to associate with the contact group.

Example response

200 No Content