/add/<registration-data>

Add a new email, phone number, street address, or identity to a registered entity.

After registering a user, sometimes the user will move to a new address, get a new phone number, or want to add new information that wasn't available when the user first onboarded in order to go through a more stringent identity verification. Adding new information to an existing user is now possible with the /add endpoint.

The following are valid /add paths:

  • /add/email: Add a single email address to your user entity.
  • /add/phone: Add a single phone number to your user entity.
  • /add/identity: Add an identity (social security number or employer identification number) to your user entity. Note: a user cannot have more than one of the same identity type registered to them (i.e. user cannot have 2 SSNs).
  • /add/address: Add a valid street address to your user entity.
  • /add/device: Add a valid Iovation device token and session_identifier to your user entity, used in Instant ACH (beta) KYC flows.
  

/add/email

Requests

The request body at this endpoint is the header_msg JSON object.

header.user_handle should have the registered handle to be verified.

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 authentication section for more details on how to generate this signature.

email is a required key containing the new email address to be registered to the specified user handle.

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/add/email HTTP/1.1
Host: sandbox.silamoney.com
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
Content-Type: application/json

{
    "header": {
        "created": 1234567890,
        "app_handle": "your_app_handle",
        "user_handle": "your_individual_end_user"
    },
    "email": "[email protected]"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "message": "Successfully added email to user your_individual_end_user.",
    "email": {
        "added_epoch": 1599006972,
        "modified_epoch": 1599006972,
        "uuid": "30c41951-1f2b-445b-8604-fa748316881d",
        "email": "[email protected]"
    },
   "response_time_ms": "171",
   "status": "SUCCESS"
}
const res = await sila.addEmail(userHandle, userPrivateKey, email);

// Success Response Object

console.log(res.statusCode); // 200
console.log(res.data.success); // true
console.log(res.data.status); // SUCCESS
console.log(res.data.message); // Successfully added email
console.log(res.data.email.added_epoch);
console.log(res.data.email.modified_epoch);
console.log(res.data.email.uuid);
console.log(res.data.email.email);
payload = {
    "user_handle": user_handle,
    "email": email,
}

response = silasdk.User.addRegistrationData(
    app, silasdk.RegistrationFields.EMAIL, payload, eth_private_key)    
    
{
    "status_code": 200,
    "success": true,
    "message": "Successfully added email to user your_individual_end_user.",
    "email": {
        "added_epoch": 1599006972,
        "modified_epoch": 1599006972,
        "uuid": "30c41951-1f2b-445b-8604-fa748316881d",
        "email": "[email protected]"
    },
    "status": "SUCCESS"
}
UserHandleMessage user = UserHandleMessage.builder()
        .userHandle("user_handle")
        .userPrivateKey("user_private_key")
        .build();
EmailMessage message = EmailMessage.builder()
        .email("[email protected]")
        .build();
ApiResponse response = api.addEmail(user, message);
// Success response
System.out.println(response.getStatusCode()); // 200
EmailResponse parsedResponse = (EmailResponse) response.getData();
System.out.println(parsedResponse.getSuccess()); // true
System.out.println(parsedResponse.getStatus()); // SUCCESS
System.out.println(parsedResponse.getMessage()); // Successfully added [data]
System.out.println(parsedResponse.getEmail().getAddedEpoch());
System.out.println(parsedResponse.getEmail().getModifiedEpoch());
System.out.println(parsedResponse.getEmail().getUuid());
System.out.println(parsedResponse.getEmail().getEmail());
// Email
$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$email = '[email protected]';
$response = $client->addEmail($userHandle, $privateKey, $email);

// Phone
$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$phone = '1234567890';
$response = $client->addPhone($userHandle, $privateKey, $phone);

// Identity
use Silamoney\Client\Domain\IdentityAlias;

$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$identityAlias = IdentityAlias::SSN();
$identityValue = '543212222';
$response = $client->addIdentity($userHandle, $privateKey, $identityAlias, $identityValue);

// Address
use Silamoney\Client\Domain\Country;

