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": "vrf_01jc0t6fwwfgfsq1md24mhyztj",
  "status": "success",
  "reason": "invalid_phone_number",
  "method": "email",
  "channels": [
    "rcs"
  ],
  "silent": {
    "request_url": "<string>"
  },
  "metadata": {
    "correlation_id": "<string>"
  },
  "request_id": "<string>"
}
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
Examples:

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

Response

OK

id
string
required

The verification identifier.

Examples:

"vrf_01jc0t6fwwfgfsq1md24mhyztj"

status
enum<string>
required

The status of the verification.

Available options:
success,
retry,
blocked
Examples:

"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".

  • 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
Examples:

"invalid_phone_number"

channels
enum<string>[]

The ordered sequence of channels to be used for verification

silent
object

The silent verification specific properties.

metadata
object

The metadata for this verification.

request_id
string