# Email Read Verification Code (Microsoft Graph) API

> Poll an outlook.com mailbox over Microsoft Graph for a verification code. For accounts whose IMAP switch is off. Returns the code or an error.

Category: [Utility APIs](https://upapi.io/apis/utility) · Last updated 2026-11-02

## How to call it

- Endpoint: `POST https://api.upapi.io/email-read-verification-code-graph.post`, key in the `X-Api-Key` header, JSON body.
- Cost: 1 weighted unit per call.
- Timeout: 310 seconds.
- Cache: none; every call runs the operation.
- Try it without writing code: https://app.upapi.io/try/email-read-verification-code-graph.post

```bash
curl -X POST https://api.upapi.io/email-read-verification-code-graph.post \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "pollSeconds": 5, "graphClientId": "example", "senderContains": "tiktok", "timeoutSeconds": 120, "graphRefreshToken": "example" }'
```

## Request parameters

- `codePattern` (string) — Regex pattern for the code (default: 6-digit number)
- `pollSeconds` (number) — Seconds between polls
- `graphClientId` (string, required) — Microsoft public app client_id
- `senderContains` (string, required) — Substring to match in the From header (e.g. 'tiktok', 'github')
- `timeoutSeconds` (number) — Max seconds to poll
- `minEpochSeconds` (number) — Ignore messages received before this Unix timestamp
- `graphRefreshToken` (string, required) — OAuth refresh token (Mail.Read offline_access)
- `recipientContains` (string) — Substring to match in the To header — REQUIRED to tell plus-addresses (base+alias@outlook.com) apart when many accounts share one inbox

## Response fields

- `code` (string)
- `error` (string)
- `success` (boolean, required)
- `elapsedMs` (integer, required)

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "pollSeconds": 5,
  "graphClientId": "example",
  "senderContains": "tiktok",
  "timeoutSeconds": 120,
  "graphRefreshToken": "example"
}
```

```json
{
  "code": "US",
  "error": "example",
  "success": false,
  "elapsedMs": 1
}
```

## Frequently asked questions

### How much does the Email Read Verification Code (Microsoft Graph) API cost per call?

Each call spends 1 weighted unit of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Email Read Verification Code (Microsoft Graph) API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Email Read Verification Code (Microsoft Graph) API responses cached?

No — every call runs the operation live; responses are not cached.

## More Utility APIs

- [Email Read Verification Link (Microsoft Graph)](https://upapi.io/apis/utility/email-read-verification-link-graph)
- [Read Email Verification Code](https://upapi.io/apis/utility/email-read-verification-code)
- [Read Email Verification Link](https://upapi.io/apis/utility/email-read-verification-link)
- [Email Generate Address](https://upapi.io/apis/utility/email-generate-address)