$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$nickname = 'new_address'; // This is a nickname that can be attached to the address object. While a required field, it can be left blank if desired.
$streetAddress1 = '123 Main St'; // This is line 1 of a street address. Post office boxes are not accepted in this field.
$city = 'Anytown'; // Name of the city where the person being verified is a current resident.
$state = 'NY'; // Name of state where verified person is a current resident.
$country = Country::US(); // Two-letter country code.
$postalCode = '12345'; // In the US, this can be the 5-digit ZIP code or ZIP+4 code.
$streetAddress2 = '' // This is line 2 of a street address (optional). This may include suite or apartment numbers.
$response = $client->addAddress($userHandle, $privateKey, $nickname, $streetAddress1, $city, $state, $country, $postalCode, $streetAddress2);

echo $response->getStatusCode(); // 200
echo $response->getData()->success; // TRUE
echo $response->getData()->status; // SUCCESS
echo $response->getData()->message; // Successfully added [data] to user user.silamoney.eth.
echo $response->getData()->email->added_epoch;
echo $response->getData()->email->modified_epoch;
echo $response->getData()->email->uuid; // The email uuid
echo $response->getData()->email->email; // [email protected]

echo $response->getData()->phone->added_epoch;
echo $response->getData()->phone->modified_epoch;
echo $response->getData()->phone->uuid; // The phone uuid
echo $response->getData()->phone->phone; // 1234567890

echo $response->getData()->identity->added_epoch;
echo $response->getData()->identity->modified_epoch;
echo $response->getData()->identity->uuid; // The identity uuid
echo $response->getData()->identity->identity_type; // SSN
echo $response->getData()->identity->identity; // 543212222

echo $response->getData()->address->added_epoch;
echo $response->getData()->address->modified_epoch;
echo $response->getData()->address->uuid; // The address uuid
echo $response->getData()->address->nickname; // new_address
echo $response->getData()->address->street_address_1; // 123 Main St
echo $response->getData()->address->street_address_2; //
echo $response->getData()->address->city; // Anytown
echo $response->getData()->address->state; // NY
echo $response->getData()->address->country; // US
echo $response->getData()->address->postal_code; // 12345
var response = api.AddEmail(userHandle, privateKey, email);

// Success Response
Console.WriteLine(response.StatusCode); // 200
var parsedResponse = (EmailResponse)response.Data;
Console.WriteLine(parsedResponse.Success); // true
Console.WriteLine(parsedResponse.Status); // SUCCESS
Console.WriteLine(parsedResponse.Message); // Successfully added email
Console.WriteLine(parsedResponse.Email.AddedEpoch);
Console.WriteLine(parsedResponse.Email.ModifiedEpoch);
Console.WriteLine(parsedResponse.Email.Uuid);
Console.WriteLine(parsedResponse.Email.Email);

Responses

Status Codesuccess AttributeDescription
200trueEmail was successfully added.
400falseBad request format - check validation_details for more information.
403falseauthsignature or usersignature header was absent or incorrect.
  

/add/phone

Requests

The request body at this endpoint is the header_msg JSON object.

header.user_handle should have the registered handle to be verified.

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 authentication section for more details on how to generate this signature.

phone is a required key containing the new phone number to be registered to the specified user handle.

sms_opt_in is an optional key containing a boolean value (if not provided, treated as false). If this is set to true, sends a confirmation SMS to the phone number being added.

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/add/identity HTTP/1.1
Host: sandbox.silamoney.com
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
Content-Type: application/json

{
    "header": {
        "created": 1234567890,
        "app_handle": "your_app_handle",
        "user_handle": "your_individual_end_user"
    },
    "phone": "1234567890"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "message": "Successfully added identity to user your_individual_end_user.",
    "phone": {
        "added_epoch": 1599007660,
        "modified_epoch": 1599007660,
        "uuid": "ac6435a7-d960-4b0a-9c04-adf99102ba57",
        "phone": "1234567890"
    },
    "status": "SUCCESS"
}
const userHandle = 'handle';
const userPrivateKey = '0x...';
const phone = '1234567890';
const options = {
    smsOptIn: true
}; // This properties are optional
const res = await sila.addPhone(userHandle, userPrivateKey, phone, options);

