<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/partners-api/online/online-usage

# Online Usage

`POST https://partners.99digital.co.il/api/online/getUsage`

This endpoint allows you to get your account's online usage data.

The data is always updated to yesterday.

There is a rate limit of 10 requests per minute to avoid abuse.

It is the same data as the **Online Usage** page of the partners
dashboard. You get only the accounts that belong to your partner account,
one item per account per server, sorted by `server` and then by
`account_id`. An `account_id` or `server` that isn't yours is not an
error: the `list` is simply empty. One month per request: to get several
months, call the endpoint once per month.

## Settings

| Setting | Value |
| --- | --- |
| URL | `https://partners.99digital.co.il/api/online/getUsage` |
| Method | JSON via POST. GET works too, with the same fields as query parameters: `GET /online/getUsage?month=0926&server=online&account_id=123`. With POST, the fields are read from the JSON body; a field that is not in the body is read from the query string. |
| Header | `Authorization: Bearer {{access_token}}` — the access token can be received from the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. |

## Body

| Parameter | Description / Example | Maximum length | Mandatory | Example |
| --- | --- | --- | --- | --- |
| `month` | The month + year in `mmyy` format, for example `1026` for October 2026. Only the current month or an earlier month (Israel time). Send it as a string, so a leading zero is kept (`0926`). | 4 | Yes | `1026` |
| `server` | The server name, if relevant: return only the accounts on this server. Letters, digits, spaces and hyphens. Empty or left out — all servers. | 30 | No | `online` |
| `account_id` | In case you want to get the data of a specific account ID (exact match). Digits only. Empty or left out — all accounts. | 20 digits | No | `1` |

## Response

```json
{
  "status": "OK",
  "reason": 1,
  "month": "0926",
  "month_label": "09/2026",
  "is_current_month": false,
  "server": null,
  "account_id": null,
  "totalAccounts": 1,
  "list": [
    {
      "month": "0926",
      "month_label": "09/2026",
      "year": 2026,
      "account_id": 123,
      "account_name": "Client Name",
      "online_name": "Client Name Ltd",
      "server": "online",
      "server_name": "online",
      "total_agents": 5,
      "data_amount": "74.3GB",
      "data_amount_gb": 74.3,
      "total_inboxes": 6,
      "inboxes": {
        "whatsapp": 2, "sms": 1, "facebook": 1, "api": 1,
        "website": 1, "email": 0, "line": 0, "tiktok": 0
      },
      "sms_packages": { "1": 1, "2": 0, "3": 0 },
      "chat_gpt": true,
      "builder": false,
      "mobile_app": true,
      "docal_enabled": false,
      "collected_at": 1790805612,
      "collected_at_israel": "01-10-2026 01:00:12"
    }
  ]
}
```

## Response explained

| Parameter | Description |
| --- | --- |
| `status` | OK or FAIL. "OK" means the request was successful (also when `list` is empty). "FAIL" means error. |
| `month` | String — the same as the request (`mmyy`). |
| `month_label` | String — the requested month, in `mm/yyyy` format. |
| `is_current_month` | Boolean. `true` = the current month (still updated every night); `false` = an old month (its numbers are final). |
| `server` | String or null — the server filter you provided, or `null` for all servers. |
| `account_id` | Number or null — the account filter you provided, or `null` for all accounts. |
| `totalAccounts` | Number — the total number of items inside `list`. |
| `list` | One item per account per server — see the table below. Empty when there is no data. |
| `reason` | The status explanation — see the reason table below. |

Each item in `list`:

| Field | Type | Description |
| --- | --- | --- |
| `month` / `month_label` / `year` | string / string / number | The month of the record (`mmyy`, `mm/yyyy`, `yyyy`). |
| `account_id` | number | The online account ID. |
| `account_name` | string | The account name, as saved in the partners system. |
| `online_name` | string | The account name as it appears on the online server. |
| `server` | string | The server the account is on. |
| `server_name` | string | The display name of the server. |
| `total_agents` | number | The number of agents in the account. |
| `data_amount` | string | The data used, as text, for example `74.2GB`. |
| `data_amount_gb` | number | The same value as `data_amount`, just as a number in GB. |
| `total_inboxes` | number | The total number of inboxes this account has. |
| `inboxes` → `whatsapp` / `sms` / `facebook` / `api` / `website` / `email` / `line` / `tiktok` | number | The number of inboxes of each type (`facebook` counts Facebook and Instagram inboxes; `website` is live chat). |
| `sms_packages` | object | The number of SMS inboxes per SMS package. The keys are package numbers as strings, for example `"1"` / `"2"` / `"3"`; these three are always present, 0 if unused. Any other package in use is added as an extra key. |
| `chat_gpt` | boolean | Whether ChatGPT is enabled in the account. |
| `builder` | boolean | Whether a Builder is connected to the account. |
| `mobile_app` | boolean | Whether the mobile app is enabled for the account. |
| `docal_enabled` | boolean | Whether Docal is enabled for the account. |
| `collected_at` | number | The Unix timestamp of when the data was collected. |
| `collected_at_israel` | string | The same time as `collected_at`, just in Israel time (`dd-mm-yyyy HH:MM:SS`). |

