Create Account to link processes by user
An account identifies users in Truora’s system and is represented by an account_id
.
This unique identifier enables tracking validations and processes while allowing access to the associated user’s data.
In this guide, you’ll learn about the available options for creating account IDs in Truora’s system.
Account creation options
There are three ways to generate an account_id
:
- Use your user’s ID as the
account_id
in Truora’s system. - Use an automatically generated
account_id
, assigned by Truora’s system. - Create a customized account using the Create Validation Account endpoint.
The following sections explain each option so you can choose the best approach for your use case.
Use your user ID as the account_id
If your system already assigns a unique identifier to users, you can use it as the account_id
in Truora’s system.
This approach will initially create an empty account, but you can update or add data to it later as needed.
To use this option:
- When generating a Web Token for user processes or creating a Validation, provide your system’s user identifier as the value for the
account_id
parameter. - Ensure that the same
account_id
is used consistently across all user processes in Truora’s system to maintain correct associations with the user account and data.
Note:
- Only Account IDs matching the regex pattern [a-zA-Z0-9_.-]+ are supported.
Use an account_id generate by Truora’s system
This option provides a unique, automatically generated account_id
, creating an empty account initially. You can update or add data to the account later as needed.
- When generating the Web Token for user processes or creating a Validation, leave the
account_id
parameter empty. This tells the system to generate a random alphanumericaccount_id
automatically.
Note: Be sure to save the generated
account_id
and use it consistently across all user processes within Truora’s system.
Create Validation Account endpoint
This feature allows you to create an account_id
while also storing user information within Truora’s system. The stored data can be accessed or updated as needed.
To create an account follow these steps. You may also refer to our API Reference:
- Create a
POST
request to the endpointhttps://api.validations.truora.com/v1/accounts
. - Add the next headers
Truora-API-Key
: Your Truora API-key.Content-Type
: Set toapplication/x-www-form-urlencoded
.
- Add the following
key : value
params in the requestbody
usingx-www-form-urlencoded
format:account_id
[Optional]: Customized ID for the validation account being created. Only account IDs matching the pattern [a-zA-Z0-9_.-]+ are supported. If omitted, a random alphanumeric account ID is automatically created.email
[Optional]: Email address of the person associated with the account.country
[Optional]: Country where the person associated with the account is located, specified in ISO 3166 Alpha-2 format (e.g., CO for Colombia). See the full list of ISO Country Codes.document_number
[Optional]: Document number of the person associated with the account.document_type
[Optional]: Allowed:national-id
|foreign-id
|identity-card
|passport
. Type of document for the person associated with the account.document_issue_date
[Optional]: Issue date of the person’s document, formatted in RFC3339 (e.g., 2000-05-24).first_name
[Optional]: First name of the person associated with the account.last_name
[Optional]: Last name of the person associated with the account.phone_number
[Optional]: Phone number of the person associated with the account.facebook_user
[Optional]: Facebook username of the person associated with the account.twitter_user
[Optional]: X (formerly Twitter) username of the person associated with the account.
Notes:
- Only Account IDs following the regex pattern [a-zA-Z0-9_.-]+ are supported.
- All parameters are optional:
- If only
account_id
is provided, an empty account is created with that ID. You can update other parameters later.- If no
account_id
is provided but other parameters are included, anaccount_id
will be randomly generated, incorporating the provided parameters.- If no parameters are provided, an empty account is created with a randomly generated
account_id
. You can update other parameters later.- Save the
account_id
, as it will be the unique identifier for your user in Truora’s system. All identity-related processes performed on your user should be associated with thisaccount_id
.
Send the request. A successful account creation should show the details of the account, including the parameters provided in the Create Validation Account request.
Example Request and Response
A request with the following parameters:
account_id
: “my_test_account_6543”first_name
: “John”last_name
: “Doe”email
: “jhon.doe@demo.com
”"
Generates the following response:
https://api.validations.truora.com/v1/accounts
Additional account management endpoints
The following account-related endpoints can help with user account management and integration into Truora’s system. For more details and additional endpoints, refer to our API Reference.
Get Account
Allows you to retrieve details of a specific validation account_id
.
To get the account details, follow these steps. You may also refer to our API Reference:
- Create a
GET
request to the endpointhttps://api.validations.truora.com/v1/accounts/{{account_id}}
. - Add the next headers
Truora-API-Key
: Your Truora API-key.Content-Type
: Set toapplication/x-www-form-urlencoded
.
Send the request. A successful request should show the details of the account.
Example Request and Response
A request using the account_id
from the example in the Create Validation Account section, “my_test_account_6543”, generates the following response:
https://api.validations.truora.com/v1/accounts/{{account_id}}
List Validation Accounts
Allows you to retrieve all validation accounts created under your client account in Truora´s system.
To get a list of accounts, follow these steps. You may also refer to our API Reference:
- Create a
GET
request to the endpointhttps://api.validations.truora.com/v1/accounts
. - Add the next headers
Truora-API-Key
: Your Truora API-key.Content-Type
: Set toapplication/x-www-form-urlencoded
.
- Use the optional
start_key
query parameter for pagination.
Send the request. A successful response will look similar to the following:
https://api.validations.truora.com/v1/accounts
Get Account Validations
Allows you to retrieve all validations linked to a specific account_id.
To get all validations of an account, follow these steps. You may also refer to our API Reference:
- Create a
GET
request to the endpointhttps://api.validations.truora.com/v1/accounts/{{account_id}}/validations
. - Add the next headers
Truora-API-Key
: Your Truora API-key.Content-Type
: Set toapplication/x-www-form-urlencoded
.
Send the request. A successful response will return the validation history of the specified account_id
, similar to the following example:
https://api.validations.truora.com/v1/accounts/{{account_id}}/validations
List Identity
Allows you to retrieve the current status and details of all identity processes. Use query parameters to filter results based on specific criteria, such as account_id
:
- Use the
search
query parameter to filter processes byaccount_id
, or other attributes associated with the processes.
For complete details on this endpoint and its filtering options, refer to our API Reference.
The following example retrieves processes associated with a specific account_id
using the search
query parameter:
- Create a
GET
request to the endpoint:https://api.identity.truora.com/v1/processes/
. - Add the next headers
Truora-API-Key
:<api key>
Get an API keyContent-Type
:application/x-www-form-urlencoded
- Include the next query-string parameter:
search
: Theaccount_id
whose processes you want to retrieve.
The response will list all processes performed under the specified account_id
, such as in this example using “1234567_client”:
https://api.identity.truora.com/v1/processes/?search=1234567_client