// Success Response Object

console.log(res.statusCode); // 200
console.log(res.data.success); // true
console.log(res.data.status); // SUCCESS
console.log(res.data.message); // Successfully added phone
console.log(res.data.phone.added_epoch);
console.log(res.data.phone.modified_epoch);
console.log(res.data.phone.uuid);
console.log(res.data.phone.phone);
console.log(res.data.phone.sms_confirmation_requested);
console.log(res.data.phone.sms_confirmed);
console.log(res.data.phone.primary);
payload = {
    "user_handle": user_handle,
    "phone": phone,
    "sms_opt_in": sms_opt_in,
}

response = silasdk.User.addRegistrationData(app, silasdk.RegistrationFields.PHONE, payload, eth_private_key)

{
    "status_code": 200,
    "success": true,
    "message": "Successfully added phone to user your_individual_end_user.",
    "phone": {
        "added_epoch": 1599007660,
        "modified_epoch": 1599007660,
        "uuid": "ac6435a7-d960-4b0a-9c04-adf99102ba57",
        "phone": "3189250987"
    },
    "status": "SUCCESS"
}
UserHandleMessage user = UserHandleMessage.builder()
        .userHandle("user_handle")
        .userPrivateKey("user_private_key")
        .build();
PhoneMessage message = PhoneMessage.builder()
        .phone("1234567890")
        .smsOptIn(true)
        .build();
ApiResponse response = api.addPhone(user, message);

// Success response
System.out.println(response.getStatusCode()); // 200
PhoneResponse parsedResponse = (PhoneResponse) response.getData();
System.out.println(parsedResponse.getSuccess()); // true
System.out.println(parsedResponse.getStatus()); // SUCCESS
System.out.println(parsedResponse.getMessage()); // Successfully added phone
System.out.println(parsedResponse.getPhone().getAddedEpoch());
System.out.println(parsedResponse.getPhone().getModifiedEpoch());
System.out.println(parsedResponse.getPhone().getUuid());
System.out.println(parsedResponse.getPhone().getPhone());
$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$phone = '1234567890';
$smsOptIn = true;
$response = $client->addPhone($userHandle, $privateKey, $phone, $smsOptIn);

echo $response->getStatusCode(); // 200
echo $response->getData()->success; // TRUE
echo $response->getData()->status; // SUCCESS
echo $response->getData()->message; // Successfully added phone to user user.silamoney.eth.
echo $response->getData()->phone->added_epoch;
echo $response->getData()->phone->modified_epoch;
echo $response->getData()->phone->uuid; // The phone uuid
echo $response->getData()->phone->phone; // 1234567890
echo $response->getData()->phone->sms_confirmation_requested; // false
echo $response->getData()->phone->sms_confirmed = false; // false
echo $response->getData()->phone->primary; //false
var response = api.AddPhone(userHandle, privateKey, phone, smsOptIn);

// Success Response
Console.WriteLine(response.StatusCode); // 200
var parsedResponse = (PhoneResponse)response.Data;
Console.WriteLine(parsedResponse.Success); // true
Console.WriteLine(parsedResponse.Status); // SUCCESS
Console.WriteLine(parsedResponse.Message); // Successfully added phone
Console.WriteLine(parsedResponse.Phone.AddedEpoch);
Console.WriteLine(parsedResponse.Phone.ModifiedEpoch);
Console.WriteLine(parsedResponse.Phone.Uuid);
Console.WriteLine(parsedResponse.Phone.Phone);

Responses

Status Codesuccess AttributeDescription
200truePhone was successfully added.
400falseBad request format - check validation_details for more information.
403falseauthsignature or usersignature header was absent or incorrect.

OR

SMS is not enabled for the requesting app, if sms_opt_in was set to True in the request.
  

/add/identity

Requests

The request body at this endpoint is the header_msg JSON object.

header.user_handle should have the registered handle to be verified.

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 authentication section for more details on how to generate this signature.

Additionally, both identity_alias and identity_value keys are required in this request. The identity_alias key must be either "SSN" if the entity is an individual or "EIN" if a business.

