post
/users/@me/phone/send-verificationSend phone verification code
Send a one-time code on the requested channel. Defaults to the first available channel from server policy. Pass channel="sms" to request SMS (only honoured for SMS-allowlisted destinations) or channel="inbound_challenge" to receive challenge details to text in. Expensive outbound destinations always downgrade to an inbound challenge.
send_phone_verification_code
Request body
application/json
json
{
"type": "object",
"properties": {
"phone": {
"$ref": "#/components/schemas/PhoneNumberType"
},
"channel": {
"enum": [
"sms",
"inbound_challenge"
],
"type": "string",
"x-enumNames": [
"sms",
"inbound_challenge"
],
"description": "Channel to deliver the OTP on. Defaults to the first available channel from server policy. Server may override to an available fallback when the requested channel is disabled."
}
},
"required": [
"phone"
]
}Responses
200
Success
json
{
"oneOf": [
{
"type": "object",
"properties": {
"channel": {
"type": "string",
"enum": [
"sms"
],
"description": "Channel actually used for delivery (may differ from request when server adjusts)"
}
},
"required": [
"channel"
]
},
{
"type": "object",
"properties": {
"channel": {
"type": "string",
"enum": [
"inbound_challenge"
],
"description": "The user must send Fluxer an SMS instead of receiving one"
},
"challenge_code": {
"type": "string",
"description": "The numeric code the user must text to our number"
},
"our_number": {
"type": "string",
"description": "The Twilio number the user must text the code to (E.164)"
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp when this inbound challenge expires"
},
"reason": {
"enum": [
"voip",
"canadian",
"unknown_line_type",
"expensive_destination",
"account_forced",
"behavioural_risk"
],
"type": "string",
"x-enumNames": [
"voip",
"canadian",
"unknown_line_type",
"expensive_destination",
"account_forced",
"behavioural_risk"
],
"description": "Why inbound verification is required"
}
},
"required": [
"channel",
"challenge_code",
"our_number",
"expires_at",
"reason"
]
}
]
}400
Bad Request - The request was malformed or contained invalid data
json
{
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/APIErrorCode"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"type": "array",
"description": "Field-specific validation errors",
"items": {
"$ref": "#/components/schemas/ValidationErrorItem"
}
}
},
"required": [
"code",
"message"
]
}401
Unauthorized - Authentication is required or the token is invalid
json
{
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/APIErrorCode"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"type": "array",
"description": "Field-specific validation errors",
"items": {
"$ref": "#/components/schemas/ValidationErrorItem"
}
}
},
"required": [
"code",
"message"
]
}403
Forbidden - You do not have permission to perform this action
json
{
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/APIErrorCode"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"type": "array",
"description": "Field-specific validation errors",
"items": {
"$ref": "#/components/schemas/ValidationErrorItem"
}
}
},
"required": [
"code",
"message"
]
}429
Too Many Requests - You are being rate limited
json
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"RATE_LIMITED"
]
},
"message": {
"type": "string"
},
"retry_after": {
"type": "number",
"description": "Seconds to wait before retrying"
},
"global": {
"type": "boolean",
"description": "Whether this is a global rate limit"
}
},
"required": [
"code",
"message",
"retry_after"
]
}500
Internal Server Error - An unexpected error occurred
json
{
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/APIErrorCode"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"errors": {
"type": "array",
"description": "Field-specific validation errors",
"items": {
"$ref": "#/components/schemas/ValidationErrorItem"
}
}
},
"required": [
"code",
"message"
]
}