Skip to main content

Create a New Person Account

POST /accounts/persons

Description​

Create a new person account with the provided information.

Request Body​

  • Media Type: application/json
NameTypeDescription
tenantUserId*string(Required). A unique identifier for the user within the tenant. Include in the request body.
email*string(Required). Email address associated with the person account. Include in the request body.
firstName*string(Required). First name of the person. Include in the request body.
lastName*string(Required). Last name of the person. Include in the request body.
middleNamestring(Optional). Middle name of the person. Include in the request body if applicable.
address*object(Required). Address information for the person. Include in the request body.
identificationNumberstring(Optional). Identification number associated with the person. Include in the request body.
phoneNumber*string(Required). Phone number associated with the person. Include in the request body.
userTagstring(Optional). A tag or label for the person. Include in the request body.
dateOfBirth*string (ISO 8601 date-time)(Required). Date of birth of the person. Include in the request body.
genderstring(Optional). Gender of the person (e.g., "MALE", "FEMALE", "OTHER"). Include in the request body.

Example​

cURL​

curl --location 'http://20.87.230.105/platform/wallets/accounts/persons' \
--header 'apiKey: 6987f1c0-f01f-4b31-86e5-416ccaa906de' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGQ2NmNmYWQ2NWQ1NTNhZDYwOTBiY2IiLCJmaXJzdE5hbWUiOiJTQUJJIE5HIiwibGFzdE5hbWUiOiJQbGF0Zm9ybSIsInVzZXJuYW1lIjoidGVjaEBzYWJpLmFtIiwicGFzc3dvcmQiOm51bGwsInR5cGUiOiJVU0VSIiwiY291bnRyeSI6eyJuYW1lIjoiTmlnZXJpYSIsImNvZGUiOiJORyIsImN1cnJlbmN5IjoiTkdOIiwiX2lkIjoiNjRkNjZjZmFkNjVkNTUzYWQ2MDkwYmNjIn0sInRlbmFudHMiOlsiNjRkYjY4NmIzZjljNGJjMThkNWM2NTA3IiwiNjRmYjMzYjEwMTUzMWNkYWFhZTlkMzM5Il0sInJvbGVzIjpbIlRFTkFOVF9TVVBFUl9BRE1JTiIsIlRFTkFOVF9BRE1JTiJdLCJpYXQiOjE3MDIyOTgyODgsImV4cCI6MTcwMjkwMzA4OH0.9BIMwE8o52p1-KPX9M7xmtXVNC86yWypbUejtMpvJC8' \
--data-raw '{
"tenantUserId": "unique_user_id",
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"middleName": "Smith",
"address": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 456",
"state": "California",
"city": "San Francisco",
"zipCode": "94105"
},
"identificationNumber": "ABC123XYZ",
"phoneNumber": "07036497792",
"userTag": "VIP",
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"gender": "MALE"
}'

Response Code: 200 - OK​

Description​

Found the account.

Response Field​

FieldTypeDescription
statusbooleanIndicates the overall success of the operation.
statusCodeintegerRepresents the specific status code for the response.
messagestringProvides additional information about the response.
dataobjectContains the main data payload of the response.
errorsarrayAn array containing error details if issues occurred.
- messagestringDescribes the error.
- descriptiveMessagestringProvides a more detailed and descriptive message about the error.

Example​

<response>
<status>true</status>
<statusCode>0</statusCode>
<message>string</message>
<data></data>
<errors>
<error>
<message>string</message>
<descriptiveMessage>string</descriptiveMessage>
</error>
</errors>
</response>


Response Code: 400 - Bad Request​

Description​

Validation error.

Example​

<response>
<status>false</status>
<statusCode>400</statusCode>
<message>Invalid account id</message>
<data></data>
<errors>
<error>
<message>Invalid account id</message>
<descriptiveMessage></descriptiveMessage>
</error>
</errors>
</response>

curlUrl: "/accounts/persons" curlMethod: POST​

Method: POST​

>http://20.87.230.105/platform/wallets/accounts/persons

Headers​

Content-TypeValue
apiKey{{apiKey}}

Body (raw)​

{
"tenantUserId": "unique_user_id",
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"middleName": "Smith",
"address": {
"addressLine1": "123 Main St",
"addressLine2": "Apt 456",
"state": "California",
"city": "San Francisco",
"zipCode": "94105"
},
"identificationNumber": "ABC123XYZ",
"phoneNumber": "07036497792",
"userTag": "VIP",
"dateOfBirth": "1990-01-15T00:00:00.000Z",
"gender": "MALE"
}

🔑 Authentication bearer​

ParamvalueType
token{{accessCode}}string

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /accounts/persons \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!