# AccountTraffic

The AccountTraffic type of the TypeScript SDK, which accounts.getTraffic take or answer.

```ts
type AccountTraffic = {
  accountId: string
  byOutcome: Record<string, number>
  domains: string[]
  domainsTruncated: boolean
  estimated: boolean
  mailboxId?: string
  range: string
  retentionDays: number
  rows: TrafficRow[]
  series?: TrafficSeriesPoint[]
  totals: AccountTrafficTotals
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `accountId` | `string` | Account ID |
| `byOutcome` | `Record<string, number>` | Breakdown of event counts by outcome |
| `domains` | `string[]` | List of domain names included in this aggregate |
| `domainsTruncated` | `boolean` | True if account owns more domains than query limit |
| `estimated` | `boolean` | True if metrics are sampled estimates |
| `mailboxId` | `string` | Optional. Present when the aggregate was narrowed to one mailbox |
| `range` | `string` | Time range of statistics |
| `retentionDays` | `number` | Analytics retention window in days |
| `rows` | [`TrafficRow[]`](/docs/sdks/typescript/types/traffic-row) | Breakdown rows grouped by outcome and route kind |
| `series` | [`TrafficSeriesPoint[]`](/docs/sdks/typescript/types/traffic-series-point) | Optional. Time-series buckets for charting |
| `totals` | [`AccountTrafficTotals`](/docs/sdks/typescript/types/account-traffic-totals) |  |

## Used by

| Method | What it does |
| --- | --- |
| [`accounts.getTraffic`](/docs/sdks/typescript/accounts/get-traffic) | Get account traffic statistics |
