Contacts: create

This method imports multiple new contacts into a contact list from a CSV, JSON, or XML file.

To use this method, you must provide a request body in one of the supported formats and include a content-type header with the appropriate value.

Request

HTTP request

POST /v2.1/accounts/{accountId}/contacts

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID GUID.

Request Body

contactModRequest

Responses

CodeDescriptionReference
201

Successful response.

contactUpdateResponse
400

Error encountered.

errorDetails

SDK Method

Users::postContacts

Definitions

contactModRequest

The request object containing the new information for the contacts.

contactList[Contacts]

A list of contacts.

contactPhoneNumber

Details about the phone numbers associated with a specific contact.

phoneNumberstring

The contact's phone number.

Example: +12223334444

phoneTypestring

The type of phone number. Valid values are:

  • home
  • mobile
  • work
  • other
  • fax

contactUpdateResponse

This response objects shows the updated details for the contacts.

contacts[Contacts]

A list of contacts.

errorDetails

This object describes errors that occur. It is only valid for responses and ignored in requests.

errorCodestring

The code associated with the error condition.

messagestring

A brief message describing the error condition.

Contacts

The Contacts resource enables you to manage the contact in an account's address book.

cloudProviderstring

The cloud service that provided the contact. Valid values are:

  • rooms
  • docusignCore (default)

cloudProviderContainerIdstring

The id of the container at the cloud provider. For example, this might be the room id for a DocuSign Transaction Room.

contactIdstring

The id of a contact person in the account's address book.

contactPhoneNumbers[contactPhoneNumber]

A list of the contact's phone numbers.

contactUristring

The URI for retrieving information about the contact.

emails[array]

The email address or addresses associated with the contact.

errorDetailserrorDetails

This object describes errors that occur. It is only valid for responses and ignored in requests.

isOwnerboolean

When true, the current user is the owner of the contact.

namestring

The name of the contact.

organizationstring

The name of the contact's organization.

sharedstring

When set to true, the contact is shared. For more information, see Shared Contacts.

signingGroupstring

If the contact belongs to a signing group, this property contains the signingGroupId.

signingGroupNamestring

The name of the signing group that the contact belongs to.

Examples

Generic JSON Request/Response

Request
{
  "contacts": [
    {
      "signingGroupUsers": [
        {
          "userName": "sample string 1",
          "userId": "sample string 2",
          "email": "sample string 3",
          "userType": "sample string 4",
          "userStatus": "sample string 5",
          "uri": "sample string 6",
          "loginStatus": "sample string 7",
          "sendActivationEmail": "sample string 8",
          "activationAccessCode": "sample string 9"
        }
      ],
      "contactId": "sample string 1",
      "name": "sample string 2",
      "emails": [
        "sample string 1"
      ],
      "organization": "sample string 3",
      "shared": "sample string 4",
      "contactUri": "sample string 5",
      "signingGroup": "sample string 6",
      "signingGroupName": "sample string 7",
      "contactPhoneNumbers": [
        {
          "phoneNumber": "sample string 1",
          "phoneType": "sample string 2"
        }
      ]
    }
  ]
}
Response
{
  "contacts": [
    {
      "signingGroupUsers": [
        {
          "userName": "sample string 1",
          "userId": "sample string 2",
          "email": "sample string 3",
          "userType": "sample string 4",
          "userStatus": "sample string 5",
          "uri": "sample string 6",
          "loginStatus": "sample string 7",
          "sendActivationEmail": "sample string 8",
          "activationAccessCode": "sample string 9",
          "errorDetails": {
            "errorCode": "SUCCESS",
            "message": ""
          }
        }
      ],
      "contactId": "sample string 1",
      "name": "sample string 2",
      "emails": [
        "sample string 1"
      ],
      "organization": "sample string 3",
      "shared": "sample string 4",
      "contactUri": "sample string 5",
      "signingGroup": "sample string 6",
      "signingGroupName": "sample string 7",
      "contactPhoneNumbers": [
        {
          "phoneNumber": "sample string 1",
          "phoneType": "sample string 2"
        }
      ],
      "errorDetails": {
        "errorCode": "sample string 1",
        "message": "sample string 2"
      }
    }
  ]
}
Generic XML Request/Response

Request
<contactModRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <contacts>
    <contact>
      <contactId>sample string 1</contactId>
      <contactPhoneNumbers xmlns:d4p1="http://schemas.datacontract.org/2004/07/API_REST.Models.v2">
        <d4p1:contactPhoneNumber>
          <d4p1:phoneNumber>sample string 1</d4p1:phoneNumber>
          <d4p1:phoneType>sample string 2</d4p1:phoneType>
        </d4p1:contactPhoneNumber>
      </contactPhoneNumbers>
      <contactUri>sample string 5</contactUri>
      <emails>
        <string>sample string 1</string>
      </emails>
      <name>sample string 2</name>
      <organization>sample string 3</organization>
      <shared>sample string 4</shared>
      <signingGroup>sample string 6</signingGroup>
      <signingGroupName>sample string 7</signingGroupName>
      <signingGroupUsers>
        <userInfo>
          <activationAccessCode>sample string 9</activationAccessCode>
          <email>sample string 3</email>
          <loginStatus>sample string 7</loginStatus>
          <sendActivationEmail>sample string 8</sendActivationEmail>
          <uri>sample string 6</uri>
          <userId>sample string 2</userId>
          <userName>sample string 1</userName>
          <userStatus>sample string 5</userStatus>
          <userType>sample string 4</userType>
        </userInfo>
      </signingGroupUsers>
    </contact>
  </contacts>
</contactModRequest> 
Response
<contactUpdateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <contacts>
    <contact>
      <contactId>sample string 1</contactId>
      <contactPhoneNumbers xmlns:d4p1="http://schemas.datacontract.org/2004/07/API_REST.Models.v2">
        <d4p1:contactPhoneNumber>
          <d4p1:phoneNumber>sample string 1</d4p1:phoneNumber>
          <d4p1:phoneType>sample string 2</d4p1:phoneType>
        </d4p1:contactPhoneNumber>
      </contactPhoneNumbers>
      <contactUri>sample string 5</contactUri>
      <emails>
        <string>sample string 1</string>
      </emails>
      <errorDetails>
        <errorCode>sample string 1</errorCode>
        <message>sample string 2</message>
      </errorDetails>
      <name>sample string 2</name>
      <organization>sample string 3</organization>
      <shared>sample string 4</shared>
      <signingGroup>sample string 6</signingGroup>
      <signingGroupName>sample string 7</signingGroupName>
      <signingGroupUsers>
        <userInfo>
          <activationAccessCode>sample string 9</activationAccessCode>
          <email>sample string 3</email>
          <errorDetails>
            <errorCode>SUCCESS</errorCode>
            <message></message>
          </errorDetails>
          <loginStatus>sample string 7</loginStatus>
          <sendActivationEmail>sample string 8</sendActivationEmail>
          <uri>sample string 6</uri>
          <userId>sample string 2</userId>
          <userName>sample string 1</userName>
          <userStatus>sample string 5</userStatus>
          <userType>sample string 4</userType>
        </userInfo>
      </signingGroupUsers>
    </contact>
  </contacts>
</contactUpdateResponse> 
}} />