# Get account analytics

> Get account analytics: TrueProxies customer API reference with the required scope, parameters, responses and code samples.

Source: https://docs.trueproxies.com/api/operations/get_v1_analytics/

`GET /v1/analytics`

**Fetch**

```js
const url = 'https://api.trueproxies.com/v1/analytics?range=24h';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**cURL**

```sh
curl --request GET \
  --url 'https://api.trueproxies.com/v1/analytics?range=24h' \
  --header 'Authorization: Bearer <token>'
```

Analytics across the services owned by this account.

## Authorizations

- **[customerAPIKey](https://docs.trueproxies.com/api/#customerapikey)**

## Parameters

### Query Parameters

- **customer\_id**

  string format: uuid

  Owned sub-customer UUID. Resellers only; reads require reseller:read and writes reseller:purchase in addition to the operation scope. X-Customer-Id header is an alternative. Not allowed for me, wallet, trial, API keys, or reseller-management routes.

- **range**

  string

  default: 24h

  Allowed values: 24h 7d 30d

## Responses

### 200

Ok

Media type: `application/json`

object

- **destinations**

  required

  Array\<object>

  object

  - **bytes**

    required

    integer format: int64

  - **failures**

    required

    Outcomes with a proxy error, including no\_response and excluding outcomes that ended on the client side.

    integer format: int64

  - **host**

    required

    string

  - **requests**

    required

    integer format: int64

- **errors**

  required

  Outcome counts by class. Proxy errors use their error class, plus no\_response for outcomes recorded without an error in which the client sent a request after proxy setup and received nothing beyond the setup reply. client\_reset (the client side reset the connection) and client\_left\_open (the client side kept the connection open after the destination finished) are listed here but are not failures.

  Array\<object>

  object

  - **count**

    required

    integer format: int64

  - **err\_class**

    required

    Error class, or no\_response, client\_reset or client\_left\_open as described in Analytics errors.

    string

- **range**

  required

  string

- **series**

  required

  Array\<object>

  object

  - **avg\_session\_ms**

    Mean elapsed milliseconds of measured completed authenticated socket sessions; null when no samples exist.

    number | null

  - **avg\_setup\_ms**

    Mean gateway-to-destination setup milliseconds for measured successful initial TCP tunnels; null when no samples exist.

    number | null

  - **bytes\_in**

    required

    integer format: int64

  - **bytes\_out**

    required

    integer format: int64

  - **failures**

    required

    Outcomes with a proxy error, including no\_response and excluding outcomes that ended on the client side.

    integer format: int64

  - **requests**

    required

    integer format: int64

  - **session\_samples**

    Number of measured completed session samples in this bucket.

    integer

  - **setup\_samples**

    Number of measured successful setup samples in this bucket.

    integer

  - **ts**

    required

    string format: date-time

- **success\_rate**

  required

  Share of recorded proxy connection outcomes without a proxy error. Outcomes that ended on the client side (client\_reset and client\_left\_open in errors) are not proxy errors; no\_response is. This is not destination HTTP status.

  number

##### Example (generated)

```json
{
  "destinations": [
    {
      "bytes": 1,
      "failures": 1,
      "host": "example",
      "requests": 1
    }
  ],
  "errors": [
    {
      "count": 1,
      "err_class": "example"
    }
  ],
  "range": "example",
  "series": [
    {
      "avg_session_ms": 1,
      "avg_setup_ms": 1,
      "bytes_in": 1,
      "bytes_out": 1,
      "failures": 1,
      "requests": 1,
      "session_samples": 1,
      "setup_samples": 1,
      "ts": "2026-04-15T12:00:00Z"
    }
  ],
  "success_rate": 1
}
```

### 400

Error

Media type: `application/json`

object

- **code**

  required

  string

  Allowed values: BAD\_REQUEST UNAUTHENTICATED FORBIDDEN NOT\_FOUND CONFLICT RATE\_LIMITED SERVICE\_UNAVAILABLE OFFER\_UNAVAILABLE CITY\_UNAVAILABLE CAPACITY\_UNAVAILABLE INVOICE\_NOT\_PAYABLE PROVIDER\_ERROR PIPE\_UNAVAILABLE TRIAL\_NOT\_ELIGIBLE EMAIL\_UNVERIFIED INTERNAL

- **details**

  What a client needs to act on the error (ids, flags), never display text.

  object

  - ***key***

    additional properties

    any

- **message**

  required

  string

##### Example

```json
{
  "code": "BAD_REQUEST"
}
```

### 401

Error

Media type: `application/json`

object

- **code**

  required

  string

  Allowed values: BAD\_REQUEST UNAUTHENTICATED FORBIDDEN NOT\_FOUND CONFLICT RATE\_LIMITED SERVICE\_UNAVAILABLE OFFER\_UNAVAILABLE CITY\_UNAVAILABLE CAPACITY\_UNAVAILABLE INVOICE\_NOT\_PAYABLE PROVIDER\_ERROR PIPE\_UNAVAILABLE TRIAL\_NOT\_ELIGIBLE EMAIL\_UNVERIFIED INTERNAL

- **details**

  What a client needs to act on the error (ids, flags), never display text.

  object

  - ***key***

    additional properties

    any

- **message**

  required

  string

##### Example

```json
{
  "code": "BAD_REQUEST"
}
```

### 403

Error

Media type: `application/json`

object

- **code**

  required

  string

  Allowed values: BAD\_REQUEST UNAUTHENTICATED FORBIDDEN NOT\_FOUND CONFLICT RATE\_LIMITED SERVICE\_UNAVAILABLE OFFER\_UNAVAILABLE CITY\_UNAVAILABLE CAPACITY\_UNAVAILABLE INVOICE\_NOT\_PAYABLE PROVIDER\_ERROR PIPE\_UNAVAILABLE TRIAL\_NOT\_ELIGIBLE EMAIL\_UNVERIFIED INTERNAL

- **details**

  What a client needs to act on the error (ids, flags), never display text.

  object

  - ***key***

    additional properties

    any

- **message**

  required

  string

##### Example

```json
{
  "code": "BAD_REQUEST"
}
```

### 404

Error

Media type: `application/json`

object

- **code**

  required

  string

  Allowed values: BAD\_REQUEST UNAUTHENTICATED FORBIDDEN NOT\_FOUND CONFLICT RATE\_LIMITED SERVICE\_UNAVAILABLE OFFER\_UNAVAILABLE CITY\_UNAVAILABLE CAPACITY\_UNAVAILABLE INVOICE\_NOT\_PAYABLE PROVIDER\_ERROR PIPE\_UNAVAILABLE TRIAL\_NOT\_ELIGIBLE EMAIL\_UNVERIFIED INTERNAL

- **details**

  What a client needs to act on the error (ids, flags), never display text.

  object

  - ***key***

    additional properties

    any

- **message**

  required

  string

##### Example

```json
{
  "code": "BAD_REQUEST"
}
```

### 409

Error

Media type: `application/json`

object

- **code**

  required

  string

  Allowed values: BAD\_REQUEST UNAUTHENTICATED FORBIDDEN NOT\_FOUND CONFLICT RATE\_LIMITED SERVICE\_UNAVAILABLE OFFER\_UNAVAILABLE CITY\_UNAVAILABLE CAPACITY\_UNAVAILABLE INVOICE\_NOT\_PAYABLE PROVIDER\_ERROR PIPE\_UNAVAILABLE TRIAL\_NOT\_ELIGIBLE EMAIL\_UNVERIFIED INTERNAL

- **details**

  What a client needs to act on the error (ids, flags), never display text.

  object

  - ***key***

    additional properties

    any

- **message**

  required

  string

##### Example

```json
{
  "code": "BAD_REQUEST"
}
```

### 429

Error

Media type: `application/json`

object

- **code**

  required

  string

  Allowed values: BAD\_REQUEST UNAUTHENTICATED FORBIDDEN NOT\_FOUND CONFLICT RATE\_LIMITED SERVICE\_UNAVAILABLE OFFER\_UNAVAILABLE CITY\_UNAVAILABLE CAPACITY\_UNAVAILABLE INVOICE\_NOT\_PAYABLE PROVIDER\_ERROR PIPE\_UNAVAILABLE TRIAL\_NOT\_ELIGIBLE EMAIL\_UNVERIFIED INTERNAL

- **details**

  What a client needs to act on the error (ids, flags), never display text.

  object

  - ***key***

    additional properties

    any

- **message**

  required

  string

##### Example

```json
{
  "code": "BAD_REQUEST"
}
```

### 500

Error

Media type: `application/json`

object

- **code**

  required

  string

  Allowed values: BAD\_REQUEST UNAUTHENTICATED FORBIDDEN NOT\_FOUND CONFLICT RATE\_LIMITED SERVICE\_UNAVAILABLE OFFER\_UNAVAILABLE CITY\_UNAVAILABLE CAPACITY\_UNAVAILABLE INVOICE\_NOT\_PAYABLE PROVIDER\_ERROR PIPE\_UNAVAILABLE TRIAL\_NOT\_ELIGIBLE EMAIL\_UNVERIFIED INTERNAL

- **details**

  What a client needs to act on the error (ids, flags), never display text.

  object

  - ***key***

    additional properties

    any

- **message**

  required

  string

##### Example

```json
{
  "code": "BAD_REQUEST"
}
```

### 503

Error

Media type: `application/json`

object

- **code**

  required

  string

  Allowed values: BAD\_REQUEST UNAUTHENTICATED FORBIDDEN NOT\_FOUND CONFLICT RATE\_LIMITED SERVICE\_UNAVAILABLE OFFER\_UNAVAILABLE CITY\_UNAVAILABLE CAPACITY\_UNAVAILABLE INVOICE\_NOT\_PAYABLE PROVIDER\_ERROR PIPE\_UNAVAILABLE TRIAL\_NOT\_ELIGIBLE EMAIL\_UNVERIFIED INTERNAL

- **details**

  What a client needs to act on the error (ids, flags), never display text.

  object

  - ***key***

    additional properties

    any

- **message**

  required

  string

##### Example

```json
{
  "code": "BAD_REQUEST"
}
```
