Create verification
Creates a new Verification and sends the code to the given phone number.
Authorization
authorization AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});
const verification = await client.verifications.create({ phone_number: '+18015551234' });
console.log(verification.id);{
"attempt_count": 0,
"id": "vfn_01jayh15c2f2xamftg0xpyq1nj",
"phone_number": "+18015551234",
"status": "pending"
}{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}