POST
/
v1
/
customers
curl --request POST \
  --url https://api.sandbox.sardine.ai/v1/customers \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "flow": {
    "name": "kyc-email-phone",
    "type": "onboarding"
  },
  "sessionKey": "37dc138c-9a3a-42ca-80de-030f8492cf2f",
  "customer": {
    "id": "e7654be0-43d7-438f-83ad-8f0196e9c179",
    "createdAtMillis": 1655827465000,
    "firstName": "Jane",
    "middleName": "Jo",
    "lastName": "Doe",
    "dateOfBirth": "1988-08-08",
    "address": {
      "street1": "123 Sardine Street",
      "street2": "Unit #101",
      "city": "San Francisco",
      "regionCode": "CA",
      "postalCode": "94110",
      "countryCode": "US"
    },
    "phone": "+11234567890",
    "emailAddress": "jdoe@example.com",
    "isPhoneVerified": false,
    "isEmailVerified": true
  },
  "checkpoints": [
    "customer"
  ]
}'
{
  "sessionKey": "37dc138c-9a3a-42ca-80de-030f8492cf2f",
  "level": "high",
  "status": "Success",
  "customer": {
    "score": 0,
    "level": "high",
    "reasonCodes": [
      "EF1",
      "PNA",
      "POS"
    ],
    "signals": [
      {
        "key": "addressRiskLevel",
        "value": "low"
      },
      {
        "key": "emailDomainLevel",
        "value": "low"
      },
      {
        "key": "emailLevel",
        "value": "high",
        "reasonCodes": [
          "EF1"
        ]
      },
      {
        "key": "phoneCarrier",
        "value": "Verizon"
      },
      {
        "key": "phoneLevel",
        "value": "low",
        "reasonCodes": [
          "PNA",
          "POS"
        ]
      },
      {
        "key": "phoneLineType",
        "value": "Mobile"
      },
      {
        "key": "manualReview",
        "value": "false"
      }
    ],
    "phone": {
      "nameScore": 100,
      "addressScore": 100,
      "cityMatch": true,
      "regionMatch": true,
      "postalCodeMatch": true
    },
    "address": {
      "validity": "unknown"
    }
  },
  "device": {
    "id": "d5648820-912b-40c4-8e5b-4cc0ba8013ff",
    "level": "low",
    "attributes": {
      "Browser": [
        "Mobile Safari UI/WKWebView"
      ],
      "Model": [
        "iPhone"
      ],
      "OS": [
        "iOS"
      ]
    },
    "signals": [
      {
        "key": "TrueOS",
        "value": "Mac/iOS"
      },
      {
        "key": "DeviceAgeHours",
        "value": "5"
      },
      {
        "key": "TrueIP",
        "value": "111.111.111.111"
      },
      {
        "key": "VPN",
        "value": "low"
      },
      {
        "key": "Proxy",
        "value": "low"
      },
      {
        "key": "RemoteSoftware",
        "value": "false"
      },
      {
        "key": "RemoteSoftwareLevel",
        "value": "low"
      },
      {
        "key": "OSAnomaly",
        "value": "low"
      },
      {
        "key": "Emulator",
        "value": "false"
      },
      {
        "key": "TamperedApp",
        "value": ""
      },
      {
        "key": "IpType",
        "value": "Fixed Line ISP"
      },
      {
        "key": "SessionIpCount",
        "value": "2"
      },
      {
        "key": "SessionIpCountryCount",
        "value": "1"
      },
      {
        "key": "RemoteSessionLevel",
        "value": ""
      },
      {
        "key": "AccountDeviceId",
        "value": "22357d9a-60e3-48f8-8977-803585acf147"
      },
      {
        "key": "behaviorBiometricLevel",
        "value": "low"
      }
    ],
    "sessionKey": "37dc138c-9a3a-42ca-80de-030f8492cf2f",
    "fingerprint": "85618515-7924-4519-892b-e6a48bb230a9",
    "confidenceScore": 0.4759486,
    "fingerprintConfidenceScore": 48,
    "deviceReputation": "medium_risk",
    "behaviorBiometrics": {
      "hesitationPercentile": {
        "nonLtm": 0,
        "ltm": 0
      },
      "numDistractionEvents": 0,
      "numContextSwitchEvents": 0,
      "typingSpeed": {
        "typingSpeed": 0.0041813012209399565,
        "upSpeed": 0.0783132530120482,
        "downSpeed": 0.004427129449265097,
        "firstKeySpeed": 0.0847457627118644,
        "firstKeyUpSpeed": 0.0847457627118644,
        "medianDownTime": 194,
        "medianUpTime": 11,
        "secondKeySpeed": 0.0027533039647577094,
        "secondKeyDownSpeed": 0.002852253280091272,
        "secondKeyUpSpeed": 0.07936507936507936,
        "typingAccuracy": 1
      },
      "fields": [
        {
          "name": "first_name",
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 0,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": true,
          "timeSpendInMsEvents": [
            3453
          ],
          "timeSpendInMs": 0
        },
        {
          "name": "last_name",
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 0,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": true,
          "timeSpendInMsEvents": [
            1290
          ],
          "timeSpendInMs": 0
        },
        {
          "name": "company",
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 0,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": false,
          "timeSpendInMsEvents": [
            1020
          ],
          "timeSpendInMs": 0
        }
      ],
      "pageFieldLTM": {
        "absolute": {
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 0,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": false,
          "timeSpendInMsEvents": null,
          "timeSpendInMs": 5338
        },
        "percent": {
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 0,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": false,
          "timeSpendInMsEvents": null,
          "timeSpendInMs": 0
        },
        "average": {
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 0,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": false,
          "timeSpendInMsEvents": null,
          "timeSpendInMs": 2669
        }
      },
      "pageFieldNonLTM": {
        "absolute": {
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 1,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": false,
          "timeSpendInMsEvents": null,
          "timeSpendInMs": 24267
        },
        "percent": {
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 0,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": false,
          "timeSpendInMsEvents": null,
          "timeSpendInMs": 0
        },
        "average": {
          "numCopyPasteEvents": 0,
          "numClipboardEvents": 0,
          "numAutoFillEvents": 0,
          "numExpertKeyEvents": 0,
          "hesitationPercentage": 0,
          "isLTM": false,
          "timeSpendInMsEvents": null,
          "timeSpendInMs": 4853.4
        }
      },
      "totalTimeSpentInMs": 59925,
      "flowTimesInMs": {
        "/onboarding/personal-details": 59925
      }
    },
    "bot": {
      "level": "low"
    },
    "ipLocation": {
      "city": "San Francisco",
      "region": "California",
      "country": "US",
      "latitude": "37.77",
      "longitude": "-122.42"
    },
    "ipAddresses": {
      "v4": "111.111.111.111",
      "v6": "f289:7242:b06b:49db:dccd:ef2b:afc6:1bdf"
    },
    "checkpoints": {
      "device": {}
    }
  },
  "checkpoints": {
    "customer": {
      "customerPurchaseLevel": {
        "value": "low",
        "ruleIds": [
          120,
          124
        ]
      },
      "emailLevel": {
        "value": "high",
        "ruleIds": [
          31
        ]
      },
      "phoneLevel": {
        "value": "low",
        "ruleIds": [
          143
        ]
      },
      "historicalLevel": {
        "value": "low",
        "ruleIds": [
          124
        ]
      },
      "riskLevel": {
        "value": "low",
        "ruleIds": [
          31
        ]
      }
    }
  },
  "rules": [
    {
      "id": 124,
      "isLive": true,
      "isAllowlisted": false,
      "name": "Rule name #1"
    },
    {
      "id": 31,
      "isLive": true,
      "isAllowlisted": false,
      "name": "Rule name #2"
    },
    {
      "id": 120,
      "isLive": true,
      "isAllowlisted": false,
      "name": "Rule name #3"
    },
    {
      "id": 143,
      "isLive": true,
      "isAllowlisted": false,
      "name": "Rule name #4"
    },
    {
      "id": 227,
      "isLive": false,
      "isAllowlisted": false,
      "name": "Rule name #5"
    },
    {
      "id": 226,
      "isLive": false,
      "isAllowlisted": false,
      "name": "Rule name #6"
    }
  ],
  "checkpointData": [
    {
      "name": "customer",
      "type": "weighted_max"
    }
  ]
}