Importantly, a user cannot have more than one SSN or EIN registered to them at one time.

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/add/identity HTTP/1.1
Host: sandbox.silamoney.com
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
Content-Type: application/json

{
    "header": {
        "created": 1234567890,
        "app_handle": "your_app_handle",
        "user_handle": "your_individual_end_user"
    },
    "identity_alias": "SSN",
    "identity_value": "543212222"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "message": "Successfully added identity to user your_individual_end_user.",
    "identity": {
        "added_epoch": 1599007660,
        "modified_epoch": 1599007660,
        "uuid": "ac6435a7-d960-4b0a-9c04-adf99102ba57",
        "identity_type": "SSN",
        "identity": "*2222"
    },
    "status": "SUCCESS"
}
payload = {
    "user_handle": business_handle,
    "identity_alias": identityAlias,
    "identity_value": identityValue
}

response = silasdk.User.addRegistrationData(app, silasdk.RegistrationFields.IDENTITY, payload, eth_private_key)

{
    "status_code": 200,
    "success": true,
    "message": "Successfully added identity to user your_individual_end_user.",
    "identity": {
        "added_epoch": 1599007660,
        "modified_epoch": 1599007660,
        "uuid": "ac6435a7-d960-4b0a-9c04-adf99102ba57",
        "identity_alias": "SSN",
        "identity_value": "*2222"
    },
    "status": "SUCCESS"
}
UserHandleMessage user = UserHandleMessage.builder()
        .userHandle("user_handle")
        .userPrivateKey("user_private_key")
        .build();
IdentityMessage message = IdentityMessage.builder()
        .identityAlias("SSN")
        .identityValue("123452222")
        .build();
ApiResponse response = api.addIdentity(user, message);

// Success response
System.out.println(response.getStatusCode()); // 200
IdentityResponse parsedResponse = (IdentityResponse) response.getData();
System.out.println(parsedResponse.getSuccess()); // true
System.out.println(parsedResponse.getStatus()); // SUCCESS
System.out.println(parsedResponse.getMessage()); // Successfully added identity
System.out.println(parsedResponse.getIdentity().getAddedEpoch());
System.out.println(parsedResponse.getIdentity().getModifiedEpoch());
System.out.println(parsedResponse.getIdentity().getUuid());
System.out.println(parsedResponse.getIdentity().getIdentityType());
System.out.println(parsedResponse.getIdentity().getIdentity());
$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$identityAlias = IdentityAlias::SSN();
$identityValue = '543212222';
$response = $client->addIdentity($userHandle, $privateKey, $identityAlias, $identityValue);

echo $response->getStatusCode(); // 200
echo $response->getData()->success; // TRUE
echo $response->getData()->status; // SUCCESS
echo $response->getData()->message; // Successfully added identity to user user.silamoney.eth.
echo $response->getData()->identity->added_epoch;
echo $response->getData()->identity->modified_epoch;
echo $response->getData()->identity->uuid; // The identity uuid
echo $response->getData()->identity->identity_type; // SSN
echo $response->getData()->identity->identity; // 543212222
var identity = new IdentityMessage
{
    IdentityAlias = "SSN",
    IdentityValue = "543212222"
};
var response = api.AddIdentity(user.UserHandle, user.PrivateKey, identity);

// Success Response
Console.WriteLine(response.StatusCode); // 200
var parsedResponse = (IdentityResponse)response.Data;
Console.WriteLine(parsedResponse.Success); // true
Console.WriteLine(parsedResponse.Status); // SUCCESS
Console.WriteLine(parsedResponse.Message); // Successfully added identity
Console.WriteLine(parsedResponse.Identity.AddedEpoch);
Console.WriteLine(parsedResponse.Identity.ModifiedEpoch);
Console.WriteLine(parsedResponse.Identity.Uuid);
Console.WriteLine(parsedResponse.Identity.IdentityType);
Console.WriteLine(parsedResponse.Identity.Identity);
let identity = {
    alias: 'SSN',
    value: '543212222',
};
let res = await Sila.addIdentity(userHandle, userPrivateKey, identity);

