Skip to main content

Create Process

This is the entry point of every Unico API integration. Your back-end calls it to create a process; your front-end uses the returned tokens to render the iFrame, redirect the user, or initialize a native SDK.

For the full integration flow, see Flows.

Endpoint​

EnvironmentURL
ProductionPOST https://api.idcloud.unico.app/client/v1/process
SandboxPOST https://api.idcloud.uat.unico.app/client/v1/process

Request​

Headers
HeaderValue
AuthorizationBearer <access_token> (see Authentication)
Content-Typeapplication/json
Body parameters
Field requirements depend on the flow

Whether a field is required, optional, or not applicable depends on the flow you're integrating — check Flows for the specific recipe you're using before assuming a field's requirement from this table alone.

FieldTypeDescription
callbackUristringURL to which the user is redirected after the journey ends. Use / for native SDK flows where the callback is handled in-app.
flowstringFlow identifier — determines which capabilities run. Examples: idunicodocs, idunicosign, idchecktrust, idtoken, idsmart. See Available flows.
purposestringBusiness purpose. Accepted values: creditprocess, biometryonboarding, carpurchase, ageverification.
person.duiTypeenumDocument type. See duiType values below.
person.duiValuestringDocument number, without formatting.
person.friendlyNamestringUser's display name shown in the journey UI. Maximum 50 characters.
person.phonestringPhone number in DDI + DDD + number format, without separators. Required when sending notifications via SMS or WhatsApp.
person.emailstringEmail address. Required for flows with Electronic Signature.
person.​notificationsarrayNotification channels for sending the journey link. Each item has notificationChannel: NOTIFICATION_CHANNEL_WHATSAPP, NOTIFICATION_CHANNEL_SMS, or NOTIFICATION_CHANNEL_EMAIL.
referencesarrayReference inputs for 1:1 validation and Smart Revalidation flows. Each item contains referenceType (REFERENCE_TYPE_IMAGE_BASE64 or REFERENCE_TYPE_PROCESS_ID) and referenceContent (base64-encoded image or process UUID). Send at most one item — a longer array is rejected with 400, and referenceContent must not be empty.
useCasestringSmart Revalidation scenario. Required for 🇧🇷 idsmart, idsmart_r2, idsmart_tp1. Examples: USE_CASE_LOGIN, USE_CASE_FIN_TRANSACTIONS.
clientReferencestringUnique identifier of the user in your system. Required for the Multi Accounts capability. Unique in your base, maximum of 256 characters, no spaces.
companyBranchIdstring (UUID)Branch ID. Required only if the service account has more than one branch associated.
expiresInstringProcess validity window from creation. Format: "3600s". Defaults to 7 days if omitted.
flowConfigobjectPer-flow configuration overrides.
flowConfig.​biometryCapture.​enabledBackCamerabooleanUse the device's rear camera. Not compatible with document capture or Electronic Signature flows.
contextualizationobjectTransaction context shown to the user during the journey to explain the capture. Available to clients in any region — not limited to a specific country.
contextualization.​company_namestringCompany name displayed during the journey. Maximum 20 characters.
contextualization.​currencystringCurrency code displayed to the user. Accepted values: BRL, MXN, USD.
contextualization.​pricenumberTransaction amount displayed to the user.
contextualization.​localeobjectLocalized text shown during the journey. Keys: ptBr, enUs, esMx — these are the only supported languages for the text, regardless of the client's own region.
contextualization.locale.{ptBr|enUs|esMx}.reasonstringShort reason for the capture, shown during the journey. Maximum 50 characters.
contextualization.locale.{ptBr|enUs|esMx}.titlestringTitle of the customer notice shown during the journey. Maximum 100 characters. Must be provided together with text. HTML tags are stripped.
contextualization.locale.{ptBr|enUs|esMx}.textstringBody of the customer notice shown during the journey. Maximum 210 characters. Must be provided together with title. HTML tags are stripped.
imageBase64stringThe selfie, captured by your front-end and sent directly, in base64.
document.purposeenumWhat the document is for. Fixed vocabulary: DOCUMENT_PURPOSE_ONBOARDING, DOCUMENT_PURPOSE_CREDIT_PROCESS, DOCUMENT_PURPOSE_CAR_PURCHASE, DOCUMENT_PURPOSE_PAY_BY_PAYCHECK, DOCUMENT_PURPOSE_FGTS. Only used with Face Document Match flows.
document.​files[].​databytesNew document capture, base64-encoded. Available globally, not limited to Brazil. Mutually exclusive with document.documentId.
document.documentIdstring (UUID)Reuses a document already captured by the same person, instead of a new capture. Mutually exclusive with document.files[].
expectedResultobjectMocks a capability's result in test/sandbox environments and marks the response with simulated: true. See Simulating Results (Test Mock).
duiType values
CountryValueDescription
ARDUI_TYPE_AR_PASSPORTArgentine Passport
ARDUI_TYPE_AR_DNIArgentine DNI
ARDUI_TYPE_AR_LNCArgentine Driving Licence (Licencia Nacional de Conducir)
ATDUI_TYPE_AT_STNRAustrian Tax Number (STNR)
BEDUI_TYPE_BE_NNBelgian National Number (NN)
BRDUI_TYPE_BR_CPFBrazilian CPF
BRDUI_TYPE_BR_PASSPORTBrazilian Passport
BRDUI_TYPE_BR_CNPJBrazilian CNPJ
CADUI_TYPE_CA_SINCanadian SIN
CHDUI_TYPE_CH_AHVSwiss AHV/AVS Number
CLDUI_TYPE_CL_RUNChilean RUN
CLDUI_TYPE_CL_PASSPORTChilean Passport
CLDUI_TYPE_CL_LICENCIA_CONDUCIRChilean Driving Licence (Licencia de Conducir)
CODUI_TYPE_CO_NITColombian NIT
CODUI_TYPE_CO_PASSPORTColombian Passport
CODUI_TYPE_CO_LICENCIA_CONDUCCIONColombian Driving Licence (Licencia de Conducción)
CODUI_TYPE_CO_CCColombian Citizenship Card (Cédula de Ciudadanía)
DEDUI_TYPE_DE_IDNRGerman Tax Identification Number (IdNr)
DKDUI_TYPE_DK_CPRDanish CPR
ECDUI_TYPE_EC_NIEcuadorian NI
ESDUI_TYPE_ES_NIESpanish Foreigner Identity Number (NIE)
ESDUI_TYPE_ES_DNISpanish National Identity Document (DNI)
FIDUI_TYPE_FI_HETUFinnish Personal Identity Code (HETU)
FRDUI_TYPE_FR_SPIFrench Tax Reference Number (SPI)
GBDUI_TYPE_GB_NINOBritish National Insurance Number (NINO)
GTDUI_TYPE_GT_CUIGuatemalan CUI
IDDUI_TYPE_ID_NIKIndonesian NIK
IEDUI_TYPE_IE_PPSNIrish Personal Public Service Number (PPSN)
ITDUI_TYPE_IT_CFItalian Codice Fiscale (CF)
LKDUI_TYPE_LK_NICSri Lankan NIC
LUDUI_TYPE_LU_MATRICULELuxembourg National Identification Number (Matricule)
MXDUI_TYPE_MX_CURPMexican CURP
MXDUI_TYPE_MX_RFC_PERSONA_FISICAMexican RFC (Persona Física)
MXDUI_TYPE_MX_LICENCIA_CONDUCIRMexican Driving Licence (Licencia de Conducir)
NGDUI_TYPE_NG_NINNigerian NIN
NGDUI_TYPE_NG_BVNNigerian Bank Verification Number (BVN)
NGDUI_TYPE_NG_BVN_TOKENNigerian BVN Token (hashed)
NGDUI_TYPE_NG_NIN_TOKENNigerian NIN Token (hashed)
NLDUI_TYPE_NL_BSNDutch Citizen Service Number (BSN)
NODUI_TYPE_NO_FNRNorwegian National Identity Number (Fødselsnummer)
PEDUI_TYPE_PE_RUCPeruvian RUC
PEDUI_TYPE_PE_DNIPeruvian DNI
PEDUI_TYPE_PE_PASSPORTPeruvian Passport
PLDUI_TYPE_PL_PESELPolish PESEL
PTDUI_TYPE_PT_NIFPortuguese Tax Identification Number (NIF)
SEDUI_TYPE_SE_PNRSwedish Personal Number (PNR)
SEDUI_TYPE_SE_SAMORDNINGSNUMMERSwedish Coordination Number (Samordningsnummer)
TRDUI_TYPE_TR_TCKNTurkish Identification Number (TCKN)
USDUI_TYPE_US_SSNUnited States SSN
USDUI_TYPE_US_PASSPORTUnited States Passport
USDUI_TYPE_US_DRIVER_LICENSEUnited States Driver's License
USDUI_TYPE_US_PASSPORT_CARDUnited States Passport Card
USDUI_TYPE_US_POLYCARBONATE_PASSPORTUnited States Polycarbonate Passport
USDUI_TYPE_US_ID_CARDUnited States ID Card
UYDUI_TYPE_UY_CIUruguayan CI
ZZDUI_TYPE_ZZ_EMAILEmail address
ZZDUI_TYPE_ZZ_PHONE_NUMBERPhone number
Creating a process without a document

