# PhoneAgent

> Temporary exclusive phone numbers for AI agents. Pay via x402 (USDC on Base L2).
> Charged only if an SMS actually arrives during the rental window.
> $1 flat for most services, $2 for Telegram/WhatsApp.

No signup, no API key. Machine-to-machine over HTTP 402.

## API
- [OpenAPI spec](https://api.phoneagent.xyz/openapi.json): full machine-readable API definition with embedded examples.
- [Rendered docs](https://api.phoneagent.xyz/docs): human-readable rendering.

## Key endpoints
- `GET /countries` — what's available right now, priced (paid discovery, 0.01 USDC).
- `POST /rent` — 402 Payment Required; pay with x402 `exact` to receive a number ($1 / $2).
- `GET /sms/{rental_id}?token=…&wait=25` — long-poll for incoming SMS (free; gated by rental token).
- `GET /rentals/{rental_id}` — rental status (free).

## Payment
- Network: `base`
- Asset: USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`)
- Scheme: x402 `exact` with deferred settlement. Client signs an EIP-3009 authorization for the exact SKU price ($1 or $2) whose `validBefore` covers the rental window. Server calls settle only when an SMS arrives; otherwise the authorization expires unused and the client is never charged.
