# Phone registration: verify SMS — `POST /v1/account/register/phone/verify`

> Complete 2-step phone/SMS registration with the OTP code and return an internal Connected Workspace account_id (Scale+).

- **Endpoint:** `POST https://api.tikultra.com/v1/account/register/phone/verify`
- **Auth Header:** `x-api-key: $TIKULTRA_KEY`
- **Pool:** Your Account (Runs on a connected account you own)
- **Plan Access:** Scale and up
- **Quota Weight:** 35 reqs (`0` req on any failed call)
- **Upstream Mobile Path(s):** `/passport/mobile/sms_login_only/`, `/passport/mobile/sms_login_continue/`

## Parameters

| Parameter | Type | Required | Description & How to Get | Example |
| --- | --- | --- | --- | --- |
| `context_id` | `string` | required | The context_id returned by /v1/account/register/phone/send. Get from: [Phone registration: send SMS (`POST /v1/account/register/phone/send`)](https://tikultra.com/docs/api/register-phone-send) → `context_id`. | `7392011847562901234` |
| `mobile` | `string` | required | The same E.164 phone number. | `+14155550199` |
| `code` | `string` | required | One-time SMS verification code. 6-digit code sent by: [Phone registration: send SMS (`POST /v1/account/register/phone/send`)](https://tikultra.com/docs/api/register-phone-send). | `591024` |
| `password` | `string` | required | The same password. | `StrongPassword!2026` |
| `birthday` | `string` | required | The same YYYY-MM-DD birthday. | `1999-04-15` |
| `proxy` | `string` | required | The same caller-supplied residential or mobile proxy URL. | `http://user:pass@res-us-miami.proxy.example:8080` |
| `async` | `boolean` | optional | Run completion asynchronously and return task_id (202 Accepted) yielding account_id. | `true` |

## What it returns

Returns JSON decoded from `/passport/mobile/sms_login_only/`. Identifier fields (`aweme_id`, `uid`, `sec_uid`, `room_id`, `product_id`) match input names on follow-up endpoints.

### Billing & telemetry headers on every response

- `x-request-id`: Unique gateway trace ID for support and debugging.
- `x-ratelimit-remaining`: Remaining requests in your current rate-limit window.
- `x-quota-weight`: Request weight for this call (35 reqs on 200 OK; always 0 on failed calls).

### Key decoded response fields

| Field | Type | Description |
| --- | --- | --- |
| `status` | `string` | Decoded `status` value returned from /passport/mobile/sms_login_only/. |
| `account_id` | `string` | Caller-owned Connected Workspace session identifier. |
| `context_id` | `string` | Dedicated mobile device context identifier. |
| `device_id` | `string` | 64-bit registered mobile `device_id` bound to the context. |
| `os` | `string` | Decoded `os` value returned from /passport/mobile/sms_login_only/. |
| `app_flavour` | `string` | Decoded `app_flavour` value returned from /passport/mobile/sms_login_only/. |
| `app_version` | `string` | Decoded `app_version` value returned from /passport/mobile/sms_login_only/. |
| `region` | `string` | Decoded `region` value returned from /passport/mobile/sms_login_only/. |

## How to use it: 2-Step Scale+ Email Registration with BYO Proxy

Register a brand-new account on a fresh FullPool hardware profile routed strictly through your own residential or mobile proxy, verify the email OTP, and immediately configure the profile.

1. **Check desired @username availability** *(optional)* — [`GET /v1/user/check-username`](https://tikultra.com/docs/api/check-username) (1 req): Verify your target handle is free with GET /v1/user/check-username (1 req) before starting registration.
2. **Bootstrap device & send registration code** — [`POST /v1/account/register/email/send`](https://tikultra.com/docs/api/register-email-send) (15 reqs): Pass email, password, birthday (YYYY-MM-DD), region/city, and your residential/mobile proxy URL. Save the returned context_id.
3. **Verify email OTP & persist account_id** — [`POST /v1/account/register/email/verify`](https://tikultra.com/docs/api/register-email-verify) (35 reqs): Submit the 6-digit email code along with the exact same context_id and proxy URL to finalize registration and mint account_id.
4. **Claim @username & set bio/avatar** *(optional)* — [`POST /v1/account/profile/username`](https://tikultra.com/docs/api/profile-username) (6 reqs): Set your handle (/v1/account/profile/username), bio (/v1/account/profile/update), and avatar (/v1/account/profile/avatar).
5. **Phone registration: verify SMS** **(THIS ENDPOINT)** — [`POST /v1/account/register/phone/verify`](https://tikultra.com/docs/api/register-phone-verify) (35 reqs): Complete 2-step phone/SMS registration with the OTP code and return an internal Connected Workspace account_id (Scale+). (POST /v1/account/register/phone/verify).
6. **Calibrate initial For You niche** *(optional)* — [`POST /v1/account/warm/niche`](https://tikultra.com/docs/api/warm-niche) (6 reqs): Warm the newly registered session with organic topic searches and feed dwells via POST /v1/account/warm/niche.

> **Agent Tip:** Registration requires Scale or Enterprise plus a caller-supplied residential/mobile proxy (byo_proxy_required). Always pass the identical context_id and proxy in both step 1 and step 2.

## Code examples (cURL, TypeScript SDK, Python SDK)

### TypeScript SDK
```ts
import { TikUltra } from 'tikultra'

const client = new TikUltra({ apiKey: process.env.TIKULTRA_KEY })

const res = await client.request('POST', '/v1/account/register/phone/verify', {
  body: {
    context_id: '7392011847562901234',
    mobile: '+14155550199',
    code: '591024',
    password: 'StrongPassword!2026',
    birthday: '1999-04-15',
    proxy: 'http://user:pass@res-us-miami.proxy.example:8080',
    async: true,
  },
})
console.log(res.data)
```

### Python SDK
```python
import os
from tikultra import TikUltra

with TikUltra(api_key=os.environ["TIKULTRA_KEY"]) as client:
    res = client.request(
        "POST",
        "/v1/account/register/phone/verify",
        json_body={
            "context_id": "7392011847562901234",
            "mobile": "+14155550199",
            "code": "591024",
            "password": "StrongPassword!2026",
            "birthday": "1999-04-15",
            "proxy": "http://user:pass@res-us-miami.proxy.example:8080",
            "async": True,
        },
    )
    print(res.data)
```

### cURL
```bash
curl -X POST https://api.tikultra.com/v1/account/register/phone/verify \
  -H "x-api-key: $TIKULTRA_KEY" \
  -H "content-type: application/json" \
  -d '{"context_id":"7392011847562901234","mobile":"+14155550199","code":"591024","password":"StrongPassword!2026","birthday":"1999-04-15","proxy":"http://user:pass@res-us-miami.proxy.example:8080","async":true}'
```

### Python (HTTP)
```python
import os, requests

r = requests.post(
    "https://api.tikultra.com/v1/account/register/phone/verify",
    json={
        "context_id": "7392011847562901234",
        "mobile": "+14155550199",
        "code": "591024",
        "password": "StrongPassword!2026",
        "birthday": "1999-04-15",
        "proxy": "http://user:pass@res-us-miami.proxy.example:8080",
        "async": True,
    },
    headers={"x-api-key": os.environ["TIKULTRA_KEY"]},
)
print(r.json())
```

### JavaScript
```bash
const res = await fetch('https://api.tikultra.com/v1/account/register/phone/verify', {
  method: 'POST',
  headers: { 'x-api-key': process.env.TIKULTRA_KEY, 'content-type': 'application/json' },
  body: JSON.stringify({"context_id":"7392011847562901234","mobile":"+14155550199","code":"591024","password":"StrongPassword!2026","birthday":"1999-04-15","proxy":"http://user:pass@res-us-miami.proxy.example:8080","async":true}),
})
console.log(await res.json())
```

## Sample 200 JSON response

```json
{
  "status": "registered",
  "account_id": "acc_4Lm8",
  "context_id": "7392011847562901234",
  "device_id": "7392011847562901234",
  "os": "android",
  "app_flavour": "tiktok",
  "app_version": "47.5.41",
  "region": "US",
  "city": "miami",
  "mobile": "+14155550199",
  "uid": "107955",
  "sec_uid": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
  "username": "user849201939",
  "session_persisted": true
}
```