| Reason | Explanation |
| --- | --- |
| 1 | Not FAIL: the status is OK. |
| 2 | Wrong credentials: the `Authorization` header is missing or not `Bearer <token>`, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected). |
| 3 | The access token does not exist or has expired. Please generate another one with the [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token) API. |
| 4 | Server error, try again. |
| 33 | Invalid `account_id`: not digits only (up to 20 digits). |
| 34 | Invalid `server` format: longer than 30 characters, or has characters other than letters, digits, spaces and hyphens. |
| 48 | `month` is missing or not in `mmyy` format (the month must be 01–12). |
| 49 | `month` can't be a future time — only the current month or an old month is accepted (Israel time). |
| 403 | Permission denied (HTTP 403): the user the access token was created for doesn't have the **Access Online usage page** permission. |
| 429 | Too many requests (HTTP 429): more than 10 requests in this clock minute. Wait for the next minute and try again. |

## When the numbers update

The usage is collected once a night (at about 01:00 Israel time) from
every online server, and each collection saves the state of every account
at that moment into the month of the previous day (Israel time):

- **Current month** (`is_current_month` true): the numbers are replaced
  every night with the latest collection — they are not added up.
  `collected_at` tells you when the record was last collected.
- **A new month**: the collection on the 1st (at about 01:00) still
  belongs to the last day of the previous month, so it closes the previous
  month. The new month's records first appear after the collection on the
  2nd; until then, the current month returns an empty `list`.
- **Previous months** (`is_current_month` false): the last collection of
  the month — normally the one on the 1st of the next month — is final.
  These numbers don't change any more.
- A deleted account keeps its usage: it is still returned for the months
  that were collected before it was deleted.

## Rate limit

The rate limit of 10 requests per minute counts the requests of your
partner account — all its access tokens together — per clock minute; a
request over the limit gets HTTP 429 (reason 429).

## Access

Requires the **Access Online usage page** permission. Account-scoped
access tokens — created from an account's **Account API Credentials** in
the partners dashboard — can't use this endpoint: they get reason 2. When
the access token has expired (reason 3), create a new one with
[Access Token](https://docs.99digital.co.il/partners-api/settings/access-token).

## Authentication

`Authorization: Bearer <token>` header — `Bearer ` followed by your access token. Create the token with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token), from the client id and client secret in your partners dashboard. It is valid for one hour.

## Request body

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `month` | string | Yes | The month and year in `mmyy` format, for example `1026` for October 2026. Only the current month or an earlier month (Israel time). Send it as a string, so a leading zero is kept (`0926`). Pattern: `^[0-9]{4}$`. Example: `1026`. |
| `server` | string | No | The server name, if relevant: return only the accounts on this server. Letters, digits, spaces and hyphens. Empty or left out — all servers. Max length: 30. Example: `online`. |
| `account_id` | integer | No | In case you want to get the data of a specific account ID (exact match). Digits only, up to 20 digits. Empty or left out — all accounts. Example: `1`. |

### Example: One month

All your accounts, on all servers, for September 2026.

```json
{
  "month": "0926"
}
```

### Example: One account

One account on the `online` server, for November 2026.

```json
{
  "month": "1126",
  "server": "online",
  "account_id": 123
}
```

## Responses

### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | (one of: OK) The request was successful (also when `list` is empty). Always `OK`. |
| `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. |
| `month` | string | (one of: OK) The month you asked for, the same as the request (`mmyy`). Example: `0926`. |
| `month_label` | string | (one of: OK) The month you asked for, in `mm/yyyy` format. Example: `09/2026`. |
| `is_current_month` | boolean | (one of: OK) `true` — the current month, still updated every night. `false` — an earlier month; its numbers are final. Example: `false`. |
| `server` | string \| null | (one of: OK) The server filter you provided, or `null` for all servers. Example: `null`. |
| `account_id` | integer \| null | (one of: OK) The account filter you provided, or `null` for all accounts. Example: `null`. |
| `totalAccounts` | integer | (one of: OK) The number of items in `list`. Example: `1`. |
| `list` | array of object | (one of: OK) One item per account per server, sorted by `server` and then by `account_id`. Empty when there is no data. |
| `list[].month` | string | (one of: OK) The month of the record (`mmyy`). Example: `0926`. |
| `list[].month_label` | string | (one of: OK) The month of the record (`mm/yyyy`). Example: `09/2026`. |
| `list[].year` | integer | (one of: OK) The year of the record (`yyyy`). Example: `2026`. |
| `list[].account_id` | integer | (one of: OK) The online account ID. Example: `123`. |
| `list[].account_name` | string | (one of: OK) The account name, as saved in the partners system. Example: `Client Name`. |
| `list[].online_name` | string | (one of: OK) The account name as it appears on the online server. Example: `Client Name Ltd`. |
| `list[].server` | string | (one of: OK) The server the account is on. Example: `online`. |
| `list[].server_name` | string | (one of: OK) The display name of the server. Example: `online`. |
| `list[].total_agents` | integer | (one of: OK) The number of agents in the account. Example: `5`. |
| `list[].data_amount` | string | (one of: OK) The data used, as text, for example `74.3GB`. Example: `74.3GB`. |
| `list[].data_amount_gb` | number | (one of: OK) The same value as `data_amount`, as a number in GB. Example: `74.3`. |
| `list[].total_inboxes` | integer | (one of: OK) The total number of inboxes this account has. Example: `6`. |
| `list[].inboxes` | object | (one of: OK) The number of inboxes of each type. |
| `list[].inboxes.whatsapp` | integer | (one of: OK) WhatsApp inboxes. Example: `2`. |
| `list[].inboxes.sms` | integer | (one of: OK) SMS inboxes. Example: `1`. |
| `list[].inboxes.facebook` | integer | (one of: OK) Facebook and Instagram inboxes. Example: `1`. |
| `list[].inboxes.api` | integer | (one of: OK) API inboxes. Example: `1`. |
| `list[].inboxes.website` | integer | (one of: OK) Website (live chat) inboxes. Example: `1`. |
| `list[].inboxes.email` | integer | (one of: OK) Email inboxes. Example: `0`. |
| `list[].inboxes.line` | integer | (one of: OK) Line inboxes. Example: `0`. |
| `list[].inboxes.tiktok` | integer | (one of: OK) TikTok inboxes. Example: `0`. |
| `list[].sms_packages` | object | (one of: OK) The number of SMS inboxes per SMS package. The keys are package numbers as strings: `"1"`, `"2"` and `"3"` are always present (0 if unused), and any other package in use is added as an extra key. |
| `list[].chat_gpt` | boolean | (one of: OK) Whether ChatGPT is enabled in the account. Example: `true`. |
| `list[].builder` | boolean | (one of: OK) Whether a Builder is connected to the account. Example: `false`. |
| `list[].mobile_app` | boolean | (one of: OK) Whether the mobile app is enabled for the account. Example: `true`. |
| `list[].docal_enabled` | boolean | (one of: OK) Whether Docal is enabled for the account. Example: `false`. |
| `list[].collected_at` | integer | (one of: OK) When the data was collected (Unix time). Example: `1790805612`. |
| `list[].collected_at_israel` | string | (one of: OK) The same time as `collected_at`, in Israel time (`dd-mm-yyyy HH:MM:SS`). Example: `01-10-2026 01:00:12`. |
| `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. |
| `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Wrong credentials: the `Authorization` header is missing or not `Bearer <token>`, or this endpoint doesn't accept the token's type (account-scoped and onboarding tokens are rejected); `3` — The access token is wrong or expired. Create a new one with [Access Token](https://docs.99digital.co.il/partners-api/settings/access-token); `4` — Server error, try again; `33` — Invalid `account_id`: not digits only (up to 20 digits); `34` — Invalid `server` format: longer than 30 characters, or has characters other than letters, digits, spaces and hyphens; `48` — `month` is missing or not in `mmyy` format (the month must be 01–12); `49` — `month` can't be a future time — only the current month or an earlier month is accepted (Israel time). |

#### Example: OK

The usage of all your accounts for September 2026 — a closed month.

```json
{
  "status": "OK",
  "reason": 1,
  "month": "0926",
  "month_label": "09/2026",
  "is_current_month": false,
  "server": null,
  "account_id": null,
  "totalAccounts": 1,
  "list": [
    {
      "month": "0926",
      "month_label": "09/2026",
      "year": 2026,
      "account_id": 123,
      "account_name": "Client Name",
      "online_name": "Client Name Ltd",
      "server": "online",
      "server_name": "online",
      "total_agents": 5,
      "data_amount": "74.3GB",
      "data_amount_gb": 74.3,
      "total_inboxes": 6,
      "inboxes": {
        "whatsapp": 2,
        "sms": 1,
        "facebook": 1,
        "api": 1,
        "website": 1,
        "email": 0,
        "line": 0,
        "tiktok": 0
      },
      "sms_packages": {
        "1": 1,
        "2": 0,
        "3": 0
      },
      "chat_gpt": true,
      "builder": false,
      "mobile_app": true,
      "docal_enabled": false,
      "collected_at": 1790805612,
      "collected_at_israel": "01-10-2026 01:00:12"
    }
  ]
}
```

#### Example: Current month

One account, in the current month: updated to yesterday, and replaced again in the next nightly collection.

```json
{
  "status": "OK",
  "reason": 1,
  "month": "1126",
  "month_label": "11/2026",
  "is_current_month": true,
  "server": "online",
  "account_id": 123,
  "totalAccounts": 1,
  "list": [
    {
      "month": "1126",
      "month_label": "11/2026",
      "year": 2026,
      "account_id": 123,
      "account_name": "Client Name",
      "online_name": "Client Name Ltd",
      "server": "online",
      "server_name": "online",
      "total_agents": 6,
      "data_amount": "81.9GB",
      "data_amount_gb": 81.9,
      "total_inboxes": 6,
      "inboxes": {
        "whatsapp": 2,
        "sms": 1,
        "facebook": 1,
        "api": 1,
        "website": 1,
        "email": 0,
        "line": 0,
        "tiktok": 0
      },
      "sms_packages": {
        "1": 1,
        "2": 0,
        "3": 0
      },
      "chat_gpt": true,
      "builder": false,
      "mobile_app": true,
      "docal_enabled": false,
      "collected_at": 1795647609,
      "collected_at_israel": "26-11-2026 01:00:09"
    }
  ]
}
```

#### Example: No data

No records for the filter — for example an `account_id` that isn't yours, or the current month on its 1st day.

```json
{
  "status": "OK",
  "reason": 1,
  "month": "1126",
  "month_label": "11/2026",
  "is_current_month": true,
  "server": null,
  "account_id": 9999,
  "totalAccounts": 0,
  "list": []
}
```

#### Example: Reason 48

`month` is missing or not in `mmyy` format.

```json
{
  "status": "FAIL",
  "reason": 48
}
```

#### Example: Reason 49

`month` is in the future.

```json
{
  "status": "FAIL",
  "reason": 49
}
```

### 403 — Permission denied (HTTP 403). The access token is valid, but the partners dashboard user it was created for doesn't have the permission this endpoint needs. An admin of your partner account can enable it in the user's permissions.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | FAIL — the request was not carried out. Always `FAIL`. |
| `reason` | integer | Always 403. Always `403`. |
| `error` | string | "Permission denied" — the user of this access token lacks the permission this endpoint needs. Always `Permission denied`. |

#### Example

```json
{
  "status": "FAIL",
  "reason": 403,
  "error": "Permission denied"
}
```

### 429 — Too many requests (HTTP 429): your partner account made more than 10 requests in this clock minute. Wait for the next minute and try again.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | FAIL — the request was not carried out, because of the rate limit. Always `FAIL`. |
| `reason` | integer | Always 429 — too many requests. Always `429`. |
| `error` | string | Always `Too many requests`: more than 10 requests in this clock minute. Wait for the next minute and try again. Always `Too many requests`. |

#### Example

```json
{
  "status": "FAIL",
  "reason": 429,
  "error": "Too many requests"
}
```
