Skip to main content
POST
/
v2
/
verification
import Prelude from "@prelude.so/sdk";

const client = new Prelude();

async function main() {
  const verification = await client.verification.create({
    target: {
      type: "phone_number",
      value: "+30123456789",
    },
  });

  console.log(verification.id);
}

main();
{
  "id": "<string>",
  "risk_factors": [],
  "channels": [],
  "silent": {
    "request_url": "<string>"
  },
  "metadata": {
    "correlation_id": "<string>"
  },
  "request_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.prelude.so/llms.txt

Use this file to discover all available pages before exploring further.

import Prelude from "@prelude.so/sdk";

const client = new Prelude();

async function main() {
  const verification = await client.verification.create({
    target: {
      type: "phone_number",
      value: "+30123456789",
    },
  });

  console.log(verification.id);
}

main();

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
target
object
required

The verification target. Either a phone number or an email address. To use the email verification feature contact us to discuss your use case.

signals
object

The signals used for anti-fraud. For more details, refer to Signals.

options
object

Verification options

metadata
object

The metadata for this verification. This object will be returned with every response or webhook sent that refers to this verification.

dispatch_id
string

The identifier of the dispatch that came from the front-end SDK.

Required string length: 36
Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

OK

id
string
required

The verification identifier.

Example:

"vrf_01jc0t6fwwfgfsq1md24mhyztj"

status
enum<string>
required

The status of the verification.

  • success - A new verification window was created.
  • retry - A new attempt was created for an existing verification window.
  • challenged - The verification is suspicious and is restricted to non-SMS and non-voice channels only. This mode must be enabled for your customer account by Prelude support.
  • blocked - The verification was blocked.
  • shadow_blocked - The verification triggered a block rule but the decision was not enforced; this is used to dry-run anti-fraud configuration. This mode must be enabled for your customer account by Prelude support.
Available options:
success,
retry,
challenged,
blocked,
shadow_blocked
Example:

"success"

method
enum<string>
required

The method used for verifying this phone number.

Available options:
email,
message,
silent,
voice
reason
enum<string>

The reason why the verification was blocked. Only present when status is "blocked" or "shadow_blocked".

  • expired_signature - The signature of the SDK signals is expired. They should be sent within the hour following their collection.
  • in_block_list - The phone number is part of the configured block list.
  • invalid_phone_line - The phone number is not a valid line number (e.g. landline).
  • invalid_phone_number - The phone number is not a valid phone number (e.g. unallocated range).
  • invalid_signature - The signature of the SDK signals is invalid.
  • repeated_attempts - The phone number has made too many verification attempts.
  • suspicious - The verification attempt was deemed suspicious by the anti-fraud system.
Available options:
expired_signature,
in_block_list,
invalid_phone_line,
invalid_phone_number,
invalid_signature,
repeated_attempts,
suspicious
Example:

"invalid_phone_number"

risk_factors
enum<string>[]

The risk factors that contributed to the verification being blocked. Only present when status is "blocked" or "shadow_blocked" and the anti-fraud system detected specific risk signals.

  • behavioral_pattern - The phone number past behavior during verification flows exhibits suspicious patterns.
  • device_attribute - The device exhibits characteristics associated with suspicious activity patterns.
  • fraud_database - The phone number has been flagged as suspicious in one or more of our fraud databases.
  • location_discrepancy - The phone number prefix and IP address discrepancy indicates potential fraud.
  • network_fingerprint - The network connection exhibits characteristics associated with suspicious activity patterns.
  • poor_conversion_history - The phone number has a history of poorly converting to a verified phone number.
  • prefix_concentration - The phone number is part of a range known to be associated with suspicious activity patterns.
  • suspected_request_tampering - The SDK signature is invalid and the request is considered to be tampered with.
  • suspicious_ip_address - The IP address is deemed to be associated with suspicious activity patterns.
  • temporary_phone_number - The phone number is known to be a temporary or disposable number.
Available options:
behavioral_pattern,
device_attribute,
fraud_database,
location_discrepancy,
network_fingerprint,
poor_conversion_history,
prefix_concentration,
suspected_request_tampering,
suspicious_ip_address,
temporary_phone_number
Example:
["suspicious_ip_address", "fraud_database"]
channels
enum<string>[]

The ordered sequence of channels to be used for verification

Available options:
rcs,
silent,
sms,
telegram,
viber,
voice,
whatsapp,
zalo
silent
object

The silent verification specific properties.

metadata
object

The metadata for this verification.

request_id
string