Applicants Creating an applicant Let's create an applicant, ready to be verified.
This endpoint allows you to create an applicant on a chosen flow that you've created within the platform.
Flows allow you to choose what you'd like to screen an applicant for, and which documents you'd like verified. For example, a basic flow you've created may require the applicant to provide one identity document and go through a selfie check.
If you haven't created a Flow yet, create one by going to https://enterprise.personr.co/dashboard/flows before proceeding.
Create an applicant
POST
/api-applicant-create
Create an applicant, ready to be verified.
Body
The applicant's email address (required)
The applicant's phone number (required)
The applicant's first name (optional)
The applicant's last name (optional)
The name of the flow you'd like the applicant to go through
(required)
An internal unique identifier, or source, that you can use to identify where the entity came from, which is returned in all responses (optional)
External identifiers that are returned in all responses (optional)
Request
cURL Node.js Javascript Ruby Python
Copy curl --location 'https://enterprise.personr.co/api/1.1/wf/api-applicant-create' \
--form 'email="johndoe@mail.com"' \
--form 'phone="+61 424 424 424"' \
--form 'nameFirst="John"' \
--form 'nameLast="Doe"' \
--form 'flowName="KYC basic"' \
--form 'sourceKey="Example Source Key"' \
--form 'externalUserId=["UUID1","UUID2"]'
Copy var axios = require ( 'axios' );
var FormData = require ( 'form-data' );
var data = new FormData ();
data .append ( 'email' , 'johndoe@mail.com' );
data .append ( 'phone' , '+61 424 424 424' );
data .append ( 'nameFirst' , 'John' );
data .append ( 'nameLast' , 'Doe' );
data .append ( 'flowName' , 'KYC basic' );
var config = {
method : 'post' ,
maxBodyLength : Infinity ,
url : 'https://enterprise.personr.co/api/1.1/wf/api-applicant-create' ,
headers : {
... data .getHeaders ()
} ,
data : data
};
axios (config)
.then ( function (response) {
console .log ( JSON .stringify ( response .data));
})
.catch ( function (error) {
console .log (error);
});
Copy var form = new FormData ();
form .append ( "email" , "johndoe@mail.com" );
form .append ( "phone" , "+61 424 424 424" );
form .append ( "nameFirst" , "John" );
form .append ( "nameLast" , "Doe" );
form .append ( "flowName" , "KYC basic" );
var settings = {
"url" : "https://enterprise.personr.co/api/1.1/wf/api-applicant-create" ,
"method" : "POST" ,
"timeout" : 0 ,
"processData" : false ,
"mimeType" : "multipart/form-data" ,
"contentType" : false ,
"data" : form
};
$ .ajax (settings) .done ( function (response) {
console .log (response);
});
Copy require "uri"
require "net/http"
url = URI ( "https://enterprise.personr.co/api/1.1/wf/api-applicant-create" )
https = Net :: HTTP . new (url . host , url . port)
https . use_ssl = true
request = Net :: HTTP :: Post . new (url)
form_data = [[ 'email' , 'johndoe@mail.com' ] , [ 'phone' , '+61 424 424 424' ] , [ 'nameFirst' , 'John' ] , [ 'nameLast' , 'Doe' ] , [ 'flowName' , 'KYC basic' ]]
request . set_form form_data , 'multipart/form-data'
response = https . request(request)
puts response . read_body
Copy import requests
url = "https://enterprise.personr.co/api/1.1/wf/api-applicant-create"
payload = { 'email' : 'johndoe@mail.com' ,
'phone' : '+61 424 424 424' ,
'nameFirst' : 'John' ,
'nameLast' : 'Doe' ,
'flowName' : 'KYC basic' }
files = [
]
headers = {}
response = requests . request ( "POST" , url, headers = headers, data = payload, files = files)
print (response.text)
Response
200 400
Copy {
"status" : "success" ,
"response" : {
"applicantId" : "4242424242424x424242424242424242" ,
"email" : "johndoe@mail.com" ,
"phone" : "+61 424 424 424" ,
"nameFirst" : "John" ,
"nameLast" : "Doe" ,
"flowName" : "KYC basic" ,
"applicantStatus" : "Created"
}
}
Copy {
"statusCode" : 400 ,
"message" : "Error: Cannot read docSets - incorrect flow name"
}
Remember to input the flow name exactly as you created it. Don't use the template name.
Last updated 4 months ago