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",
  "method": "message",
  "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.

Response

200
application/json
OK
id
string
required

The verification identifier.

Example:

"vrf_01jc0t6fwwfgfsq1md24mhyztj"

status
enum<string>
required

The status of the verification.

Available options:
success,
retry,
blocked
Example:

"success"

method
enum<string>
required

The method used for verifying this phone number.

Available options:
message
metadata
object

The metadata for this verification.

request_id
string