Create a client

URL

POST https://api.complycube.com/v1/clients

Creates a new client.

Headers

NameTypeDescription

Content-Type*

string

The content-type must always be set to application/json.

Authorization*

string

The API live or test key.

Body

NameTypeDescription

type*

string

The type of client. Valid values are: 1. person 2. company

email*

string

The client's email address.

mobile

string

The client's mobile number.

telephone

string

The client's telephone number.

externalId

string

A unique identifier that you can associate with the client. For example, this can be the client ID in your system.

joinedDate

string

The date and time when the client was registered with you. This is relevant for users that migrate existing customers. The format is YYYY-MM-DD.

personDetails

object

Primary details for a client of type person. This is required when the type is person. Also, see the person details object below.

companyDetails

object

Primary details for a client of type company. This is required when the type is company. Also, see the company details object below.

metadata

object

Set of key-value pairs that you can associate with the client object. This is useful for storing additional information about the client in a structured format. You can specify up to 20 keys, with key names up to 40 characters long and values up to 500 characters long.

The personDetails object

AttributeTypeDescription

firstName

string

The client's first name.

(Required)

middleName

string

The client's middle name. (Optional)

lastName

string

The client's last name. (Required)

dob

string

The client's date of birth. The format is YYYY-MM-DD. (Optional)

gender

string

The client's gender. Valid values include:

  1. male

  2. female

  3. other

(Optional)

nationality

string

The client's nationality. This will be the two-letter country ISO code. (Optional)

birthCountry

string

The client's birth country. This will be the two-letter country ISO code. (Optional)

ssn

string

The client's SSN (Social Security Number). This is for US clients. (Optional)

socialInsuranceNumber

string

The client's Social Insurance Number. (Optional)

nationalIdentityNumber

string

The client's National Identity Number. (Optional)

taxIdentificationNumber

string

The client's Tax Identification Number (TIN). (Optional)

The companyDetails object

AttributeTypeDescription

name

string

The client's name. (Required)

website

string

The client's website. (Optional)

registrationNumber

string

The client's registration or incorporation number. (Optional)

incorporationCountry

string

The client's incorporation country. This will be the two-letter country ISO code. (Optional)

incorporationType

string

The client's incorporation type. Valid values include:

  1. sole_proprietorship

  2. private_limited_company

  3. public_limited_company

  4. partnership

  5. limited_partnership

  6. limited_liability_partnership

  7. holding_company

  8. non_government_organization

  9. non_profit_organization

  10. governmental_entity

  11. statutory_company

  12. subsidiary_company

  13. unlimited_partnership

  14. unlimited_company

  15. trust

  16. charitable_incorporated_organization

  17. chartered_company

  18. cooperative

  19. professional_association

  20. other

(Optional)

Example request

curl -X POST https://api.complycube.com/v1/clients \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          	"type": "person",
		"email": "john.doe@example.com",
		"mobile": "+12 345678910",
		"telephone": "+12 345678910",
		"joinedDate": "2020-01-01",
		"personDetails":{
			"firstName": "John",
			"lastName" :"Doe",
			"dob": "1990-01-01",
			"nationality": "GB"
		}
        }'

Example responses

{
    "id": "5eb04fcd0f3e360008035eb1",
    "type": "person",
    "email": "john.doe@example.com",
    "mobile": "+12345678910",
    "telephone": "+12 345678910",
    "joinedDate": "2020-01-01",
    "personDetails": {
        "firstName": "John",
        "lastName": "Doe",
        "dob": "1990-01-01",
        "nationality": "GB"
    },
    "metadata": {
        "account_reference": "7201748192"
    },
    "createdAt": "2020-01-04T17:24:29.146Z",
    "updatedAt": "2020-01-04T17:24:29.146Z"
}

Last updated