API Reference
Log inSign up
v1.7.3
v1.7.3
  • ComplyCube API Reference
  • Integration
  • Test and Live
  • Authentication
  • Rate Limits
  • Service Quota
  • Errors
  • Pagination
  • Filtering
  • Versioning
  • Core resources
    • Clients
      • Create a client
      • Get a client
      • Update a client
      • Delete a client
      • List clients
      • Filtering clients
    • Addresses
      • Create an address
      • Get an address
      • Update an address
      • Delete an address
      • List addresses
      • Filtering addresses
    • Documents
      • Create a document
      • Get a document
      • Update a document
      • Upload image attachment
      • Delete image attachment
      • Download image attachment
      • Redact image attachment
      • Delete a document
      • List documents
      • Filtering documents
    • Live Photos
      • Upload a live photo
      • Get a live photo
      • Download live photo
      • Redact live photo
      • Delete a live photo
      • List live photos
    • Live Videos
      • Get a live video
      • Redact live video
      • Delete live video
      • List live videos
    • Checks
      • Create a check
      • Get a check
      • Update a check
      • Validate check outcome
      • Redact check outcome
      • List checks
      • Filtering checks
    • Risk Profile
      • Get a risk profile
  • Check types
    • AML Screening Check
    • Document Check
    • Identity Check
    • Enhanced Identity Check
    • Proof of Address Check
    • Multi-Bureau Check
    • Face Authentication Check
    • Age Estimation Check
  • Lookups
    • Company Search
      • Search company
      • Get company details
    • Address Search
      • Search address
  • Tools
    • Custom Lists
      • Get a custom list
      • Add entity to custom list
      • List custom lists
  • Static Data
    • Screening Lists
    • Supported Documents
  • Other Resources
    • Flow (Hosted Solution)
      • Create a session
    • Webhooks
      • Create a webhook
      • Get a webhook
      • Update a webhook
      • Delete a webhook
      • List webhooks
      • Filtering webhooks
    • SDK Tokens
      • Generate a token
    • Autofill
      • Perform autofill
    • Reports
      • Generate a client report
      • Generate a check report
    • Team Members
      • Get a team member
      • List team members
      • Filtering team members
    • Audit Logs
      • Get an audit log
      • List audit logs
      • Filtering audit logs
    • Account Info
      • Get account info
  • Useful Resources
    • Testing Data
    • User Docs
Powered by GitBook
On this page
  • URL
  • Headers
  • Body
  • Example request
  • Example responses

Was this helpful?

  1. Core resources
  2. Clients

Create a client

URL

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

Creates a new client.

Headers

Name
Type
Description

Content-Type*

string

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

Authorization*

string

The API live or test key.

Body

Name
Type
Description

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

companyDetails

object

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 50 keys, with key names up to 40 characters long and values up to 500 characters long.

The personDetails object

Attribute
Type
Description

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

birthCountry

string

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

Attribute
Type
Description

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

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"
		}
        }'
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const client = await complycube.client.create({
  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"
  }
});
from complycube import ComplyCubeClient
cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')

new_client = {
    'mobile':"+12 345678910",
    'telephone': "+12 345678910",
    'joinedDate': "2020-01-01",
    'personDetails': {
        'firstName':'John',
        'lastName': "Doe",
        'dob': "1990-01-01",
        'nationality': "GB"
    }
}

client = cc_api.clients.create('person','john.doe@example.com', **new_client)
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');

$result = $ccapi->clients()->create([
    'type' => 'person',
    'email' => 'john@doe.com',
    'mobile' => '+12 345678910',
    'telephone' => '+12 345678910',
    'joinedDate' => '2020-01-01',
    'personDetails' => [
        'firstName' => 'John',
        'lastName' => 'Doe',
        'dob' => '1990-01-01',
        'nationality' => 'GB'
    ]
]);
using ComplyCube.Net;
using ComplyCube.Net.Resources.Clients;

var clientApi = new ClientApi(new ComplyCubeClient("<YOUR_API_KEY>"));
var newClient = new ClientRequest {
  type = "person",
  email = "john.doe@example.com",
  mobile = "+12 345678910",
  telephone = "+12 345678910",
  joinedDate = "2020-01-01",
  personDetails = new PersonDetails {
    firstName = "John",
    lastName = "Doe",
    dob = "1990-01-01",
    nationality = "GB"
  }
}

var client = await clientApi.CreateAsync(newClient);

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"
}
{
    "type": "invalid_request",
    "message": "'type' should be equal to one of the allowed values: person,company",
    "param": "type"
}

PreviousClientsNextGet a client

Last updated 6 months ago

Was this helpful?

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

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

The client's nationality. This will be the . (Optional)

The client's birth country. This will be the . (Optional)

The client's incorporation country. This will be the . (Optional)

two-letter country ISO code
two-letter country ISO code
two-letter country ISO code
person details object
company details object