/update/<registration-data>

Update an existing email, phone number, street address, identity, or entity (name, birthdate, or business data).

Afte

POST /0.2/update/address 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]

{
    "header": {
        "created": 1234567890,
        "app_handle": "your_app_handle",
        "user_handle": "your_individual_end_user",
        "reference": "<your unique id>"
    },
    "uuid": "5de836eb-9234-42bc-b7da-5e9991ab2d4b",
    "address_alias": "New nickname"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "message": "Successfully updated address with UUID 5de836eb-9234-42bc-b7da-5e9991ab2d4b.",
    "address": {
        "added_epoch": 1599090039,
        "modified_epoch": 1599093463,
        "uuid": "5de836eb-9234-42bc-b7da-5e9991ab2d4b",
        "nickname": "New nickname",
        "street_address_1": "123 NW 1st Ave.",
        "street_address_2": "",
        "city": "Portland",
        "state": "OR",
        "country": "US",
        "postal_code": "12345"
    },
    "status": "SUCCESS",
    "reference": "<your unique id>"
}
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",
  uuid: "5de836eb-9234-42bc-b7da-5e9991ab2d4b",
};

const res = await sila.updateAddress(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,
    "uuid": uuid
}

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

{
    "status_code": 200,
    "success": true,
    "message": "Successfully updated 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()
        .uuid("some-uuid-code")
        .addressAlias("new address")
        .streetAddress1("324 Songbird Avenue")
        .streetAddress2("Apt. 132") // Optional.
        .city("Portland")
        .state("VA")
        .country("US")
        .postalCode("12345")
        .build();
ApiResponse response = api.updateAddress(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 updated 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 = 'update_address'; // Optional. This is a nickname that can be attached to the address object. While a required field, it can be left blank if desired.
$streetAddress1 = '124 Main St'; // Optional. This is line 1 of a street address. Post office boxes are not accepted in this field.
$city = 'Sometown'; // Optional. Name of the city where the person being verified is a current resident.
$state = 'CA'; // Optional. Name of state where verified person is a current resident.
$country = Country::US(); // Optional. Two-letter country code.
$postalCode = '54321'; // Optional. In the US, this can be the 5-digit ZIP code or ZIP+4 code.
$streetAddress2 = '' // Optional. This is line 2 of a street address. This may include suite or apartment numbers.
$uuid = 'some-uuid-code';
$response = $client->updateAddress($userHandle, $privateKey, $uuid, $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; // some-uuid-code
echo $response->getData()->address->nickname; // update_address
echo $response->getData()->address->street_address_1; // 124 Main St
echo $response->getData()->address->street_address_2; //
echo $response->getData()->address->city; // Sometown
echo $response->getData()->address->state; // CA
echo $response->getData()->address->country; // US
echo $response->getData()->address->postal_code; // 54321
var address = new AddressMessage
{
    Uuid = "some-uuid-code", // Required
    AddressAlias = "new_address",
    StreetAddress1 = "324 Songbird Avenue",
    StreetAddress2 = "Apt. 132",
    City = "Portland",
    State = "VA",
    PostalCode = "12345",
    Country = "US"
};
var response = api.UpdateAddress(user.UserHandle, user.PrivateKey, address);

// Success Object 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 updated 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 updated.
400falseBad request format - check validation_details for more information.
404falseUUID is not associated with an address registered to the given user.
403falseauthsignature or usersignature header was absent or incorrect.

/update/entity

Requests

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

For individual entities, you can pass any of the following keys:

  • first_name
  • last_name
  • entity_name
  • birthdate

For business entities, you can pass any of the following keys:

  • entity_name
  • birthdate
  • business_type
  • naics_code
  • doing_business_as
  • business_website
  • registration_state

Note that you cannot convert an individual user to a business or a business to an individual.

Authorization / Authentication

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

Apps using Access Token Authorization

Use a valid access token in an Authorization: Bearer request header.

See Authenticating with an Access Token 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 the section on ECDSA Authentication for more detail about ECDSA signature generation.

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/update/entity 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]

{
    "header": {
        "created": 1234567890,
        "app_handle": "your_app_handle",
        "user_handle": "your_individual_end_user",
        "reference": "<your unique id>"
    },
    "first_name": "Newfirst",
    "last_name": "Newlast",
    "entity_name": "New Full Name",
    "birthdate": "1990-02-28"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "message": "Successfully updated entity with handle \"your_individual_end_user\".",
    "user_handle": "your_individual_end_user",
    "entity_type": "individual",
    "entity": {
        "created_epoch": 1599090039,
        "entity_name": "New Full Name",
        "birthdate": "1990-02-28",
        "first_name": "Newfirst",
        "last_name": "Newlast"
    },
    "status": "SUCCESS",
    "reference": "<your unique id>"
}
// Individual
const entity = {
  first_name: "NewFirst",
  last_name: "NewLast",
  entity_name: "NewFirst NewLast",
  birthdate: "1994-01-08",
};

const res = await sila.updateEntity(handle, key, entity);

console.log(res.statusCode);
console.log(res.data.success);
console.log(res.data.status);
console.log(res.data.message);
console.log(res.data.entity_type);
console.log(res.data.user_handle);
console.log(res.data.entity.created_epoch);
console.log(res.data.entity.entity_name);
console.log(res.data.entity.birthdate);
console.log(res.data.entity.first_name);
console.log(res.data.entity.last_name);

// Business
const business = {
  entity_name: "New Company",
  business_type: "corporation",
  naics_code: 721,
  doing_business_as: "NC Ltc.",
  business_website: "https://newdomain.go",
  registration_state: "OR",
};

const res = await sila.updateEntity(handle, key, business);

console.log(res.statusCode);
console.log(res.data.success);
console.log(res.data.status);
console.log(res.data.message);
console.log(res.data.entity_type);
console.log(res.data.user_handle);
console.log(res.data.entity.created_epoch);
console.log(res.data.entity.entity_name);
console.log(res.data.entity.business_type);
console.log(res.data.entity.naics_code);
console.log(res.data.entity.doing_business_as);
console.log(res.data.entity.business_website);
console.log(res.data.entity.registration_state);
# Update Business Entity
payload = {
    "user_handle": business_handle,
    "entity_name": entity_name,
    "birthdate": birthdate,
    "business_type": business_type,
    "naics_code": naics_code,
    "doing_business_as": doing_business_as,
    "business_website": business_website,
    "registration_state":"NY"
}
response = silasdk.User.updateRegistrationData(app, silasdk.RegistrationFields.ENTITY, payload, eth_private_key)

# Success Response
{
    "status_code": 200,
    "success": true,
    "message": "Successfully updated entity with handle your_business_end_user.",
    "user_handle": "your_business_end_user",
    "entity_type": "business",
    "entity": {
        "created_epoch": 1599090039,
        "entity_name": "New Company",
        "birthdate": "1990-02-28",
        "business_type": "corporation",
        "naics_code": 721,
        "doing_business_as": "NC Limited",
        "business_website": "https://yourwebsite.domain",
        "business_uuid": "2966e38f-e713-4994-a22f-56e076963d01",
        "naics_category": "Accommodation and Food Services",
        "naics_subcategory": "Accommodation",
        "registration_state":"NY"
    },
    "status": "SUCCESS"
}
// Individual entity
UserHandleMessage user = UserHandleMessage.builder()
        .userHandle("user_handle")
        .userPrivateKey("user_private_key")
        .build();
IndividualEntityMessage message = IndividualEntityMessage.builder()
        .firstName("NewFirst")
        .lastName("NewLast")
        .entityName("NewFirst NewLast")
        .birthdate(LocalDate.of(1994, 1, 8))
        .build();
ApiResponse response = api.updateEntity(user, message);

// Success response
System.out.println(response.getStatusCode()); // 200
IndividualEntityResponse parsedResponse = (IndividualEntityResponse) response.getData();
System.out.println(parsedResponse.getSuccess()); // true
System.out.println(parsedResponse.getStatus()); // SUCCESS
System.out.println(parsedResponse.getMessage()); // Successfully updated entity
System.out.println(parsedResponse.getUserHandle()); // user_handle
System.out.println(parsedResponse.getEntityType()); // individual
System.out.println(parsedResponse.getEntity().getCreatedEpoch());
System.out.println(parsedResponse.getEntity().getEntityName());
System.out.println(parsedResponse.getEntity().getBirthdate());
System.out.println(parsedResponse.getEntity().getFirstName());
System.out.println(parsedResponse.getEntity().getLastName());

// Business entity
UserHandleMessage user = UserHandleMessage.builder()
        .userHandle("user_handle")
        .userPrivateKey("user_private_key")
        .build();
BusinessEntityMessage message = BusinessEntityMessage.builder()
        .entityName("New Company")
        .birthdate(LocalDate.now())
        .businessType("corporation")
        .naicsCode(721)
        .doingBusinessAs("NC")
        .businessWebsite("https://somedomain.go")
        .registrationState("registration state") // Optional for KYB flow
        .build();
ApiResponse response = api.updateEntity(user, message);

// Success response
System.out.println(response.getStatusCode()); // 200
BusinessEntityMessage parsedResponse = (BusinessEntityMessage) response.getData();
System.out.println(parsedResponse.getSuccess()); // true
System.out.println(parsedResponse.getStatus()); // SUCCESS
System.out.println(parsedResponse.getMessage()); // Successfully updated entity
System.out.println(parsedResponse.getUserHandle()); // user_handle
System.out.println(parsedResponse.getEntityType()); // business
System.out.println(parsedResponse.getEntity().getCreatedEpoch());
System.out.println(parsedResponse.getEntity().getEntityName());
System.out.println(parsedResponse.getEntity().getBirthdate());
System.out.println(parsedResponse.getEntity().getBusinessType());
System.out.println(parsedResponse.getEntity().getNaicsCode());
System.out.println(parsedResponse.getEntity().getNaicsCategory());
System.out.println(parsedResponse.getEntity().getNaicsSubcategory());
System.out.println(parsedResponse.getEntity().getBusinessUuid());
System.out.println(parsedResponse.getEntity().getDoingBusinessAs());
System.out.println(parsedResponse.getEntity().getBusinessWebsite());
System.out.println(parsedResponse.getEntity().getRegistrationState());
// Request - Individual
use DateTime;

$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$entityName = 'Full Name'; // Optional. The individual full name
$birthdate = new DateTime::createFromFormat('m/d/Y', '1/8/1960'); // Optional. Only date part will be taken when sent to api
$firstName = 'First'; // Optional. The individual first name
$lastName = 'Last'; // Optional. The individual last name
$response = $client->updateEntity($userHandle, $privateKey, $firstName, $lastName, $entityName, $birthdate);

// Response 200 - Individual
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()->user_handle;
echo $response->getData()->entity_type; // individual
echo $response->getData()->entity->created_epoch;
echo $response->getData()->entity->entity_name; // Full Name
echo $response->getData()->entity->birthdate; // 1960-01-08
echo $response->getData()->entity->first_name; // First
echo $response->getData()->entity->last_name; // Last

// Request - Business
use DateTime;

$userHandle = 'user.silamoney.eth';
$privateKey = 'some private key';
$entityName = 'Company Name'; // Optional. The individual full name
$birthdate = new DateTime::createFromFormat('m/d/Y', '1/8/2009'); // Optional. Only date part will be taken when sent to api
$businessType = 'corporation'; // Optional. You can get this values from getBusinessTypes
$naicsCode = 721; // Optional. You can get this codes from getNaicsCategories
$doingBusinessAs = 'Public Company Name'; // Optional.
$businessWebsite = 'https://yourcompony.domain'; // Optional. Must be a valid URL
$registrationState = "LA"; // Optional

$response = $client->updateBusinessEntity($userHandle, $privateKey, $entityName, $birthdate, $businessType, $naicsCode, $doingBusinessAs, $businessWebsite, $registrationState);

// Response 200 - Business
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()->entity_type; // business
echo $response->getData()->entity->created_epoch;
echo $response->getData()->entity->entity_name; // Company Name
echo $response->getData()->entity->birthdate; // 2009-01-08
echo $response->getData()->entity->business_type; // corporation
echo $response->getData()->entity->naics_code; // 721
echo $response->getData()->entity->business_uuid; // The business uuid
echo $response->getData()->entity->naics_category; // The NAICS category
echo $response->getData()->entity->naics_subcategory; // The NAICS subcategory
echo $response->getData()->entity->doing_business_as; // Publick Company Name
echo $response->getData()->entity->business_website; // https://yourcompany.domain
// Request - Individual
var entity = new IndividualEntityMessage
{
    FirstName = "NewFirst",
    LastName = "NewLast",
    EntityName = "NewFirst NewLast",
    BirthDate = new DateTime(1994, 1, 8)
};
var response = api.UpdateEntity(user.UserHandle, user.PrivateKey, entity);

// Success Object Response - Individual
Console.WriteLine(response.StatusCode); // 200
var parsedResponse = (IndividualEntityResponse)response.Data;
Console.WriteLine(parsedResponse.Success); // true
Console.WriteLine(parsedResponse.Status); // SUCCESS
Console.WriteLine(parsedResponse.Message); // Successfully updated entity
Console.WriteLine(parsedResponse.UserHandle); // youruserhandle
Console.WriteLine(parsedResponse.EntityType); // individual
Console.WriteLine(parsedResponse.Entity.CreatedEpoch);
Console.WriteLine(parsedResponse.Entity.EntityName);
Console.WriteLine(parsedResponse.Entity.Birthdate);
Console.WriteLine(parsedResponse.Entity.FirstName);
Console.WriteLine(parsedResponse.Entity.LastName);
POST /0.2/update/entity 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_business_end_user",
        "reference": "<your unique id>"
    },
    "business_type": "corporation",
    "entity_name": "Your Business Customer, Inc.",
    "birthdate": "1975-01-15",
    "naics_code": 721,
    "doing_business_as": "Your Business Customer Alias Co."
    "registration_state": "OR",
    "business_website": "http://www.yourbusinesscustomer.com"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "message": "Successfully updated entity with handle \"your_business_end_user\".",
    "user_handle": "your_business_end_user",
    "entity_type": "business",
    "entity": {
        "created_epoch": 1599090039,
        "business_type": "corporation",
        "entity_name": "Your Business Customer, Inc.",
        "birthdate": "1975-01-15",
        "naics_code": 721,
        "doing_business_as": "Your Business Customer Alias Co."
        "registration_state": "OR",
        "business_website": "http://www.yourbusinesscustomer.com"
    },
    "status": "SUCCESS",
    "reference": "<your unique id>"
}
// Request - Business
var entity = new BusinessEntityMessage
{
    EntityName = "New Company",
    BusinessType = "type",
    NaicsCode = 123,
    DoingBusinessAs = "NC Ltd.",
    BusinessWebsite = "https://domain.go",
    RegistrationState="DC"
};
var response = api.UpdateEntity(user.UserHandle, user.PrivateKey, entity);

// Success Object Response - Business
Console.WriteLine(response.StatusCode); // 200
var parsedResponse = (BusinessEntityResponse)response.Data;
Console.WriteLine(parsedResponse.Success); // true
Console.WriteLine(parsedResponse.Status); // SUCCESS
Console.WriteLine(parsedResponse.Message); // Successfully updated entity
Console.WriteLine(parsedResponse.UserHandle); // youruserhandle
Console.WriteLine(parsedResponse.EntityType); // business
Console.WriteLine(parsedResponse.Entity.CreatedEpoch);
Console.WriteLine(parsedResponse.Entity.EntityName);
Console.WriteLine(parsedResponse.Entity.BusinessType);
Console.WriteLine(parsedResponse.Entity.NaicsCode);
Console.WriteLine(parsedResponse.Entity.BusinessUuid);
Console.WriteLine(parsedResponse.Entity.NaicsCategory);
Console.WriteLine(parsedResponse.Entity.NaicsSubcategory);
Console.WriteLine(parsedResponse.Entity.DoingBusinessAs);
Console.WriteLine(parsedResponse.Entity.BusinessWebsite);
Console.WriteLine(parsedResponse.Entity.RegistrationState); // DC

Responses

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