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/createThe 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 createContactResponse = await contactClient.CreateContactAsync(contactDetails).ConfigureAwait(false);
import boldsign configuration = boldsign.Configuration( api_key = "YOUR_API_KEY" ) with boldsign.ApiClient(configuration) as api_client: contacts_api = boldsign.ContactsApi(api_client) contact_details = [ boldsign.ContactDetails( email="luthercooper@cubeflakes.com", name="LutherCooper", phoneNumber= boldsign.PhoneNumber( countryCode="+1", number="2015550123" ), jobTitle= "Developer", companyName="CubeFlakes" ), boldsign.ContactDetails( email="hankwhite@cubeflakes.com", name="HankWhite", phoneNumber=boldsign.PhoneNumber( countryCode="+1", number="2015550124" ), jobTitle= "Manager", companyName="CubeFlakes" ), ] create_contact_response = contacts_api.create_contact( contact_details=contact_details )
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
emailstringRequired | The email address of the user. | ||||
namestringRequired | The name of the user | ||||
phoneNumberobject | The Phone Number of user
| ||||
jobTitlestring | The jobTitle of the user | ||||
companyNamestring | The 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" } ] }