// Success Response Object

console.log(res.statusCode); // 200
console.log(res.data.success); // true
console.log(res.data.status); // SUCCESS
console.log(res.data.message); // Successfully added identity
console.log(res.data.identity.added_epoch);
console.log(res.data.identity.modified_epoch);
console.log(res.data.identity.uuid);
console.log(res.data.identity.identity);
console.log(res.data.identity.identity_type);

Responses

Status Codesuccess AttributeDescription
200trueAddress was successfully added.
400falseBad request format - check validation_details for more information.
403falseauthsignature or usersignature header was absent or incorrect.
  

/add/address

Requests

The request body at this endpoint is the header_msg JSON object.

header.user_handle should have the registered handle to be verified.

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 authentication section for more details on how to generate this signature.

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.

Additional keys needed to register an address are as follows:

KeyTypeDescriptionRequired
address_aliasstringThis is a nickname that can be attached to the address object. While a required field, it can be left blank if desired.true
street_address_1stringThis is line 1 of a street address. Post office boxes are not accepted in this field.true
street_address_2stringThis is line 2 of a street address (optional). This may include suite or apartment numbers (though, if desired, you can put these in line 1).false
citystringName of the city where the person being verified is a current resident.true
statestringName of state where verified person is a current resident. (As of writing, this is a required field as the only accepted country is the US, but this may be expected to change in future versions.)true
countrystringTwo-letter country code. (As of writing, the only acceptable value is US.)true
postal_codestringIn the US, this can be the 5-digit ZIP code or ZIP+4 code.true
POST /0.2/add/address HTTP/1.1
Host: sandbox.silamoney.com
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
Content-Type: application/json

{
    "header": {
        "created": 1234567890,
        "app_handle": "your_app_handle",
        "user_handle": "your_individual_end_user"
    },
    "address_alias": "Home Number Two",
    "street_address_1": "324 Songbird Avenue",
    "street_address_2": "Apt. 132",
    "city": "Portland",
    "state": "VA",
    "postal_code": "12345",
    "country": "US"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "message": "Successfully added address to user your_individual_end_user.",
    "address": {
        "added_epoch": 1599008272,
        "modified_epoch": 1599008272,
        "uuid": "2966e38f-e713-4994-a22f-56e076963d01",
        "nickname": "Home Number Two",
        "street_address_1": "324 Songbird Avenue",
        "street_address_2": "Apt 132",
        "city": "Portland",
        "state": "VA",
        "country": "US",
        "postal_code": "12345"
    },
    "status": "SUCCESS"
}
const address = {
  alias: "Home Number Two",
  street_address_1: "324 Songbird Avenue",
  street_address_2: "Apt. 132",
  city: "Portland",
  state: "VA",
  postal_code: "12345",
  country: "US",
};
const res = await sila.addAddress(handle, key, address);

console.log(res.statusCode);
console.log(res.data.success);
console.log(res.data.status);
console.log(res.data.message);
console.log(res.data.address.added_epoch);
console.log(res.data.address.modified_epoch);
console.log(res.data.address.uuid);
console.log(res.data.address.nickname);
console.log(res.data.address.street_address_1);
console.log(res.data.address.street_address_2);
console.log(res.data.address.city);
console.log(res.data.address.state);
console.log(res.data.address.country);
console.log(res.data.address.postal_code);
payload = {
    "user_handle": user_handle,
    "address_alias": address_alias,
    "street_address_1": street_address_1,
    "street_address_2": street_address_2,
    "city": city,
    "state": state,
    "postal_code": postal_code,
    "country": country
}

response = silasdk.User.addRegistrationData(app, silasdk.RegistrationFields.ADDRESS, payload, eth_private_key)

