OTP extraction
We parse incoming email and extract one-time codes (OTP, verification codes, magic link tokens) so you get the value directly — no regex on your side. Available on Developer plan and above.
Free plan: __DETECTED__
On the Free plan, when an OTP is detected we return __DETECTED__ instead of the actual code. This lets you confirm that the pipeline works before upgrading to a paid plan to receive the real value.
GET /v1/inboxes/{inbox}/otp
Returns the latest extracted OTP (and verification link) for the inbox, or null if none found. Requires Developer plan or higher. Response is under data:
| Field | Description |
|---|---|
| otp | The code, or null |
| score | Confidence score (0.0 to 1.0) of the extracted OTP |
| verification_link | Extracted link if present |
| from, subject | Sender and subject |
| message_id, received_at | Message ID and timestamp |
curl "https://api2.freecustom.email/v1/inboxes/mytest@ditapi.info/otp" \
-H "Authorization: Bearer fce_your_api_key"Example success (200):
{
"success": true,
"data": {
"inbox": "mytest@ditapi.info",
"otp": "847291",
"score": 0.98,
"verification_link": "https://github.com/verify?token=abc123",
"from": "noreply@example.com",
"subject": "Your code is 847291",
"message_id": "msg_abc123",
"received_at": "2026-03-04T09:55:00.000Z"
}
}No OTP found: { "success": true, "data": { "otp": null, "verification_link": null, "message": "No OTP or verification link detected..." } }. 403 if plan is free (upgrade_url in body).
Edge cases
If no OTP is found, the response is { "otp": null } (or similar). This is not an error — the request succeeded; there was simply no code in the latest messages.