Authorizations

Authorization
string
headerrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
flow
object
required
sessionKey
string
required

unique identifier for the given customer session on your platform, generated by your service. We expect it to be short-lived (e.g. expires after 30 min)

customer
object
required

Customer details

partnerId
string

ID of the partner/business/merchant this event is tied to

partnerName
string

Name of the partner/business/merchant this event is tied to

workflowName
string

name of the workflow to be run (if using workflows instead of the checkpoints array)

transaction
object

Transaction

counterparty
object

Personal information obtained via third-party external to Sardine

device
object

Device details

config
object

Config Object. Default config values to enable/disable various Sardine functionality is done at merchant level. For some merchants, Sardine may allow overriding the default configuration. eg By default, sanction screening may be enabled for all api calls for a merchant and Sardine may allow selective sanction screening to be enabled via config.

customString
object

Key-value pair for string type custom fields to be made available in the dashboard and rule editor. Example: ”customerSegment”:”premium”

customBool
object

Key-value pair for boolean type custom fields to be made available in the dashboard and rule editor. Example: ”verifiedCustomer": true

customNumber
object

key-value pair for number type custom fields to be made available in the dashboard and rule editor.

Example: ”internalRiskScore": 57

referralCode
object

Referral code

checkpoints
enum<string>[]

Name of the checkpoints to be invoked. Please discuss with Sardine. customer checkpoint will be executed by default if checkpoints array is omitted and device checkpoint will be run if a matching device sessionKey is found. Refer to checkpoints for recommended use cases, descriptions and prerequisites. Invalid checkpoints will return a 422 error.

Available options:
ach,
aml,
aml_bank,
aml_crypto,
customer,
device,
kyc,
login,
onboarding,
payment,
withdrawal

Response

200 - application/json
sessionKey
string

Unique identifier for the given customer session as provided by you in the API request payload

level
string

Risk at overall level: "very_high", "high", "medium", "low". This is the top-level field that you can use to make a risk decision. It is max of customer.level and device.level

status
enum<string>

status of the API response

Available options:
Success,
Timeout
customer
object

customer riskiness level and associated signals

device
object

Device riskiness level and associated signals

transaction
object

transaction related information

counterparty
object
checkpoints
object

Result of rule evaluations for each checkpoint. customer checkpoint is executed by default.

rules
object[]

List of live and shadow rules that triggered for this session

checkpointData
object[]

List of checkpoints run for this session

workflow
object

workflow excecution output data if a workflowName was provided in the request