POST
/
v1
/
user
/
create
/
encrypted
curl --request POST \
  --url https://staging.terminal3.io/v1/user/create/encrypted \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <x-api-token>' \
  --data '{
  "wallet": {
    "address": "<string>",
    "chain_id": "<string>"
  },
  "encrypted_profile": {
    "version": "<string>",
    "nonce": "<string>",
    "ephem_public_key": "<string>",
    "ciphertext": "<string>"
  }
}'
{
  "data": {
    "user_id": 123
  }
}

This API allows you to create a Terminal 3 user account based on an email or (optional) wallet address. User data will be securely stored in decentralized storage.

The UserProfile schema must adhere to the following format. Please ask us for more details on the validation rules for each field.

JSON
{
email_address: string;
first_name: string;
middle_name?: string;
last_name: string;
user_name?: string;
residence_country?: CountryOptions;
residence_province?: ProvinceOptions;
residence_city?: CityOptions;
mobile_number?: number;
mobile_country_code?: string;
gender?: GenderOptions;
date_of_birth?: string;
language_primary?: LanguageOptions;
language_others?: LanguageOptions;
employment_status?: EmploymentStatusOptions;
employment_industry?: EmploymentIndustryOptions;
marital_status?: MaritalStatusOptions;
education?: EducationOptions;
household_income?: HouseholdIncomeOptions;
}

We also provide an SDK with a function called makeEncryptedUserMsg to encrypt the user profile with our public key, please contact us for more details.

JavaScript
import { makeEncryptedUserMsg } from "@terminal3/messaging_client";

const t3PublicKey = "b/fo6+4q2FpC0X5Tv32I7s4uT1yaGPPgClsTztVw+UY=";

const encryptedMsg = makeEncryptedUserMsg(
  {
    first_name: "Michael",
    last_name: "Dowsen",
    email_address: "michael_dowsen@gmail.com",
  },
  t3PublicKey,
  true
);

console.log(JSON.stringify(encryptedMsg));

Example input payload:

JSON
{
  "wallet": {
    "address": "0x2EF2922885EDcf2151f6C863e58adcEc70c11356",
    "chain_id": "1"
  },
  "encrypted_profile": {
    "version": "x25519-xsalsa20-poly1305",
    "nonce": "j85PmoUS+XCR79RBnZpY68imEtluKK1t",
    "ephem_public_key": "ZYAFFnmvyt55Q8dhZ2vpVcp5LXS572/oWrMTFMJ+j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syMyEHD1hGM0V9Ykj9C+Ij+av75h1N3gybPdqT0NZpJ72AGbcfqApoAFx1WvlOTkXwIPU+bC3yB7J0T4SMix6TJWerXASzdLNJ8ArebyT5wm9EEmxP3noWwe15SdszbHTSBc/fGlCfT2j+WfYosv06vtjb4r8Aut3pR+Jjgx4+b99H7q7hJzyEGy32Fj1izE6IDfU4eFtMRSfilBH8Ym+kR5/9wR97OJvEQanbPc9cK2zmgTl6lDQyqo1H4FjpwjDUptxVri0fbg43cJ3YjJpRfyPiAct8vuMz2ZiAayXyNTbrjdsPJFk68nnS/aRufGR/QntGoh64hV+CnbuoWr48ujYtHe0tO7JdCrcj+dav0q0oNhtix1X9wgV8xvMZzYYoc56tG9/HfunAOy9SZva/Brtr2iXWREQYzzGmLSi8Ezl3+w6yRjLjs7yrsPo9TqKujUurG3/AFrZK8Nv4Yww6Dm8wmg6YHIn3U2FEgswCZ9879TrhNCHcQfg2inJmbiWQ3cftnEj23MaI4deA/bnVHtCtRXdagMX3oPN07Uj+MDYwq2bxH67nW4FtwECRBzGPJx8fRSCU="
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-token
string
required
x-api-subclient-id
string

Body

application/json
encrypted_profile
object
required
wallet
object

Response

200
application/json
Success
data
object
required