When the flow allows an optional document, you can omit person.duiType and person.duiValue. After the capture, the process waits in AWAITING_FOR_DOCUMENT until your back-end sends the document with Set Process Document.

Example​

curl -X POST https://api.idcloud.unico.app/client/v1/process \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"flow": "idunicodocs_r2",
"purpose": "biometryonboarding",
"clientReference": "pedido-88216",
"callbackUri": "https://your-app.example.com/onboarding/callback",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "12345678909"
}
}'

Responses​

200 OK
{
"process": {
"id": "b7c1f0a2-63d4-4f3e-9a17-2c8e5d41b0aa",
"flow": "idunicodocs_r2",
"state": "PROCESS_STATE_CREATED",
"result": "PROCESS_RESULT_UNSPECIFIED",
"purpose": "biometryonboarding",
"clientReference": "pedido-88216",
"person": {
"duiType": "DUI_TYPE_BR_CPF",
"duiValue": "12345678909"
},
"capacities": [
"PROCESS_CAPACITY_IDLIVE",
"PROCESS_CAPACITY_IDUNICO",
"PROCESS_CAPACITY_IDDOCS"
],
"authenticationInfo": {
"authenticationId": ""
},
"companyData": {
"branchId": "",
"countryCode": "BRA"
},
"callbackUri": "https://your-app.example.com/onboarding/callback",
"userRedirectUrl": "https://cadastro.unico.app/flow?id=b7c1f0a2-63d4-4f3e-9a17-2c8e5d41b0aa",
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9…",
"webAppToken": "eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0…",
"simulated": false
}
}
FieldTypeDescription
process.idstring (UUID)Process identifier. Use it to fetch the result via Get Process.
process.stateenumPROCESS_STATE_CREATED — process created, journey not yet started. PROCESS_STATE_FAILED — process creation failed.
process.resultenumVerification outcome. Present only when state = PROCESS_STATE_FINISHED — see Flows for the result values a given flow can return.
process.flowstringFlow identifier sent on creation.
process.purposestringBusiness purpose sent on creation.
process.callbackUristringCallback URI sent on creation.
process.​clientReferencestringYour internal identifier sent on creation. Only present if provided in the request.
process.​companyBranchIdstring (UUID)Branch ID. Only present if provided in the request.
process.​userRedirectUrlstringURL to redirect the user to (Web Redirect and iFrame integrations). Do not modify this URL.
process.tokenstringJWT for initializing the Web SDK iFrame.
process.webAppTokenstringJWT for initializing native SDKs (Android, iOS, Flutter).
process.createdAtstring (date-time)Timestamp when the process was created.
process.expiresAtstring (date-time)Timestamp after which the process expires and can no longer be completed.
process.capacitiesarrayCapabilities configured for this process.
process.​authenticationInfoobjectAuthentication information for the process (empty at creation time).
process.personobjectEcho of the person object sent on creation.
process.​companyData.​branchIdstring (UUID)Branch ID associated with the process.
process.​companyData.​countryCodestringCountry code associated with the branch (e.g., BR, MX).

