Rent a number (agent: API key or pay-per-SMS)
ucode_agent_rentRent one virtual number for a lawful SMS verification. Pays from the agent wallet when a uc_live_ API key is active (from ucode_agent_buy_credits, ucode_agent_use_api_key, or an Authorization: Bearer uc_live_… header on the MCP connection). Without a key it uses pay-per-SMS: first call returns PAYMENT_REQUIRED (x402, USDC on Base); call again with paymentHeader. Returns phone, id and pollToken → then call ucode_agent_check_sms. Signed-in human accounts should use ucode_sms_rent_with_credits instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | No | uc_live_… key if not already active in this session | |
| country | No | countryId (preferred), ISO code or name | |
| purpose | Yes | Why the number is needed | |
| service | Yes | Service code from ucode_find_numbers, e.g. tg | |
| paymentHeader | No | x402 X-PAYMENT value for pay-per-SMS | |
| acceptLawfulUse | Yes | Must be true |