/register
Registers end user PII into the Sila database and assigns a user_handle to the new entity.
This is the endpoint you will use to create a new individual or business entity and attach information that will be used to verify their identity during the KYC process. This does NOT start verification of the KYC data; it only adds the data to be verified into the Sila environment.
Some PII, noted in the Request Attributes section, is not required at the time /register is called for an end user, but is required for the user to pass KYC. Use the /add and /update endpoints to add in additional data before beginning the KYC process.
For individuals, KYC data includes:
- Full legal name
- U.S. Social Security Number (Full 9-digit SSN)
- Date of birth
- A valid street address
- For individuals, the street address must be their current home/residential address. P.O. Boxes and similar cannot be used unless the individual has a valid US Military P.O. Box on a military base.
It's wise to call this out in your registration flow by prompting your users to input their current home address.
- For individuals, the street address must be their current home/residential address. P.O. Boxes and similar cannot be used unless the individual has a valid US Military P.O. Box on a military base.
- An email address
- A phone number
For businesses, KYB data includes:
- Legal business name
- Doing-business-as (business alias)
- Business website
- Business EIN
- Date of incorporation (birthdate)
- Business address
- Business email address
- Business phone number
- Registration state (2 letter US state abbreviation)
Testing: see testing docs to set up mock data in the register endpoint to test KYC failures.
Entities with the same SSN
In PRODUCTION ONLY, only one entity can be created for a specific SSN. You will receive an error if you try to create an additional entity with the same SSN.
Request
This endpoint's request body is the entity_msg JSON object.
Notes on registering business entities
To register a new end user as a business instead of an individual, the following must be sent in the request:
entity.type
is “business” (to register an individual, this can be omitted or sent as “individual”).entity.entity_name
is the legal name of the business and must not be blank.entity.business_type
is the business type name andentity.business_type_uuid
is the business type UUID (see /get_business_types). One of these fields must be populated with valid data, but not both.entity.naics_code
is the integer code that describes the business’s category and is a required field. See /get_naics_categories
Other things to note:
identity.identity_alias
must be “EIN” for businesses and theidentity.identity_value
a US employer identification number (EIN). However, for some business types (sole proprietorships, trusts, and unincorporated associations), the identity object will not be required to pass KYB verification and can actually be omitted in this endpoint altogether.entity.doing_business_as
is an optional field that can contain a business name if it differs from its legally registered name.entity.business_website
is an optional field containing a business’s website. If KYB fails, this can be used to help complete manual review.entity.registration_state
is an optional field containing the 2 letter state abbreviation for what state a business is registered in. This can help speed up KYB.
Apps using Access Token Authorization
Use a valid access token in a Authorization: Bearer request header.
See Auth Token Overview for more details.
Apps using ECDSA Authentication
Both authsignature and usersignature headers are required for this request. The usersignature header should be generated with a keypair registered to the user (either registered from the /register endpoint or the /register_wallet endpoint).
See our ECDSA overview for more.
Note - We recently renamed the field auth_handle
to app_handle
. For backward compatibility, auth_handle
is still valid but has been removed from our documentation.
POST /0.2/register HTTP/1.1
sandbox.silamoney.com
Content-Type: application/json
// if using OAuth2
Authorization: Bearer [GENERATED JWT TOKEN HERE]
// if using ECDSA
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
{
"header": {
"created": 1234567890,
"user_handle": "user_handle",
"app_handle": "app_handle",
"version": "0.2",
"reference": "<your unique id>"
},
"message": "entity_msg",
"address": {
"address_alias": "home",
"street_address_1": "123 Main Street",
"city": "New City",
"state": "OR",
"country": "US",
"postal_code": "97204-1234"
},
"identity": {
"identity_alias": "SSN",
"identity_value": "123452222"
},
"contact": {
"phone": "503-123-4567",
"contact_alias": "",
"email": "[email protected]"
},
"entity": {
"birthdate": "1900-01-31",
"entity_name": "Example User",
"first_name": "Example",
"last_name": "User",
"relationship": "user"
}
}
***
HTTP/1.1 200 OK
{
"success": true,
"reference":"<your unique id>",
"message":"user.silamoney.eth was successfully registered ",
"response_time_ms": "1171",
"status":"SUCCESS"
}
POST /0.2/register HTTP/1.1
Host: sandbox.silamoney.com
Content-Type: application/json
// if using OAuth2
Authorization: Bearer [GENERATED JWT TOKEN HERE]
// if using ECDSA
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
{
"header": {
"created": 1234567890,
"app_handle": "your_app_handle.silamoney.eth",
"user_handle": "your_business_user.silamoney.eth",
"reference": "<your unique id>",
"version": "0.2"
},
"message": "entity_msg",
"identity": {
"identity_alias": "EIN",
"identity_value": "12-1234567"
},
"address": {
"address_alias": "Office",
"street_address_1": "123 Candelabra Blvd.",
"city": "Portland",
"state": "OR",
"country": "US",
"postal_code": "97204"
},
"contact": {
"phone": "1231231234",
"email": "[email protected]"
},
"entity": {
"type": "business",
"entity_name": "Your Business Customer, Inc.",
"business_type": "corporation",
"business_website": "https://www.yourbusinesscustomer.com",
"doing_business_as": "Your Business Customer Alias Co.",
"naics_code": 721,
"registration_state": "OR"
}
}
***
HTTP/1.1 200 OK
{
"message": "your_business_user has been successfully registered!",
"reference": "<your unique id>",
"status": "SUCCESS",
"business_uuid": "b8859415-a535-4efe-b889-650abb4bd28d"
}
// Individual user
const user = new Sila.User();
user.handle = 'user.silamoney.eth';
user.firstName = 'First';
user.lastName = 'Last';
user.addressAlias = 'your_address_alias';
user.address = '123 Main St';
user.address2 = 'Suite 216';
user.city = 'Anytown';
user.state = 'NY';
user.zip = '12345';
user.country = 'US';
user.contactAlias = 'your_contact_alias';
user.phone = '1234567890';
user.email = '[email protected]';
user.dateOfBirth = '1990-01-01';
user.ssn = '123456222';
user.cryptoAlias = 'crypto alias';
user.cryptoAddress = 'The wallet blockchain address';
user.type = 'individual';
// Business user
const user = new Sila.User();
user.handle = 'user.silamoney.eth';
user.entity_name = 'test business';
user.addressAlias = 'your_address_alias';
user.address = '123 Main St';
user.address2 = 'Suite 216';
user.city = 'Anytown';
user.state = 'NY';
user.zip = '12345';
user.contactAlias = 'your_contact_alias';
user.phone = '1234567890';
user.ein = '320567252';
user.email = '[email protected]';
user.cryptoAlias = 'crypto alias';
user.cryptoAddress = 'The wallet blockchain address';
user.business_type = 'corporation';
user.businessTypeUuid = 'your-business-type-uuid';
user.business_website = 'https://www.yourbusinesscustomer.com';
user.doing_business_as = 'doing business co';
user.naics_code = 721;
user.type = 'business';
user.registration_state = 'OR';
const res = await Sila.register(user);
// Success Response Object
console.log(res.statusCode); // 200
console.log(res.data.success); // true
console.log(res.data.reference); // Random reference number
console.log(res.data.status); // SUCCESS
console.log(res.data.message); // User was successfully registered
# Individual User
payload = {
"country": "US",
"user_handle": 'user.silamoney.eth', # Required: Must not be already in use
"first_name": 'Example', # Required
"last_name": 'User', # Required
"entity_name": 'Example User', # Required
"identity_value": "123452222", # Required (SSN)
"identity_alias": "SSN",
"phone": 1234567890, # Required: Must be a valid phone number (format not enforced)
"email": "[email protected]", # Required: Must be a valid email address
"address_alias": "default",
"street_address_1": '123 Main Street', # Required: Must be a valid USPS mailing address
"city": 'New City', # Required: Must be a valid US City matching the zip
"state": 'OR', # Required: Must be a 2 character US State abbr.
"postal_code": 97204, # Required: Must be a valid US Postal Code
"crypto_address": '0x123...890', # Required: Must be a valid ethereum 20 byte address starting with 0x
"birthdate": "1990-05-19", # Required
}
# Business user
payload = {
"country": "US",
"user_handle": business_handle,
"entity_name": 'Business name',
"identity_alias": "EIN",
"identity_value": "123452222",
"phone": 1234567890,
"email": "[email protected]",
"address_alias": "default",
"street_address_1": '1232 Main Street',
"city": 'New City 2',
"state": 'OR',
"postal_code": 97204,
"crypto_address": eth_address_3,
"crypto_alias": "python_wallet_2",
"type": "business",
"business_type": "corporation",
"registration_state": "NY",
"business_website": "https://www.yourbusinesscustomer.com",
"doing_business_as": "Your Business Customer Alias Co.",
"naics_code": 721
}
# Make sure silaApp is initialized with registered app_private_key and app_handle.
User.register(silaApp, payload)
### Success Response Object
{
status: 'SUCCESS',
success: True,
message: 'user.silamoney.eth has been submitted to KYC queue.',
reference: 'd725a285-3cda-47cb-aa55-60db70460ae4',
status_code: 200
}
### Failure Response Object
{
status: 'FAILURE',
message: 'error',
}
// Individual User
User user = new User(String userHandle, String firstName, String lastName, String streetAddress1, @Nullable String streetAddress2,
String city, String state (2 characters), String postalCode (5 or 9 digit format), String phone, String email, String identityNumber (SSN format "123-45-6222"), String cryptoAddress, Date birthdate, String country (2 characters));
ApiResponse response = api.register(user);
// Business User
BusinessType businessType; //Get business type with api.getBusinessTypes()
NaicsCategoryDescription naicsCategory; //Get naics category with api.getNaicsCategories()
BusinessUser user = new BusinessUser("userhandle", "Office", "123 Main Street",
"street address 2", "New City", "OR", "97204-1234", "503-123-4567", "[email protected]", "123452222", "crypto address", "entity name", businessType, "https://www.website.com", "doing business as", naicsCategory, String country (2 characters), boolean smsOptIn, String deviceFingerprint,String sessionIdentifier);
user.setRegistrationState("registration state"); // Optional for KYB flow
ApiResponse response = api.registerBusiness(user);
// Success Response
System.out.println(response.getStatusCode()); // 200
System.out.println(((BaseResponse)response.getData()).getReference());// Random reference number
System.out.println(((BaseResponse)response.getData()).getStatus()); // SUCCESS
System.out.println(((BaseResponse)response.getData()).getMessage()); // user was successfully registered.
System.out.println(((BaseResponse)response.getData()).getSuccess()); // true
// Generate Wallet
//This is a helper function that allows you to generate a wallet (private key & address) that you can then use to register a new user.
// **Important!** Sila does not custody these private keys. They should *never* be sent to us or disclosed to any third party. The private key will be used to sign all requests from the associated user for authentication purposes.
$wallet = $client->generateWallet();
print $wallet->getAddress(); // e.g. 0x9ae1e2a685c5f23981757ea0cb6f5b413aa5f29f
print $wallet->getPrivateKey(); // e.g. 0xe62049e7ca71d9223c8db6751e007ce000d686b7729792160787034e1c976c12
// You can also initialize a wallet using existing values, e.g.
$privateKey = '0xe62049e7ca71d9223c8db6751e007ce000d686b7729792160787034e1c976c12';
$address = '0x9ae1e2a685c5f23981757ea0cb6f5b413aa5f29f';
$wallet = $client->generateWallet($privateKey, $address);
print $wallet->getAddress(); // e.g. 0x9ae1e2a685c5f23981757ea0cb6f5b413aa5f29f
print $wallet->getPrivateKey(); // e.g. 0xe62049e7ca71d9223c8db6751e007ce000d686b7729792160787034e1c976c12
/* Wallet has two attributes:
- `address` is the public blockchain address that will be used when you call register()
- `private_key` is the private key associated with this address. This will _only_ be used to sign requests. **Keep this safe!** */
// For individual users
use Silamoney\Client\Domain\User;
$userHandle = 'user.silamoney.eth';
$firstName = 'Sila';
$lastName = 'Money';
$streetAddress1 = 'Some location';
$streetAddress2 = 'In the world';
$city = 'your beautiful city';
$state = 'NY'; // 2 characters code only
$postalCode = '12345'; // can be 5 or 9 digits format
$phone = '1234567';
$email = '[email protected]';
$cryptoAddress = '0xabc123abc123abc123'; // Hex-encoded blockchain address (prefixed with "0x")
$identityNumber = '123-45-6222'; // SSN format
$datetime = new DateTime();
$birthDate = $datetime->createFromFormat('Y-m-d', '1935-8-1'); // Only date part will be taken when sent to api
$cryptoAlias = "Address 1";
$addressAlias = "home";
$contactAlias = "";
// Create user object
$user = new User($userHandle, $firstName, $lastName, $streetAddress1, $streetAddress2, $city, $state, $postalCode, $phone, $email, $identityNumber, $cryptoAddress, $birthDate, $cryptoAlias, $addressAlias, $contactAlias);
// Optional parameters can be set to null
$user = new User($userHandle, $firstName, $lastName, null, null, null, null, null, null, null, null, $cryptoAddress, $birthDate);
// You can use the UserBuilder to avoid using null on optional parameters
$builder = new UserBuilder();
$user = $builder->handle($userHandle)->firstName($firstName)->lastName($lastName)->cryptoAddress($cryptoAddress)->birthDate($birthDate)->sessionIdentifier($sessionIdentifier)->build();
// Call the api
$response = $client->register($user);
// For business users
use Silamoney\Client\Domain\BusinessUser;
// Fill your data
$businessHandle = 'business.silamoney.eth';
$name = 'Your Business Inc.';
$streetAddress1 = 'Some location';
$streetAddress2 = 'In the world'; // Optional.
$city = 'your beautiful city';
$state = 'NY'; // 2 characters code only
$postalCode = '12345'; // can be 5 or 9 digits format
$phone = '123-456-7890';
$email = '[email protected]';
$identityNumber = '12-3456789'; // EIN format
$cryptoAddress = '0xabc123abc123abc123'; // Hex-encoded blockchain address (prefixed with "0x")
$naicsCode = 123; // The Naics code.
$businessType = 'Type'; // Required if $businessTypeUuid is not set. The business type name.
$businessTypeUuid = null; // Required if $businessType is not set. The business type uuid.
$doingBusinessAs = 'Your Business'; // Optional. If your business name is different from its legal name
$businessWebsite = 'http://www.yourdomain.com'; // Optional. The business website.
$cryptoAlias = "Address 1"; // optional
$addressAlias = "home"; // optional
$contactAlias = ""; // optional
$registrationState = "CA"; // optional
// Create business user object
$businessUser = new BusinessUser($businessHandle, $name, $streetAddress1, $streetAddress2, $city, $state, $postalCode, $phone, $email, $identityNumber, $cryptoAddress, $naicsCode, $businessType, $businessTypeUuid, $doingBusinessAs, $businessWebsite, $cryptoAlias, $addressAlias, $contactAlias, $registrationState);
// Optional parameters can be set to null
$businessUser = new BusinessUser($businessHandle, $name, null, null, null, null, null, null, null, null, $cryptoAddress, $naicsCode, $businessType, null, null, null);
// You can use the BusinessUserBuilder to avoid using null on optional parameters
$builder = new BusinessUserBuilder();
$builder->handle($userHandle)->entityName($name)->cryptoAddress($cryptoAddress)->naicsCode($naicsCode)->businessType($businessType)->registrationState('CA')->build();
// Call the api
$response = $client->registerBusiness($businessUser);
// Success 200
echo $response->getStatusCode(); // 200
echo $response->getData()->getReference(); // Random reference number
echo $response->getData()->getStatus(); // SUCCESS
echo $response->getData()->getMessage(); // User was successfully register
// Register business user
BusinessUser user = new BusinessUser
{
UserHandle = "your_business_handle",
EntityName = "Your Business Customer, Inc.",
BusinessType = "corporation",
BusinessTypeUuid = "your-business-type-uuid",
BusinessWebsite = "https://www.yourbusinesscustomer.com",
DoingBusinessAs = "Your Business Customer Alias Co.",
NaicsCode = 101,
CryptoAddress = "0x1234567890abcdef1234567890abcdef12345678",
CryptoAlias = "Address 1",
Phone = "503-123-4567",
Email = "[email protected]",
ContactAlias = "",
IdentityValue = "12-1234567",
StreetAddress1 = "123 Main Street",
StreetAddress2 = "",
City = "New City",
State = "OR",
PostalCode = "97204-1234",
Country = "US",
AddressAlias = "home",
Type = "business",
RegistrationState = "DC"
};
ApiResponse<object> response = api.Register(user);
// Success Response Object
Console.WriteLine(response.StatusCode); // 200
Console.WriteLine(((BusinessUserResponse)response.Data).Reference); // Random reference number
Console.WriteLine(((BusinessUserResponse)response.Data).Status); // SUCCESS
Console.WriteLine(((BusinessUserResponse)response.Data).Message); // user was successfully registered.
Console.WriteLine(((BusinessUserResponse)response.Data).BusinessUuid); // "d1b40916-3761-69fe-aa54-88b8ca4d1d5c"
Console.WriteLine(((BusinessUserResponse)response.Data).ResponseTimeMs); // API responses time
Console.WriteLine(((BusinessUserResponse)response.Data).Success); // true
// Register business user
BusinessUser user = new BusinessUser
{
UserHandle = "your_business_handle",
EntityName = "Your Business Customer, Inc.",
BusinessType = "corporation",
BusinessTypeUuid = "your-business-type-uuid",
BusinessWebsite = "https://www.yourbusinesscustomer.com",
DoingBusinessAs = "Your Business Customer Alias Co.",
NaicsCode = 101,
CryptoAddress = "0x1234567890abcdef1234567890abcdef12345678",
CryptoAlias = "Address 1",
Phone = "503-123-4567",
Email = "[email protected]",
ContactAlias = "",
IdentityValue = "12-1234567",
StreetAddress1 = "123 Main Street",
StreetAddress2 = "",
City = "New City",
State = "OR",
PostalCode = "97204-1234",
Country = "US",
AddressAlias = "home",
Type = "business",
RegistrationState = "DC"
};
ApiResponse<object> response = api.Register(user);
// Success Response Object
Console.WriteLine(response.StatusCode); // 200
Console.WriteLine(((BusinessUserResponse)response.Data).Reference); // Random reference number
Console.WriteLine(((BusinessUserResponse)response.Data).Status); // SUCCESS
Console.WriteLine(((BusinessUserResponse)response.Data).Message); // user was successfully registered.
Console.WriteLine(((BusinessUserResponse)response.Data).BusinessUuid); // "d1b40916-3761-69fe-aa54-88b8ca4d1d5c"
Console.WriteLine(((BusinessUserResponse)response.Data).ResponseTimeMs); // API responses time
Console.WriteLine(((BusinessUserResponse)response.Data).Success); // true
Request Attributes
Key | Type | Description |
---|---|---|
header | JSON object | Required. Required keys: created - Unix epoch timestamp in seconds. Must not be future-dated and must not be dated more than 5 minutes in the past.app_handle - your app handleuser_handle - the user_handle to be assigned to the entity. Must be unique. Use /check_handle to determine availability of a user_handle.Optional keys: reference : Can be any value for your own reference. If not provided, one will be assigned.version : Cannot be null if key is present. Valid values: 0.2, v0.2, V0.2 |
address | JSON object | Optional for request. Required to pass KYC. For individuals only, the street address must be their current home/residential address. P.O. Boxes and similar cannot be used unless the individual has a valid US Military P.O. Box on a military base. |
address. address_alias | String | Optional. Min length 0, Max length 40. May not be null. Example: home |
address. street_address_1 | String | Optional for request. Required to pass KYC. Min length 3, Max length 40. May not be null. Example: 920 SW 6th Ave. |
address. street_address_2 | String | Optional. Min length 3, Max 40 Example: Suite 216 |
address.city | String | Optional for request. Required to pass KYC. Min length 2, Max 40 Example: Portland |
address.state | String | Optional for request. Required to pass KYC. Requires valid 2 letter abbreviation for US states. Min length 2, Max 2 Example: OR |
address.postal_code | String | Optional for request. Required to pass KYC. Min length 5, Max 10 Examples: 97204-1234, 97204 |
address.country | String | Optional for request. Required to pass KYC. Only valid value: US |
identity | JSON object | Optional for request. Required to pass KYC. Registers one ID (SSN, EIN) to an entity. |
identity. identity_alias | String | Required if identity.identity_value is present, otherwise optional. UPPER-CASE Values: SSN or EIN |
identity. identity_value | String | Optional for request. Required to pass KYC. If identity.identity_alias is an SSN or ITIN, this value should match the required simplified SSN regex pattern: ^\d{3}-?\d{2}-?\d{4}$. If identity.identity_alias is EIN, this value should match the required EIN regex pattern: ^\d{2}-?\d{7}$. Example: 123452222 |
contact | JSON object | Optional for request. Required to pass KYC. Registers email, phone to an entity. |
contact.phone | String | Optional for request. Required to pass KYC. Min length 10, Max length 30 This value should match the regex pattern: ([0-9])?((?[0-9]{3})?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$ Example: 503-123-4567 |
contact. contact_alias | String | Optional. Min length 0, Max length 40 |
contact.email | String | Optional for request. Required to pass KYC. Valid email address. Max length 254 Example: [email protected] |
entity | JSON object | Required. |
entity.birthdate | Date | Optional for request. Required to pass KYC. Date must be in this format: YYYY-MM-DD If the entity type is individual, the end user must be 18+. Birthdate cannot be a future date. Example: 1985-01-31 |
entity.entity_name | String | Required if entity.type is business, otherwise optional. Min Length 3, Max 200 Examples: Jane M. Doe, Sila Inc. |
entity.first_name | String | Optional for request regardless of entity type. Required to pass KYC if entity type is individual. Min Length 1, Max 40 Example: Jane Restricted characters: ^±!@£$%^&*_+§¡€#¢¶•ªº«<>?/:;|=)“ |
entity.last_name | String | Optional for request regardless of entity type. Required to pass KYC if entity type is Individual. Min Length 1, Max 40 Example: Doe Restricted characters: ^±!@£$%^&*_+§¡€#¢¶•ªº«<>?/:;|=)“ |
entity.type | String | Optional. Valid values: individual or business If not specified, other validation fields assume individual entity type. |
entity. business_type | String | Optional for request regardless of entity type. Required to pass KYB if entity type is business and business_type_uuid is not set. Do not include is business_type_uuid has a value. Get from allowed business types in /get_business_types endpoint. |
entity. business_type_uuid | String | Optional for request regardless of entity type. Required to pass KYB if entity.type is business and entity. business_type is not set. Do not include if business_type has a value. Must be a valid UUID4 string. Get from allowed business types in /get_business_types endpoint. |
entity.naics_code | Integer | Optional for request regardless of entity type. Required to pass KYB if entity.type is business. This field is used to specify a valid NAICS code. Get from allowed NAICS codes in /get_naics_categories endpoint. Example: 721 |
entity. doing_business_as | String | Optional. Use if entity.type is business. Fill this field out if your business name is different from its legal name. |
entity. business_website | String | Optional. Use if entity.type is business. Must be in URI format. This value should match the regex pattern: ^(?:[a-z0-9.-+])://(?:[^\s:@/]+ (?::[^\s:@/])?@)?(?:(?:25[0-5]|2[0-4]\d|[0-1]?\d?\d)(?:.(?:25 [0-5]|2[0-4]\d|[0-1]?\d?\d)){3}|[[0-9a-f:.]+]|(a-z\xA1-\uFFFF0- 9?(?:.(?!-)[a-z\xA1-\uFFFF0-9-]{1,63}(?<!-)).(?!-)(?:[a-z\xA1- \uFFFF-]{2,63}|xn--[a-z0-9]{1,59})(?<!-).?|localhost))(?::\d {2,5})?(?:[/?#][^\s])?\Z Example: http://www.yourdomain.com |
entity.registration_state | String | Optional. Use if entity type is business. 2 letter US state abbreviation. Options are the 50 US states and DC. |
Responses
Status Code | Success Attribute | Description |
---|---|---|
200 | true | Handle successfully added to system with KYC data. |
400 | false | Invalid request body format (validation_details key will have more information if this is the case), handle already in use, or blockchain address already in use. |
401 | false | authsignature header was absent or incorrect. |
Updated 20 days ago