Error Codes​

CodeMessageDescription
3invalid flowWhen the specified flow does not exist.
3invalid person: friendly name exceeds 50 characters.When the friendly name exceeds 50 characters.
3invalid purposeWhen the provided purpose is invalid.
3invalid callbackUri: unable to parse callbackUri: parse "": empty url, invalid callbackUri: url:When the provided callbackUri is invalid.
3invalid person: email required for notification channel NOTIFICATION_CHANNEL_EMAIL, invalid email address for notification channel NOTIFICATION_CHANNEL_EMAILWhen the provided email is invalid and email notification is configured.
3invalid person: phone number required for notification channel NOTIFICATION_CHANNEL_WHATSAPP, phone number does not contain 13 chars for notification channel NOTIFICATION_CHANNEL_WHATSAPPWhen the provided phone number is invalid and SMS or WhatsApp notification is configured.
3idnsv2/GetPublicID request error: rpc error: code = InvalidArgument desc = invalid dui valueWhen the provided identifier (duiValue) is invalid.
3invalid expiresIn argumentWhen the expiresIn value is invalid.
3invalid company_name argument in process contextualization, max length is 20When contextualization.​company_name exceeds 20 characters.
3title and text must be provided together in process contextsWhen only one of title or text is provided in a locale.
3invalid title argument in process contexts, max length is 100When a locale title exceeds 100 characters.
3invalid text argument in process contexts, max length is 210When a locale text exceeds 210 characters.
3invalid reason argument in process contexts, max length is 50When a locale reason exceeds 50 characters.
3The references array must contain at most one element.When more than one item is sent in references.
3The references[].referenceContent field is missing.When referenceContent is empty.
3The references[].referenceType field must be IMAGE_BASE64 or PROCESS_ID.When referenceType is not one of the supported values.
3A reference is required for this flow.When the flow requires a reference and none was sent. Send references[0] with referenceType PROCESS_ID or IMAGE_BASE64.
9The referenceProcessId field is invalid.When the reference process does not exist or cannot be reused. Names the field you sent — bioTokenId if you sent that one.
3INVALID_IMAGEWhen the image is not valid base64, or looks like an injection attempt.
3INVALID_DUIWhen the document number is non-standard or does not exist.
3IMAGE_TOO_LARGEWhen the image exceeds the maximum size of 800 KB.
3UNSUPPORTED_IMAGE_FORMATWhen the image format is not PNG, JPEG or WebP.
3MISSING_IMAGEWhen the image is required for this flow and was not sent.
3MISSING_NAMEWhen the name is required for this flow and was not sent.
3MISSING_DUIWhen the document number is required for this flow and was not sent.
3MISSING_PERSONWhen the person object is required for this flow and was not sent.
3INVALID_REQUESTWhen the request body is null or cannot be interpreted.
3TOKEN_ALREADY_USEDWhen the capture token has already been used. It is single-use.
3TOKEN_EXPIREDWhen the capture token has expired. It must be used within 10 minutes.
3INVALID_BUNDLEWhen the request does not meet the security requirements.
3INVALID_NAMEWhen the name is longer than the allowed maximum.
3INVALID_EMAILWhen the email address is malformed or too long.
3INVALID_PHONEWhen the phone number is longer than 20 characters.
3INVALID_DUI_TYPEWhen the document type is not one of the supported values.
3INVALID_CLIENT_REFERENCEWhen clientReference is too long, or contains a space or #.
3INVALID_CONSENT_TYPEWhen consentType is not NONE, DIRECT or INDIRECT.
3INVALID_USE_CASEWhen useCase is not recognised, or is too long.
3INVALID_DEVICE_TRUST_TOKENWhen the device-trust token is invalid or has already been consumed.
3TOO_MANY_REFERENCESWhen more than one item is sent in references.
3INVALID_REFERENCE_TYPEWhen referenceType is not IMAGE_BASE64 or PROCESS_ID.
3INVALID_REFERENCE_PROCESSWhen the reference process ID is not a valid identifier.
3REFERENCE_PROCESS_NOT_FOUNDWhen the referenced process does not exist.
3REFERENCE_PROCESS_NOT_READYWhen the referenced process has no reusable result, or was already consumed.
3REFERENCE_SELFIE_NOT_FOUNDWhen the referenced process carries no selfie to reuse.
3INVALID_CAPTURE_TOKENWhen the captured image is not a valid token produced by a capture SDK.
3INVALID_CAPTURE_SIGNATUREWhen the capture token's signature does not validate.
3PRIOR_CAPTURE_NOT_FOUNDWhen the prior capture this request builds on could not be located. Restart the process.
3PRIOR_CAPTURE_IN_PROGRESSWhen the prior capture has not finished yet. Retry shortly.
3PRIOR_CAPTURE_FAILEDWhen the prior capture could not be completed. Restart the process.
3INVALID_DOCUMENTWhen a document file is unreadable, password-protected, or in an unsupported format.
3INVALID_AUTH_PROCESSWhen document.authProcessId is invalid, expired, or belongs to another person.
3INVALID_DOCUMENT_PURPOSEWhen document.purpose is not one of the supported values.
3PROCESS_REUSE_NOT_ENABLEDWhen the flow does not allow reusing a prior process without an image. Send an image instead.
9PROCESS_FAILEDWhen the process reached a terminal failure while being created.
9Tenant API key is not configuredWhen the API Key is not properly configured.

What's next​