{
    "status_code": 200,
    "success": true,
    "message": "Successfully added address to user your_individual_end_user.",
    "address": {
        "added_epoch": 1599008272,
        "modified_epoch": 1599008272,
        "uuid": "2966e38f-e713-4994-a22f-56e076963d01",
        "nickname": "Home Number Two",
        "street_address_1": "324 Songbird Avenue",
        "street_address_2": "Apt 132",
        "city": "Portland",
        "state": "VA",
        "country": "US",
        "postal_code": "12345"
    },
    "status": "SUCCESS"
}
UserHandleMessage user = UserHandleMessage.builder()
        .userHandle("user_handle")
        .userPrivateKey("user_private_key")
        .build();
AddressMessage message = AddressMessage.builder()
        .addressAlias("new address")
        .streetAddress1("324 Songbird Avenue")
        .streetAddress2("Apt. 132") // Optional.
        .city("Portland")
        .state("VA")
        .country("US")
        .postalCode("12345")
        .build();
ApiResponse response = api.addAddress(user, message);

// Success response
System.out.println(response.getStatusCode()); // 200
AddressResponse parsedResponse = (AddressResponse) response.getData();
System.out.println(parsedResponse.getSuccess()); // true
System.out.println(parsedResponse.getStatus()); // SUCCESS
System.out.println(parsedResponse.getMessage()); // Successfully added address
System.out.println(parsedResponse.getAddress().getAddedEpoch());
System.out.println(parsedResponse.getAddress().getModifiedEpoch());
System.out.println(parsedResponse.getAddress().getUuid());
System.out.println(parsedResponse.getAddress().getNickname());
System.out.println(parsedResponse.getAddress().getStreetAddress1());
System.out.println(parsedResponse.getAddress().getStreetAddress2());
System.out.println(parsedResponse.getAddress().getCity());
System.out.println(parsedResponse.getAddress().getState());
System.out.println(parsedResponse.getAddress().getCountry());
System.out.println(parsedResponse.getAddress().getPostalCode());
use Silamoney\Client\Domain\Country;

$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$nickname = 'new_address'; // This is a nickname that can be attached to the address object. While a required field, it can be left blank if desired.
$streetAddress1 = '123 Main St'; // This is line 1 of a street address. Post office boxes are not accepted in this field.
$city = 'Anytown'; // Name of the city where the person being verified is a current resident.
$state = 'NY'; // Name of state where verified person is a current resident.
$country = Country::US(); // Two-letter country code.
$postalCode = '12345'; // In the US, this can be the 5-digit ZIP code or ZIP+4 code.
$streetAddress2 = '' // This is line 2 of a street address (optional). This may include suite or apartment numbers.
$response = $client->addAddress($userHandle, $privateKey, $nickname, $streetAddress1, $city, $state, $country, $postalCode, $streetAddress2);

echo $response->getStatusCode(); // 200
echo $response->getData()->success; // TRUE
echo $response->getData()->status; // SUCCESS
echo $response->getData()->message; // Successfully added identity to user user.silamoney.eth.
echo $response->getData()->address->added_epoch;
echo $response->getData()->address->modified_epoch;
echo $response->getData()->address->uuid; // The address uuid
echo $response->getData()->address->nickname; // new_address
echo $response->getData()->address->street_address_1; // 123 Main St
echo $response->getData()->address->street_address_2; //
echo $response->getData()->address->city; // Anytown
echo $response->getData()->address->state; // NY
echo $response->getData()->address->country; // US
echo $response->getData()->address->postal_code; // 12345
var address = new AddressMessage
{
    AddressAlias = "new_address",
    StreetAddress1 = "324 Songbird Avenue",
    StreetAddress2 = "Apt. 132", // Optional
    City = "Portland",
    State = "VA",
    PostalCode = "12345",
    Country = "US"
};
var response = api.AddAddress(user.UserHandle, user.PrivateKey, address);

// Success Response
Console.WriteLine(response.StatusCode); // 200
var parsedResponse = (AddressResponse)response.Data;
Console.WriteLine(parsedResponse.Success); // true
Console.WriteLine(parsedResponse.Status); // SUCCESS
Console.WriteLine(parsedResponse.Message); // Successfully added address
Console.WriteLine(parsedResponse.Address.AddedEpoch);
Console.WriteLine(parsedResponse.Address.ModifiedEpoch);
Console.WriteLine(parsedResponse.Address.Uuid);
Console.WriteLine(parsedResponse.Address.Nickname);
Console.WriteLine(parsedResponse.Address.StreetAddress1);
Console.WriteLine(parsedResponse.Address.StreetAddress2);
Console.WriteLine(parsedResponse.Address.City);
Console.WriteLine(parsedResponse.Address.State);
Console.WriteLine(parsedResponse.Address.Country);
Console.WriteLine(parsedResponse.Address.PostalCode);

