# Verify an account from an agent

Buying anything over the API, and adding credit, needs a **verified email
address and phone number**. New accounts are not asked to verify the phone at
signup, so the first purchase from an account an agent just made often fails
with `VERIFICATION_REQUIRED`. The phone can be verified without leaving the
conversation.

## 1. Send the code

```
POST /api/json/v3/account/verifyPhone/send
{"apikey":"pk1_...","secretapikey":"sk1_..."}
```

This texts a code to the phone number **already on the account**; it cannot be
chosen or changed over the API.

```json
{"status":"SUCCESS","sent":true,"channel":"sms","sentTo":"+1 ••• 42","expiresInMinutes":10}
```

If the text does not arrive, send again with `"channel": "call"` for a voice
call that reads the code out. A second text request within 10 minutes returns
`"codeAlreadySent": true` instead of texting again: the first code is still good.

## 2. Ask the person for the code, and confirm it

```
POST /api/json/v3/account/verifyPhone/confirm
{"apikey":"pk1_...","secretapikey":"sk1_...","code":"CKVEGRUS"}
```

Pass the code exactly as texted; case does not matter.

```json
{"status":"SUCCESS","verified":true,"emailVerified":true,"message":"The phone number is verified. Retry what needed it."}
```

Then retry the call that failed. If `emailVerified` is `false`, the email still
needs verifying: the account holder clicks the link in the verification email,
which they can resend from account settings at https://porkbun.com/account.

## From the MCP server

The tools are `send_phone_verification_code` and `confirm_phone_verification`.
They are on the full server and `/mcp/no-topups`.

## Errors

- `PHONE_CODE_INVALID`: wrong or expired code. Check it with the person, or send
  a new one.
- `PHONE_VERIFY_LIMIT`: five codes sent today, or ten wrong codes this hour.
- `PHONE_VERIFY_UNAVAILABLE`: no phone number on the account, or a country where
  phone verification needs the website's CAPTCHA. Verify at
  https://porkbun.com/account.
- `PHONE_VERIFY_FAILED`: the code could not be sent. Retry once, or use
  `"channel": "call"`.

Already verified: both calls return `"alreadyVerified": true`. Not available on
sandbox keys.


---

## More

- Guides (how-tos): https://porkbun.com/llms/guides
- Topic index: https://porkbun.com/llms
- Full reference (one file): https://porkbun.com/llms-full.txt
- OpenAPI spec (full schemas): https://porkbun.com/api/json/v3/spec
- Short overview: https://porkbun.com/llms.txt
- Official MCP server: https://porkbun.com/mcp (`npx -y @porkbunllc/mcp-server`)
- Create API keys: https://porkbun.com/account/api
