---
title: "Request MFA token via SMS"
method: POST
path: "/api/relay/rest/mfa/sms"
tags: ["Multi-Factor Authentication"]
---

# Request MFA token via SMS

`POST /api/relay/rest/mfa/sms`

Sends a multi-factor authentication code via SMS.

#### Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Management_.

[Learn more about API scopes](/docs/platform/your-signalwire-api-space).

## Request body

- MfaRequest — MFA request model.
  - `to` string, required — The E164 number to use as the destination.
  - `from` string — The E164 number from your account to use as the origin of the message. SignalWire will use a special verified number if not specified.
  - `message` string — Specify a custom message to send before the token. The message must fit within one segment; either 160 characters or 70 characters when using non-GSM symbols.
  - `token_length` integer — The number of characters in the token, from 4 to 20. Defaults to 6.
  - `valid_for` integer — The number of seconds the token is considered valid for. Defaults to 3600, with a maximum of 604800.
  - `max_attempts` integer — The number of allowed verification attempts, including the first one, from 1 to 20. Defaults to 3.
  - `allow_alphas` boolean — Set to true or false, whether to include letters or just numbers in the token. Defaults to false (numbers only).

## Response `200`

The request has succeeded.

- MfaResponse — MFA response model.
  - `id` string, uuid, required — Universal Unique Identifier.
  - `success` boolean, required — Whether the request was successfully queued.
  - `to` string, required — The destination of the MFA request.
  - `channel` string, required — Can be sms for a text message or call for a phone call.

## Other responses

- `401` — Access is unauthorized.
- `422` — The request failed validation. See errors for details.
- `500` — An internal server error occurred.

---

[API](https://skmtc.net/signalwire/apis/signalwire-rest-api.md) · [All operations](https://skmtc.net/signalwire/apis/signalwire-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/signalwire/signalwire-rest-api/versions/05c5164b85c7/schema)
