The endpoint allows you to create a quiz with existing or custom template for existing or new client. To identify profile/client a valid combination of email_address
and mobile_number
is required. If a profile matched with provided combination attributes will be updated, otherwise a new profile will be created. A json object is required to be posted as raw body. See example request, response objects and authentication process. The full API URL is :
POST https://authified.com/api/v1/quiz/create
Name | Type | Description |
---|---|---|
/merchant_reference | string(100) | Reference number provided by the merchant - (optional) |
/customer_id | string(100) | Customer Id provided by the merchant - (optional) |
/email_address | string(45) | A valid email address, unique for each customer - (required) |
/mobile_number | string(10) | A valid US/CAN 10 digit, without country code mobile phone number, unique for each customer - (required) |
/first_name | string(45) | Client's first name - (required) |
/middle_name | string(45) | Client's middle name - (optional) |
/last_name | string(45) | Client's last name - (required) |
/date_of_birth | date(10) | Client's date of birth - (optional) |
/home_phone_number | string(10) | A valid US/CAN 10 digit, without country code hoe phone number - (optional) |
/ip_address | string(45) | A Client's valid IP Address - (optional) |
/address_line_1 | string(100) | A Client's physical Address Line 1 - (optional) |
/address_line_2 | string(100) | A Client's physical Address Line 2 - (optional) |
/city | string(45) | A Client's city - (optional) |
/state | string(2) | A Client's state code, A valid ISO alpha 2 code - (optional) |
/postal | string(10) | A Client's postal/zip code - (optional) |
/country | string(2) | A Client's country code, A valid ISO alpha 2 code - (optional) |
/driver_licence_id | string(100) | A Client's driver licence id - (optional) |
/ssn | string(9) | A Client's SSN (social insurance number) - (optional) |
/quiz_expiry_days | int(2) | Default number of expire in days are 5 unless specified under the Authified Dashboard Merchant Settings Quiz URL Expires in Days. If holds valid integer 1-30, then any other setting will be ignored. |
/template/template_id | string(32) | A existing template id or list of features. If found a valid template, the list will be ignored and quiz will be created with existing template - (optional) |
/template/list | array | A custom/temporary template list of features available - (optional) |
/template/list/driver_licence_upload | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/passport_upload | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/other_id_upload | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/selfie_upload | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/bank_statement_upload | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/receipt_upload | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/utility_bill_upload | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/void_check_upload | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/address_submit | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/mobile_phone_submit | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/email_address_submit | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/date_of_birth_submit | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/ssn_submit | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/canadian_bank_validation | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/usa_canadian_bank_validation | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/agreement_sign | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/google_login | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/facebook_login | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/device_finger_print | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/custom_application | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/canadian_bank_statement | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
/template/list/utility_statement | int(1) | Valid options are 0 (not required), 1 (required) or 2 (optional) |
{
"first_name": "",
"last_name": "",
"middle_name": "",
"email_address": "",
"mobile_number": "",
"merchant_reference": "",
"customer_id": "",
"date_of_birth": "",
"home_phone_number": "",
"ip_address": "",
"address_line_1": "",
"address_line_2": "",
"city": "",
"state": "",
"postal": "",
"country": "",
"amount": "",
"driver_licence_id": "",
"ssn": "",
"quiz_expiry_days": 0,
"template": {
"template_id": "",
"list": {
"driver_licence_upload": 0,
"passport_upload": 0,
"other_id_upload": 0,
"selfie_upload": 0,
"bank_statement_upload": 0,
"receipt_upload": 0,
"utility_bill_upload": 0,
"void_check_upload": 0,
"address_submit": 0,
"mobile_phone_submit": 0,
"email_address_submit": 0,
"date_of_birth_submit": 0,
"ssn_submit": 0,
"canadian_bank_validation": 0,
"usa_canadian_bank_validation": 0,
"agreement_sign": 0,
"google_login": 0,
"facebook_login": 0,
"device_finger_print": 0,
"custom_application": 0,
"canadian_bank_statement": 0,
"utility_statement": 0
}
}
}
{
"http_status_code": 201,
"query_reference_id": "",
"response_time": 0,
"query_at": "",
"email_address": "",
"mobile_number": "",
"tiny_url": "",
"long_url": "",
"quiz_expiry_days": 0,
"expires_at": "",
"created_at": "",
"template_name": "",
"template_id": "",
"_comment": "\"template_id\" will be returned only, if used existing template.",
"list": {
"_comment": "\"list\" will be returned only, if used temporary template.",
"driver_licence_upload": 0,
"passport_upload": 0,
"other_id_upload": 0,
"selfie_upload": 0,
"bank_statement_upload": 0,
"receipt_upload": 0,
"utility_bill_upload": 0,
"void_check_upload": 0,
"address_submit": 0,
"mobile_phone_submit": 0,
"email_address_submit": 0,
"date_of_birth_submit": 0,
"ssn_submit": 0,
"canadian_bank_validation": 0,
"usa_canadian_bank_validation": 0,
"agreement_sign": 0,
"facebook_login": 0,
"google_login": 0,
"device_finger_print": 0,
"custom_application": 0,
"canadian_bank_statement": 0,
"utility_statement": 0
}
}
curl --location --request POST 'https://authified.com/api/v1/quiz/create' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Key: ' \
--header 'Signature: ' \
--data-raw '{
"first_name": "",
"last_name": "",
"middle_name": "",
"email_address": "",
"mobile_number": "",
"merchant_reference": "",
"customer_id": "",
"date_of_birth": "",
"home_phone_number": "",
"ip_address": "",
"address_line_1": "",
"address_line_2": "",
"city": "",
"state": "",
"postal": "",
"country": "",
"amount": "",
"driver_licence_id": "",
"ssn": "",
"quiz_expiry_days": 0,
"template": {
"template_id": "",
"list": {
"driver_licence_upload": 0,
"passport_upload": 0,
"other_id_upload": 0,
"selfie_upload": 0,
"bank_statement_upload": 0,
"receipt_upload": 0,
"utility_bill_upload": 0,
"void_check_upload": 0,
"address_submit": 0,
"mobile_phone_submit": 0,
"email_address_submit": 0,
"date_of_birth_submit": 0,
"ssn_submit": 0,
"canadian_bank_validation": 0,
"usa_canadian_bank_validation": 0,
"agreement_sign": 0,
"google_login": 0,
"facebook_login": 0,
"device_finger_print": 0,
"custom_application": 0,
"canadian_bank_statement": 0,
"utility_statement": 0
}
}
}'
POST /api/v1/quiz/create HTTP/1.1
Host: https://authified.com
Accept: application/json
Content-Type: application/json
Api-Key:
Signature:
Content-Length:
{
"first_name": "",
"last_name": "",
"middle_name": "",
"email_address": "",
"mobile_number": "",
"merchant_reference": "",
"customer_id": "",
"date_of_birth": "",
"home_phone_number": "",
"ip_address": "",
"address_line_1": "",
"address_line_2": "",
"city": "",
"state": "",
"postal": "",
"country": "",
"amount": "",
"driver_licence_id": "",
"ssn": "",
"quiz_expiry_days": 0,
"template": {
"template_id": "",
"list": {
"driver_licence_upload": 0,
"passport_upload": 0,
"other_id_upload": 0,
"selfie_upload": 0,
"bank_statement_upload": 0,
"receipt_upload": 0,
"utility_bill_upload": 0,
"void_check_upload": 0,
"address_submit": 0,
"mobile_phone_submit": 0,
"email_address_submit": 0,
"date_of_birth_submit": 0,
"ssn_submit": 0,
"canadian_bank_validation": 0,
"usa_canadian_bank_validation": 0,
"agreement_sign": 0,
"google_login": 0,
"facebook_login": 0,
"device_finger_print": 0,
"custom_application": 0,
"canadian_bank_statement": 0,
"utility_statement": 0
}
}
}
var settings = {
"url": "https://authified.com/api/v1/quiz/create",
"method": "POST",
"timeout": 0,
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"Api-Key": "",
"Signature": ""
},
"data": JSON.stringify({
"first_name": "",
"last_name": "",
"middle_name": "",
"email_address": "",
"mobile_number": "",
"merchant_reference": "",
"customer_id": "",
"date_of_birth": "",
"home_phone_number": "",
"ip_address": "",
"address_line_1": "",
"address_line_2": "",
"city": "",
"state": "",
"postal": "",
"country": "",
"amount": "",
"driver_licence_id": "",
"ssn": "",
"quiz_expiry_days": 0,
"template": {
"template_id": "",
"list": {
"driver_licence_upload": 0,
"passport_upload": 0,
"other_id_upload": 0,
"selfie_upload": 0,
"bank_statement_upload": 0,
"receipt_upload": 0,
"utility_bill_upload": 0,
"void_check_upload": 0,
"address_submit": 0,
"mobile_phone_submit": 0,
"email_address_submit": 0,
"date_of_birth_submit": 0,
"ssn_submit": 0,
"canadian_bank_validation": 0,
"usa_canadian_bank_validation": 0,
"agreement_sign": 0,
"google_login": 0,
"facebook_login": 0,
"device_finger_print": 0,
"custom_application": 0,
"canadian_bank_statement": 0,
"utility_statement": 0
}
}
}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var data = JSON.stringify({
"first_name": "",
"last_name": "",
"middle_name": "",
"email_address": "",
"mobile_number": "",
"merchant_reference": "",
"customer_id": "",
"date_of_birth": "",
"home_phone_number": "",
"ip_address": "",
"address_line_1": "",
"address_line_2": "",
"city": "",
"state": "",
"postal": "",
"country": "",
"amount": "",
"driver_licence_id": "",
"ssn": "",
"quiz_expiry_days": 0,
"template": {
"template_id": "",
"list": {
"driver_licence_upload": 0,
"passport_upload": 0,
"other_id_upload": 0,
"selfie_upload": 0,
"bank_statement_upload": 0,
"receipt_upload": 0,
"utility_bill_upload": 0,
"void_check_upload": 0,
"address_submit": 0,
"mobile_phone_submit": 0,
"email_address_submit": 0,
"date_of_birth_submit": 0,
"ssn_submit": 0,
"canadian_bank_validation": 0,
"usa_canadian_bank_validation": 0,
"agreement_sign": 0,
"google_login": 0,
"facebook_login": 0,
"device_finger_print": 0,
"custom_application": 0,
"canadian_bank_statement": 0,
"utility_statement": 0
}
}
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://authified.com/api/v1/quiz/create");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Api-Key", "");
xhr.setRequestHeader("Signature", "");
xhr.send(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://authified.com/api/v1/quiz/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS =>'{
"first_name": "",
"last_name": "",
"middle_name": "",
"email_address": "",
"mobile_number": "",
"merchant_reference": "",
"customer_id": "",
"date_of_birth": "",
"home_phone_number": "",
"ip_address": "",
"address_line_1": "",
"address_line_2": "",
"city": "",
"state": "",
"postal": "",
"country": "",
"amount": "",
"driver_licence_id": "",
"ssn": "",
"quiz_expiry_days": 0,
"template": {
"template_id": "",
"list": {
"driver_licence_upload": 0,
"passport_upload": 0,
"other_id_upload": 0,
"selfie_upload": 0,
"bank_statement_upload": 0,
"receipt_upload": 0,
"utility_bill_upload": 0,
"void_check_upload": 0,
"address_submit": 0,
"mobile_phone_submit": 0,
"email_address_submit": 0,
"date_of_birth_submit": 0,
"ssn_submit": 0,
"canadian_bank_validation": 0,
"usa_canadian_bank_validation": 0,
"agreement_sign": 0,
"google_login": 0,
"facebook_login": 0,
"device_finger_print": 0,
"custom_application": 0,
"canadian_bank_statement": 0,
"utility_statement": 0
}
}
}',
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Content-Type: application/json",
"Api-Key: ",
"Signature: "
),
));
$response = curl_exec($curl);
$http_code = curl_getinfo($url, CURLINFO_HTTP_CODE);
curl_close($url);
if ($http_code === 200):
echo $response;
else:
echo "Un-expected server response http_code($http_code)<br/>$response";
endif;
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://authified.com/api/v1/quiz/create');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Accept' => 'application/json',
'Content-Type' => 'application/json',
'Api-Key' => '',
'Signature' => ''
));
$request->setBody('{
"first_name": "",
"last_name": "",
"middle_name": "",
"email_address": "",
"mobile_number": "",
"merchant_reference": "",
"customer_id": "",
"date_of_birth": "",
"home_phone_number": "",
"ip_address": "",
"address_line_1": "",
"address_line_2": "",
"city": "",
"state": "",
"postal": "",
"country": "",
"amount": "",
"driver_licence_id": "",
"ssn": "",
"quiz_expiry_days": 0,
"template": {
"template_id": "",
"list": {
"driver_licence_upload": 0,
"passport_upload": 0,
"other_id_upload": 0,
"selfie_upload": 0,
"bank_statement_upload": 0,
"receipt_upload": 0,
"utility_bill_upload": 0,
"void_check_upload": 0,
"address_submit": 0,
"mobile_phone_submit": 0,
"email_address_submit": 0,
"date_of_birth_submit": 0,
"ssn_submit": 0,
"canadian_bank_validation": 0,
"usa_canadian_bank_validation": 0,
"agreement_sign": 0,
"google_login": 0,
"facebook_login": 0,
"device_finger_print": 0,
"custom_application": 0,
"canadian_bank_statement": 0,
"utility_statement": 0
}
}
}');
try {
$response = $request->send();
if ($response->getStatus() === 200) {
echo $response->getBody();
} else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}