In this section, you will find how to create a process in Unico via the REST API
Getting started
Creates a magic link to start a KYC web process hosted by Unico.
After the user finished the process, the user magic link will be inactivated and the user will not be able to use it again.
You will need to create a new magic link for the user to start a new KYC process.
Base URL:
Sandbox:https://sandbox.trully.ai;
Production:https://api.trully.ai.
Create a Magic Link
post
Endpoint to create a new KYC process in Magic Link integration.
Authorizations
x-api-keystringRequired
Body
external_idstringOptional
An external identifier for the request, used for tracking and reference purposes.
Responses
200
Magic link successfully created
application/json
post
/v2/magic-link
200
Magic link successfully created
Enum track_webhook_url
Key
Description
step
Name of the previous completed step.
user_id
The external_id you set in the magic link.
started_on
UTC timezone. Step starting time.
completed_on
UTC timezone. Step completion time.
Steps Table
Name
Description
form_start
User is currently scanning the document.
form document_front
The user has already captured the INE Front.
form document_back
The user has already captured the INE Back.
form_document
Process is currently in the selfie step.
form_selfie
User reach the final step of the operation.
form_decision_maker
The operation returns the system response.
Tracking process is a silent operation which means there is no UI to represent it. This process will succeed or fail without any interaction with the user.
Webhook V1 Requirements
HTTPS protocol: For security reasons, your webhook endpoint must use the HTTPS protocol;
Response time: The system will wait up to one minute for a response from your webhook server. After this period, the connection will be dropped. This will not impact the main process execution in any way;
Errors responses
Get Result
get
Endpoint to get the result of a process in Magic Link.
Authorizations
x-api-keystringRequired
Query parameters
magic_link_tokenstringRequired
Token returned when the Magic Link was created.
Responses
200
Successful response containing identity data and images.
application/json
get
/v2/history/request
200
Successful response containing identity data and images.
The valid field is used to indicate that the OCR texts could be extracted and structurally validated; it does not necessarily indicate that the data actually exists.
The address field, due to its lack of a generalized structure and because in some cases people have the option of not providing their address to the INE (National Institute of Statistics), the "valid" field is not taken into account for validating the structure.
Errors responses
Name
Type
Description
data
object
Defines an error structure for API responses, encapsulating error messages resulting from request processing.
data.error
string
A detailed description of the error encountered during the processing of the request.
data.error.atributte
array of strings
The list of attributes causing the error.
data.error.message
string
A detailed message explaining the error.
data.error.type
string
The type of error encountered.
request_date
string
The date and time when the request was made, in ISO 8601 format.
status
string
A textual representation of the response status, indicating success or failure of the operation.
status_code
integer
The HTTP status code of the response, providing a standardized indicator of the request's outcome.
version
string
The version of the API that processed the request, useful for tracking changes and compatibility.
{
"data": {
"error": [
{
"attribute": [
"magic_link_token"
],
"message": "Input should be a valid UUID, invalid group length in group 4: expected 12, found 11",
"type": "uuid_parsing"
}
]
},
"request_date": "2025-07-28T20:43:34",
"status": "There are some errors in the request",
"status_code": 400,
"version": "v3.6.0"
}
{
"data": {
"error": "This magic link have no requests associated"
},
"request_date": "2025-07-28T20:40:50",
"status": "Nothing matches the given URI",
"status_code": 404,
"version": "v3.6.0"
}