# Area codes

> How a line's area code is chosen.

Every new line is created on the network when you order it. You say where you want it with
`zip` or `area_code`, and the network assigns a number in that area.

| You send | What happens |
| --- | --- |
| `zip` | The number is assigned in that ZIP code's area. If the ZIP code has one area code you get it; if it has several, the network picks one of them. |
| `area_code` | We order in a ZIP code inside that area code. Where only one area code serves the area you get it. Where several do (an overlay), the network picks, so it is **best effort**. |

Every line in an order response and webhook carries the `area_code` it actually received, so
you can check it before you install.

A line ordered with `area_code` also carries `requested_area_code` and, once it is active,
`area_code_match`: `true` if it got the area code you asked for, `false` if the network gave
it another one. A miss also sends a `line.area_code_mismatch` webhook with the
`requested_area_code`; the line stays active, so you can keep it, change its number, or
release it.

## Overlays

Many US areas are served by several area codes at once (an overlay). There, the network picks
which code a new number gets, so you may receive any code in the overlay:

| You ask for | Codes in that area |
| --- | --- |
| 212 (Manhattan) | 212, 646, 917, 332 |
| 310 (LA Westside) | 310, 424 |
| 415 (San Francisco) | 415, 628 |
| 305 (Miami) | 305, 786, 645 |
| 202 (Washington, DC) | 202, 771 |

Area codes that serve their area alone are returned reliably.

## Area code history

```http
GET /v1/gather/lines/areacode/history?area_code=212
```

Before you order, see what recent lines actually got. Send `area_code` or `zip` (one of them),
and optionally `days` (1 to 90, default 30). It counts lines that went active on the network in
that window, across all accounts, and returns area codes and counts only, never numbers. Results
drift over time, so recent ones say the most.

```json
{
  "area_code": "212",
  "days": 30,
  "lines": 14,
  "matched": 5,
  "got": [{ "area_code": "646", "count": 6 }, { "area_code": "212", "count": 5 }, { "area_code": "917", "count": 3 }],
  "latest_at": "2026-10-13T18:22:05Z",
  "zip": "10001",
  "overlay": ["212", "646", "917", "332"]
}
```

`matched` is how many got the area code asked for. `zip` is where orders for that area code are
placed, and `overlay` lists the codes that share its area. With `zip=` instead, you get `lines`,
`got` and `latest_at` for lines ordered in that ZIP code. It is free and works with an API key.

## Tax

Taxes follow the service location of the line, which is the ZIP code it was ordered in, not
where your devices sit.

> **Coming later.** Guaranteed area codes for high-demand areas.
