Contacts

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

Create contact

post/v1/contacts/create

The create contact 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/contacts/create' \
--header 'accept: */*' \
--header 'X-API-KEY: {your API key}' \
--header 'Content-Type: application/json' \
--data-raw '[
    {
        "email": "luthercooper@cubeflakes.com",
        "name": "LutherCooper",
        "phoneNumber": {
             "countryCode": "+1",
             "number": "2015550123"
        },
        "jobTitle": "Developer",
        "companyName": "CubeFlakes"
    },
    {
        "email": "hankwhite@cubeflakes.com",
        "name": "HankWhite",
        "phoneNumber": {
             "countryCode": "+1",
             "number": "2015550124"
        },
        "jobTitle": "Manager",
        "companyName": "CubeFlakes"
    }
]'
var apiClient = new ApiClient("https://api.boldsign.com", "{apikey}");
var contactClient = new ContactClient(apiClient);

var ContactDetails = new List<ContactDetails>()
{
    new ContactDetails()
    {
        Email = "test1711@gmail.com",
        Name = "API-SDK_Test",
        PhoneNumber = new PhoneNumber()
        {
            CountryCode = "+1",
            Number = "2015550123"
        },
        CompanyName = "ABC",
        JobTitle = "Test"
    },
    new ContactDetails()
    {
        Email = "test123@gmail.com",
        Name = "Test_Engineer",
        PhoneNumber = new PhoneNumber()
        {
            CountryCode = "+1",
            Number = "2015550124"
        },
        CompanyName = "ABC",
        JobTitle = "Developer"
    }
};

var craeteContactResponse = await contactClient.CreateContactAsync(contactDetails).ConfigureAwait(false);
import requests
import json

url = "https://api.boldsign.com/v1/contacts/create"

payload = [
    {
        "email": "luthercooper@cubeflakes.com",
        "name": "LutherCooper",
        "phoneNumber": {
             "countryCode": "+1",
             "number": "2015550123"
        },
        "jobTitle": "Developer",
        "companyName": "CubeFlakes"
    },
    {
        "email": "hankwhite@cubeflakes.com",
        "name": "HankWhite",
        "phoneNumber": {
             "countryCode": "+1",
             "number": "2015550124"
        },
        "jobTitle": "Manager",
        "companyName": "CubeFlakes"
    },
]

headers = {
    "accept": "*/*",
    "X-API-KEY": "{your API key}",
    "Content-Type": "application/json",
}

response = requests.post(url, headers=headers, data=json.dumps(payload))

print(response.text)
const axios = require('axios');

axios.post(
  'https://api.boldsign.com/v1/contacts/create',
  [
      {
          "email": "luthercooper@cubeflakes.com",
          "name": "LutherCooper",
          "phoneNumber": {
              "countryCode": "+1",
              "number": "2015550123"
          },
          "jobTitle": "Developer",
          "companyName": "CubeFlakes"
      },
      {
          "email": "hankwhite@cubeflakes.com",
          "name": "HankWhite",
          "phoneNumber": {
              "countryCode": "+1",
              "number": "2015550124"
          },
          "jobTitle": "Manager",
          "companyName": "CubeFlakes"
      },
  ],
  {
    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 = [
  [
      "email" => "luthercooper@cubeflakes.com",
      "name" => "LutherCooper",
      "phoneNumber" => [
          "countryCode" => "+1",
          "number" => "2015550124"
      ],
      "jobTitle" => "Developer",
      "companyName" => "CubeFlakes"
  ],
  [
      "email" => "hankwhite@cubeflakes.com",
      "name" => "HankWhite",
      "phoneNumber" => [
          "countryCode" => "+1",
          "number" => "2015550123"
      ],
      "jobTitle" => "Manager",
      "companyName" => "CubeFlakes"
  ],
];

$body = json_encode($data);

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

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

echo $res->getBody();

Request body

emailstringRequiredThe email address of the user.
namestringRequiredThe name of the user

phoneNumberobject

The Phone Number of user

countryCodestringThis property represents the country code associated with the phone number.
numberstringThis property represents the actual phone number.
jobTitlestringThe jobTitle of the user
companyNamestringThe companyName of the user

Example response

200 Success

{
  "contacts": [
    {
      "id": "6797a07d-26d7-41fa-b3a8-c8f72378a7a6c_ErZHN",
      "email": "luthercooper@cubeflakes.com"
    },
    {
      "id": "6797a07d-26d7-41fa-b3a8-c8f72378a7a6c_GsSVP",
      "email": "hankwhite@cubeflakes.com"
    }
  ]
}