Skip to content

Start an SMS enrolment

POST
/v1/mfa/enrollment/start/sms/

Starts enrolling the logged-in user in MFA by SMS, and sends a code to the phone number. For users only. The first enrolment needs no password or mfa_token; later ones need both.

Authorization

apiKey
headerAuthorizationBasic <token>

HTTP Basic authentication with your API key or the id of a token as the username and an empty password.

Request Body

application/json
  1. body
password?string

The password of the user. Needed when the user already has MFA.

mfa_token?string

A code from a method the user already has. Needed when the user already has MFA.

force_send_sms?boolean

Send an SMS code to confirm, when the user has both SMS and an authenticator app.

phone*string

The phone number, starting with + and the country code.

Response Body

The enrolment has started and the code is sent.

application/json
  1. response
id?string

The ID of the enrolment.

curl -X POST 'https://api.example.com/v1/mfa/enrollment/start/sms/' \  --user "$API_KEY:" \  -H 'Content-Type: application/json' \  -d '{  "phone": "+31612345678",  "password": "correct-Horse-battery-7",  "mfa_token": "123456"}'
{  "id": "845c16de-f627-48cb-bc81-a6b3b1fb134b__bc060460-266e-43f2-a030-e8b8d80126da"}