Skip to main content

Verify a user

API operation: Open the endpoint in Scalar

Use POST /users/{user_id}/verify to verify the authenticated user's email address or cellphone. The current public operation is User.verification.

The authenticated user must match {user_id}. The request requires an integer channel from the values declared in Scalar and can include a verification code between four and eight characters. Cellphone verification can also use cellphone and country_phone_code where supported by the selected flow.

{
"channel": 1,
"code": "123456"
}

The code is synthetic. Never publish or reuse a real verification code.

See the Codes model for the surrounding verification-code concepts. Scalar remains authoritative for channel values, authentication, request fields, responses, and errors.

OpenAPI reference​

Operation: POST /users/{user_id}/verify

Path parameters

NameTypeRequiredDescription
user_idintegerYes—

Request body fields

NameTypeRequired
cellphoneanyNo
channelintegerYes
codestringNo
country_phone_codeanyNo

Responses

CodeDescription
200OK (Envelope)
400Bad Request (ErrorResponse)
401Unauthorized
404Not Found
429Too Many Requests (ErrorResponse)
500Internal Server Error (ErrorResponse)
503Service Unavailable (ErrorResponse)
Open this operation in the API reference