curl --request POST \
--url https://sandbox-umbrella-api.azurewebsites.net/api/services/verification \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"phoneNumber": "11234567890",
"method": "sms",
"email": "user@example.com",
"externalId": "CustomExternalID1234",
"originatingIp": "203.0.113.45",
"consent": {
"method": 1,
"timestamp": "2024-01-15T10:30:00Z"
}
}'
{
"reference_id": "VER123456789ABCDEF",
"sub_resource": "sms",
"status": {
"code": 300,
"description": "Verification initiated successfully",
"updatedOn": "2024/01/15T10:30:00.123456Z"
},
"errors": [
"<string>"
],
"verification": {
"method": "sms",
"phoneNumber": "11234567890",
"email": "user@example.com",
"sent": true,
"expiresAt": "2024-01-15T10:35:00Z",
"retryCount": 0,
"maxRetries": 3
}
}
Verification Service API Documentation
curl --request POST \
--url https://sandbox-umbrella-api.azurewebsites.net/api/services/verification \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"phoneNumber": "11234567890",
"method": "sms",
"email": "user@example.com",
"externalId": "CustomExternalID1234",
"originatingIp": "203.0.113.45",
"consent": {
"method": 1,
"timestamp": "2024-01-15T10:30:00Z"
}
}'
{
"reference_id": "VER123456789ABCDEF",
"sub_resource": "sms",
"status": {
"code": 300,
"description": "Verification initiated successfully",
"updatedOn": "2024/01/15T10:30:00.123456Z"
},
"errors": [
"<string>"
],
"verification": {
"method": "sms",
"phoneNumber": "11234567890",
"email": "user@example.com",
"sent": true,
"expiresAt": "2024-01-15T10:35:00Z",
"retryCount": 0,
"maxRetries": 3
}
}
/verification
Copy Swagger
{
"openapi": "3.1.0",
"info": {
"title": "Verification API",
"description": "API documentation for Verification endpoint - provides SMS and Email verification services",
"version": "1.0.0"
},
"servers": [
{
"url": "https://sandbox-umbrella-api.azurewebsites.net/api/services/",
"description": "Sandbox Server"
}
],
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/verification": {
"post": {
"summary": "Verification",
"description": "The Verification service provides SMS and Email verification capabilities. It sends a one-time password (OTP) to the specified phone number or email address for verification purposes.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VerificationRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successfully initiated verification process.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VerificationResponse"
}
}
}
},
"400": {
"description": "Bad Request - Malformed syntax in the request.",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error400"}}}
},
"401": {
"description": "Unauthorized - Authentication failed.",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error401"}}}
},
"404": {
"description": "Not Found - The server could not find the requested resource.",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error404"}}}
},
"429": {
"description": "Too Many Requests - Rate limit exceeded.",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error429"}}}
},
"500": {
"description": "Invalid Transaction - Transaction not attempted due to a system issue.",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error500"}}}
},
"503": {
"description": "Service Unavailable - System is temporarily unavailable.",
"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error503"}}}
}
}
}
}
},
"components": {
"schemas": {
"VerificationRequest": {
"type": "object",
"required": ["phoneNumber", "method"],
"properties": {
"phoneNumber": {
"type": "string",
"description": "The phone number to send verification to, including country code.",
"example": "11234567890"
},
"method": {
"type": "string",
"description": "The verification method to use.",
"enum": ["sms", "email"],
"example": "sms"
},
"email": {
"type": "string",
"description": "The email address to send verification to (required when method is 'email').",
"format": "email",
"example": "user@example.com"
},
"externalId": {
"type": "string",
"description": "A customer-generated ID for this transaction.",
"example": "CustomExternalID1234"
},
"originatingIp": {
"type": "string",
"description": "End user's IP address (IPv4 or IPv6).",
"example": "203.0.113.45"
},
"consent": {
"type": "object",
"description": "Consent information for the request.",
"properties": {
"method": {
"type": "integer",
"description": "Method of consent.",
"example": 1
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp of consent.",
"example": "2024-01-15T10:30:00Z"
}
}
}
}
},
"VerificationResponse": {
"type": "object",
"properties": {
"reference_id": {
"type": "string",
"description": "Unique reference ID for the verification transaction.",
"example": "VER123456789ABCDEF"
},
"sub_resource": {
"type": "string",
"description": "Sub-resource type (e.g., 'sms' or 'email').",
"example": "sms"
},
"status": {
"type": "object",
"properties": {
"code": {
"type": "number",
"description": "Status code (e.g., 300 for success).",
"example": 300
},
"description": {
"type": "string",
"description": "Status description.",
"example": "Verification initiated successfully"
},
"updatedOn": {
"type": "string",
"description": "Timestamp of the last update (ISO 8601 format).",
"example": "2024/01/15T10:30:00.123456Z"
}
}
},
"errors": {
"type": "array",
"description": "List of errors, if any.",
"items": {
"type": "string"
}
},
"verification": {
"type": "object",
"properties": {
"method": {
"type": "string",
"description": "The verification method used.",
"example": "sms"
},
"phoneNumber": {
"type": "string",
"description": "The phone number verification was sent to.",
"example": "11234567890"
},
"email": {
"type": "string",
"description": "The email address verification was sent to (if applicable).",
"example": "user@example.com"
},
"sent": {
"type": "boolean",
"description": "Whether the verification code was successfully sent.",
"example": true
},
"expiresAt": {
"type": "string",
"format": "date-time",
"description": "When the verification code expires.",
"example": "2024-01-15T10:35:00Z"
},
"retryCount": {
"type": "integer",
"description": "Number of retry attempts made.",
"example": 0
},
"maxRetries": {
"type": "integer",
"description": "Maximum number of retry attempts allowed.",
"example": 3
}
}
}
}
},
"Error400": {
"required": [
"message"
],
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Invalid request payload"
}
}
},
"Error401": {
"required": [
"message"
],
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Unauthorized request"
}
}
},
"Error404": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Resource not found"
}
}
},
"Error429": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Rate limit exceeded"
}
}
},
"Error500": {
"required": [
"message"
],
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Internal Server Error"
}
}
},
"Error503": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Service temporarily unavailable"
}
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Successfully initiated verification process.
The response is of type object
.