v1

latestOpenAPI 3.1.02026-07-2414238909.1 KB

Perform a verification

You can send a Two Factor Authentication very easily just by specifying the recipient, the type of the message and the method that the verification will be…

post/2step

Headers

Content-Typestring required

application/json

Authorizationstring required

Bearer {access_token}

Request body

methodstring required

The method which will be used to send the 2step verification. Values: "sms", "voice".

typestring required

The type of the message. Value: "code".

recipientstring required

The recipient that will receive the 2step verification. For sms method format with a '+' and country code e.g., +306948530920 (E.164 format).

templatestring required

The template of the message. It must contain a @@pin that will be replaced by the generated code.

argumentsstring

If the template is for example '@@name your code is @@pin' and the argument has a property name: 'Nick' the message will be 'Nick your code is 4232'. Note that if the template contains a @@ placeholder and a value is not present in the arguments property it will stay as is.

templateCountrystring

Country in ISO-3166-1 alpha 2 format (GR, US etc.). The country to use in order to select a translated template (if defined in Routee web interface)

originatorstring

The senderId that will be set when sending the SMS

lifetimeInSecondsinteger

How many seconds this verification will remain active. After that time passes the verification status will be Expired.

maxRetriesinteger

Defines the number of times the user can re-confirm the verification before the verification changes its state to Failed.

digitsinteger

The number of digits of the generated random numeric code.

Response

200

trackingIdstring
statusstring
updatedAtstring
maxRetriesinteger
expiresAtstring
timesTriedinteger

Example response

{
  "trackingId": "2c1379bb-f296-43a4-bfb0-6c8b20a97425",
  "status": "Pending",
  "updatedAt": "2016-01-01T10:00:00.000Z",
  "maxRetries": 4,
  "expiresAt": "2016-01-01T10:00:00.000Z",
  "timesTried": 2
}