POST api/authentications
Creates and sends a new SMS authentication with the given information
Request Information
URI Parameters
None.
Body Parameters
New SMS authentication data
AuthenticationNewDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| Phone |
Recipient phone number to authenticate |
string |
Required |
| From |
Sending name or phone number, default iP1 |
string |
None. |
| MessageFormat |
Format for the SMS message, {0} = code |
string |
Matching regular expression pattern: ^(?=.*\{0\}).*$ |
| Length |
SMS authentication code length, default 5 |
integer |
Range: inclusive between 3 and 25 |
| ExpirationTime |
Amount of time (in seconds) until the SMS authentication expires, default 1200 (20 minutes) |
integer |
Range: inclusive between 1 and 86400 |
| NumericOnly |
Whether to force the code to be only numbers, default false |
boolean |
None. |
Request Formats
application/json, text/json
{
"Phone": "sample string 1",
"From": "sample string 2",
"MessageFormat": "sample string 3",
"Length": 1,
"ExpirationTime": 1,
"NumericOnly": true
}
Response Information
Resource Description
New SMS authentication
AuthenticationDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
SMS authentication ID |
integer |
None. |
| Phone |
Recipient phone number |
string |
None. |
| Created |
When the SMS authentication was created/started (UTC/GMT) |
date |
None. |
| HasExpired |
Whether the SMS authentication has expired |
boolean |
None. |
| Expires |
When the SMS authentication will expire (UTC/GMT) |
date |
None. |
| IsUsed |
Whether the SMS authentication has been used |
boolean |
None. |
| Used |
When the SMS authentication was used, if used (UTC/GMT) |
date |
None. |
Response Formats
application/json, text/json
{
"ID": 1,
"Phone": "sample string 2",
"Created": "2025-12-16T03:28:17.9016211+00:00",
"HasExpired": true,
"Expires": "2025-12-16T03:28:17.9016211+00:00",
"IsUsed": true,
"Used": "2025-12-16T03:28:17.9016211+00:00"
}