Responses

Status Codesuccess AttributeDescription
200trueAddress was successfully added.
400falseBad request format - check validation_details for more information.
403falseauthsignature or usersignature header was absent or incorrect.

/add/device

Requests

header.user_handle should have the registered handle to be verified.

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 authentication section for more details on how to generate this signature.

device_fingerprint is a required key containing the Iovation device token to be used in verification.
session_identifier is a optional key containing the sardine session id (uuid) used for Sardine Anti-fraud feature.

POST /0.2/add/device HTTP/1.1
Host: sandbox.silamoney.com
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
Content-Type: application/json

{
    "header": {
        "created": 1234567890,
        "auth_handle": "your_app_handle",
        "user_handle": "your_individual_end_user"
    },
    "device_fingerprint": "longdevicetokenstringhere",
    "session_identifier": "d1b40916-3761-69fe-aa54-88b8ca4d1d5c"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "message": "Device successfully registered for handle your_individual_end_user.",
    "status": "SUCCESS"
}
const userHandle = "handle";
const userPrivateKey = "0x...";
const device = {
  deviceFingerprint: "longdevicetokenstringhere",
};

// OR In case of Instant ACH User also add Sardine session identifier
const device = {
  deviceFingerprint: "longdevicetokenstringhere",
  sessionIdentifier: "valid Sardine session identifier"
};
const res = await sila.addDevice(userHandle, userPrivateKey, device);

console.log(res.statusCode); // 200
console.log(res.data.success); // true
console.log(res.data.status); // SUCCESS
console.log(res.data.message); // Device successfully registered for handle handle.
from silasdk.users import User
from silasdk.registrationFields import RegistrationFields

payload = {
  'user_handle': 'your_user_handle',
  'device_fingerprint': 'your_device_fingerprint',
  'session_identifier': 'your_session_identifier',
}

response = User.add_registration_data(app, silasdk.RegistrationFields.DEVICE, payload, eth_private_key)

# Success Response
{
   "success":True,
   "message":"Device successfully registered for handle your_user_handle.",
   "status":"SUCCESS",
   "status_code":200
}
$deviceAlias = 'my-device';
$deviceFingerprint = 'Device Fingerprint';
$sessionIdentifier = "session identifier";
$uuid = "some uuid";
$response = $client->addDevice($handle, $privateKey, $deviceAlias, $deviceFingerprint, $uuid, $sessionIdentifier);

echo $response->getStatusCode(); // 200
echo $response->getData()->success; // TRUE
echo $response->getData()->status; // SUCCESS
echo $response->getData()->message; // Device successfully registered for handle user.silamoney.eth.
UserHandleMessage user = UserHandleMessage.builder().userHandle("user handle).userPrivateKey("user private kky").build();
Device device = new Device("12345678909876","session identifier");
ApiResponse response = api.addDevice(user, device);

DeviceResponse parsedResponse = (DeviceResponse) response.getData();
string sessionIdentifier = "using for Sardine"; // optional field
ApiResponse<object> response = api.AddDevice(userHandle, userPrivateKey, deviceFingerprint, sessionIdentifier);

// Success Response

Console.WriteLine(response.StatusCode); // 200
BaseResponse parsedResponse = (BaseResponse)response.Data;
Console.WriteLine(parsedResponse.Success); // true
Console.WriteLine(parsedResponse.Status); // SUCCESS
Console.WriteLine(parsedResponse.Message); // Device successfully registered for handle your_user_handle

Responses

Status CodesuccessDescription
200trueDevice token successfully added to database.
400falseBad request. Check validation_details for more information.
401falseAuthentication failed; authsignature or usersignature header was absent or incorrect.