SmsController

Extract verification codes from an SMS

Extract one-time passcodes and verification tokens from SMS body content. Deterministic PATTERN extraction is available now. Use method flags to control fallback behavior for QA.

post/sms/{smsId}/codes

Request

  • Base URL: https://api.mailslurp.com
  • URL: https://api.mailslurp.com/sms/{smsId}/codes
  • Auth: API key in header x-api-key

Path parameters

smsIdstring uuid required

ID of SMS to extract codes from

Request body

method'AUTO' | 'PATTERN' | 'LLM' | 'OCR' | 'OCR_THEN_LLM' nullable

Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true.

allowFallbackboolean

Allow fallback to deterministic pattern extraction when the selected method is unavailable.

minLengthinteger

Minimum code length to consider. Typical OTP values are between 4 and 8 characters.

maxLengthinteger

Maximum code length to consider.

maxCandidatesinteger

Maximum number of code candidates to return. Best candidate is also returned separately.

customPatternsstring[] nullable

Optional custom regex patterns for code extraction. Each pattern should have either one capture group for the code or match the full code directly.

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.