> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.smartsim.telecom.li/llms.txt.

# Retrieve Workspace daily stats

GET https://smartsim.telecom.li/api/v2/workspace/stats/daily

Retrieve the daily stats for your Workspaces.

Historical data is available for the last **13 months**.
Each request returns at most 6 months of data, so request longer periods in separate calls.
Requests for earlier dates don't return an error: each of those days is listed with zero usage, the same as a day without traffic.
To request older data, open a ticket with Telecom Liechtenstein support and include the API URL you call, the start and end dates you need, the output format you want, and your organization ID.

Reference: https://docs.smartsim.telecom.li/developers/api/workspaces/get-workspace-daily-stats

## Authentication

- `Authorization` header (bearer token, required) — An `auth_token` should be provided to authenticate a session. To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

## Request

### Query parameters

- `start_date` (string, optional) — Filters by start date, provided in a `YYYY-MM-DD` format. If you don't define an end date, the response will include 6 months of data, beginning on the current date.
- `end_date` (string, optional) — Filters by end date, provided in an `YYYY-MM-DD` format. If you don't define a start date, the range starts on the first day of the current month, so an end date in an earlier month returns no data.
- `workspace_ids` (string, optional) — Comma separated list of workspace IDs to filter the results for. If not provided, the response will include all Workspaces you have access to.

## Response

### 200

Successfully retrieved the daily Workspace stats

- `list of ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItems`

## Errors

### 403 Forbidden Error

Your role doesn't include the permission this endpoint requires. Most endpoints return `error_code`, `error_token`, and `message`. Some return only `status_code` and `message`.

- `error_code` (integer, optional)
- `error_token` (string, optional)
- `status_code` (integer, optional)
- `message` (string, optional)

### 422 Unprocessable Entity Error

Requested Workspaces not found or not accessible

- `any`

## Types

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItems

- `id` (double, optional)
- `days` (list of ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItems, optional)
- `total` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotal, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItems

- `date` (string, optional)
- `sms_volume` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSmsVolume, optional)
- `data_volume` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsDataVolume, optional)
- `sat_geo_data_volume` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoDataVolume, optional)
- `sat_geo_sms_volume` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoSmsVolume, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotal

- `data_volume` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalDataVolume, required)
- `sms_volume` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSmsVolume, required)
- `sat_geo_data_volume` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoDataVolume, optional)
- `sat_geo_sms_volume` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoSmsVolume, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSmsVolume

- `total` (double, optional)
- `tx` (double, optional)
- `rx` (double, optional)
- `cost` (double, optional, nullable)
- `traffic_type` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSmsVolumeTrafficType, optional, nullable)
- `currency` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSmsVolumeCurrency, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsDataVolume

- `total` (double, optional)
- `tx` (double, optional)
- `rx` (double, optional)
- `cost` (double, optional, nullable)
- `traffic_type` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsDataVolumeTrafficType, optional, nullable)
- `currency` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsDataVolumeCurrency, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoDataVolume

- `total` (double, optional)
- `tx` (double, optional)
- `rx` (double, optional)
- `cost` (double, optional, nullable)
- `traffic_type` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoDataVolumeTrafficType, optional, nullable)
- `currency` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoDataVolumeCurrency, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoSmsVolume

- `total` (double, optional)
- `tx` (double, optional)
- `rx` (double, optional)
- `cost` (double, optional, nullable)
- `traffic_type` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoSmsVolumeTrafficType, optional, nullable)
- `currency` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoSmsVolumeCurrency, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalDataVolume

- `total` (double, optional)
- `tx` (double, optional)
- `rx` (double, optional)
- `cost` (double, optional, nullable)
- `traffic_type` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalDataVolumeTrafficType, optional, nullable)
- `currency` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalDataVolumeCurrency, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSmsVolume

- `total` (double, optional)
- `tx` (double, optional)
- `rx` (double, optional)
- `cost` (double, optional, nullable)
- `traffic_type` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSmsVolumeTrafficType, optional, nullable)
- `currency` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSmsVolumeCurrency, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoDataVolume

- `total` (double, optional)
- `tx` (double, optional)
- `rx` (double, optional)
- `cost` (double, optional, nullable)
- `traffic_type` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoDataVolumeTrafficType, optional, nullable)
- `currency` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoDataVolumeCurrency, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoSmsVolume

- `total` (double, optional)
- `tx` (double, optional)
- `rx` (double, optional)
- `cost` (double, optional, nullable)
- `traffic_type` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoSmsVolumeTrafficType, optional, nullable)
- `currency` (ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoSmsVolumeCurrency, optional, nullable)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSmsVolumeTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSmsVolumeCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsDataVolumeTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsDataVolumeCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoDataVolumeTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoDataVolumeCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoSmsVolumeTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsDaysItemsSatGeoSmsVolumeCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalDataVolumeTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalDataVolumeCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSmsVolumeTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSmsVolumeCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoDataVolumeTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoDataVolumeCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoSmsVolumeTrafficType

- `description` (string, optional)
- `unit` (string, optional)
- `id` (double, optional)

### ApiV2WorkspaceStatsDailyGetResponsesContentApplicationJsonSchemaItemsTotalSatGeoSmsVolumeCurrency

- `code` (string, optional)
- `symbol` (string, optional)
- `id` (double, optional)

## Examples

### Default - All Workspaces

**Response**

```json
[
  {
    "id": 123,
    "days": [
      {
        "date": "2026-10-07T00:00:00.000Z",
        "sms_volume": {
          "total": 0,
          "tx": 0,
          "rx": 0,
          "cost": 0,
          "traffic_type": {
            "description": "Sms",
            "unit": "SMS",
            "id": 6
          },
          "currency": null
        },
        "data_volume": {
          "total": 0,
          "tx": 0,
          "rx": 0,
          "cost": 0,
          "traffic_type": {
            "description": "Data",
            "unit": "MB",
            "id": 5
          },
          "currency": null
        }
      }
    ],
    "total": {
      "data_volume": {
        "total": 0,
        "tx": 0,
        "rx": 0,
        "cost": 0
      },
      "sms_volume": {
        "total": 0,
        "tx": 0,
        "rx": 0,
        "cost": 0
      }
    }
  }
]
```

**SDK Code**

```python Default - All Workspaces
import requests

url = "https://smartsim.telecom.li/api/v2/workspace/stats/daily"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Default - All Workspaces
const url = 'https://smartsim.telecom.li/api/v2/workspace/stats/daily';
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);
}
```

```go Default - All Workspaces
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://smartsim.telecom.li/api/v2/workspace/stats/daily"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Default - All Workspaces
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/workspace/stats/daily")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Default - All Workspaces
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/workspace/stats/daily")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Default - All Workspaces
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/workspace/stats/daily', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Default - All Workspaces
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/workspace/stats/daily");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Default - All Workspaces
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/workspace/stats/daily")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by Start Date

**Response**

```json
[
  {
    "id": 123,
    "days": [
      {
        "date": "2026-10-07T00:00:00.000Z",
        "sms_volume": {
          "total": 10,
          "tx": 5,
          "rx": 5,
          "cost": 0.5
        },
        "data_volume": {
          "total": 100,
          "tx": 40,
          "rx": 60,
          "cost": 5
        }
      }
    ],
    "total": {
      "data_volume": {
        "total": 100,
        "tx": 40,
        "rx": 60,
        "cost": 5
      },
      "sms_volume": {
        "total": 10,
        "tx": 5,
        "rx": 5,
        "cost": 0.5
      }
    }
  }
]
```

**SDK Code**

```python Filter by Start Date
import requests

url = "https://smartsim.telecom.li/api/v2/workspace/stats/daily"

querystring = {"start_date":"2026-10-01T00:00:00.000Z"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by Start Date
const url = 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?start_date=2026-10-01T00%3A00%3A00.000Z';
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);
}
```

```go Filter by Start Date
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://smartsim.telecom.li/api/v2/workspace/stats/daily?start_date=2026-10-01T00%3A00%3A00.000Z"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by Start Date
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/workspace/stats/daily?start_date=2026-10-01T00%3A00%3A00.000Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Filter by Start Date
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/workspace/stats/daily?start_date=2026-10-01T00%3A00%3A00.000Z")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by Start Date
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?start_date=2026-10-01T00%3A00%3A00.000Z', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by Start Date
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/workspace/stats/daily?start_date=2026-10-01T00%3A00%3A00.000Z");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by Start Date
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/workspace/stats/daily?start_date=2026-10-01T00%3A00%3A00.000Z")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by End Date

**Response**

```json
[
  {
    "id": 123,
    "days": [
      {
        "date": "2026-11-02T00:00:00.000Z",
        "sms_volume": {
          "total": 5,
          "tx": 3,
          "rx": 2,
          "cost": 0.25
        },
        "data_volume": {
          "total": 50,
          "tx": 20,
          "rx": 30,
          "cost": 2.5
        }
      }
    ],
    "total": {
      "data_volume": {
        "total": 50,
        "tx": 20,
        "rx": 30,
        "cost": 2.5
      },
      "sms_volume": {
        "total": 5,
        "tx": 3,
        "rx": 2,
        "cost": 0.25
      }
    }
  }
]
```

**SDK Code**

```python Filter by End Date
import requests

url = "https://smartsim.telecom.li/api/v2/workspace/stats/daily"

querystring = {"end_date":"2026-11-02T00:00:00.000Z"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by End Date
const url = 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-11-02T00%3A00%3A00.000Z';
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);
}
```

```go Filter by End Date
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-11-02T00%3A00%3A00.000Z"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by End Date
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-11-02T00%3A00%3A00.000Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Filter by End Date
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-11-02T00%3A00%3A00.000Z")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by End Date
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-11-02T00%3A00%3A00.000Z', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by End Date
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-11-02T00%3A00%3A00.000Z");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by End Date
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-11-02T00%3A00%3A00.000Z")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by Date Range

**Response**

```json
[
  {
    "id": 123,
    "days": [
      {
        "date": "2026-10-07T00:00:00.000Z",
        "sms_volume": {
          "total": 8,
          "tx": 4,
          "rx": 4,
          "cost": 0.4
        },
        "data_volume": {
          "total": 80,
          "tx": 30,
          "rx": 50,
          "cost": 4
        }
      },
      {
        "date": "2026-10-01T00:00:00.000Z",
        "sms_volume": {
          "total": 6,
          "tx": 3,
          "rx": 3,
          "cost": 0.3
        },
        "data_volume": {
          "total": 60,
          "tx": 25,
          "rx": 35,
          "cost": 3
        }
      }
    ],
    "total": {
      "data_volume": {
        "total": 140,
        "tx": 55,
        "rx": 85,
        "cost": 7
      },
      "sms_volume": {
        "total": 14,
        "tx": 7,
        "rx": 7,
        "cost": 0.7
      }
    }
  }
]
```

**SDK Code**

```python Filter by Date Range
import requests

url = "https://smartsim.telecom.li/api/v2/workspace/stats/daily"

querystring = {"end_date":"2026-10-07T00:00:00.000Z","start_date":"2026-10-01T00:00:00.000Z"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by Date Range
const url = 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z';
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);
}
```

```go Filter by Date Range
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by Date Range
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Filter by Date Range
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by Date Range
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by Date Range
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by Date Range
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Filter by Workspace IDs

**Response**

```json
[
  {
    "id": 123,
    "days": [
      {
        "date": "2026-10-07T00:00:00.000Z",
        "sms_volume": {
          "total": 12,
          "tx": 6,
          "rx": 6,
          "cost": 0.6
        },
        "data_volume": {
          "total": 120,
          "tx": 50,
          "rx": 70,
          "cost": 6
        }
      }
    ],
    "total": {
      "data_volume": {
        "total": 120,
        "tx": 50,
        "rx": 70,
        "cost": 6
      },
      "sms_volume": {
        "total": 12,
        "tx": 6,
        "rx": 6,
        "cost": 0.6
      }
    }
  },
  {
    "id": 1234,
    "days": [
      {
        "date": "2026-10-07T00:00:00.000Z",
        "sms_volume": {
          "total": 8,
          "tx": 4,
          "rx": 4,
          "cost": 0.4
        },
        "data_volume": {
          "total": 80,
          "tx": 35,
          "rx": 45,
          "cost": 4
        }
      }
    ],
    "total": {
      "data_volume": {
        "total": 80,
        "tx": 35,
        "rx": 45,
        "cost": 4
      },
      "sms_volume": {
        "total": 8,
        "tx": 4,
        "rx": 4,
        "cost": 0.4
      }
    }
  }
]
```

**SDK Code**

```python Filter by Workspace IDs
import requests

url = "https://smartsim.telecom.li/api/v2/workspace/stats/daily"

querystring = {"workspace_ids":"123,1234"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Filter by Workspace IDs
const url = 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?workspace_ids=123%2C1234';
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);
}
```

```go Filter by Workspace IDs
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://smartsim.telecom.li/api/v2/workspace/stats/daily?workspace_ids=123%2C1234"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Filter by Workspace IDs
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/workspace/stats/daily?workspace_ids=123%2C1234")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Filter by Workspace IDs
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/workspace/stats/daily?workspace_ids=123%2C1234")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Filter by Workspace IDs
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?workspace_ids=123%2C1234', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Filter by Workspace IDs
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/workspace/stats/daily?workspace_ids=123%2C1234");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Filter by Workspace IDs
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/workspace/stats/daily?workspace_ids=123%2C1234")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Complete Example - Date Range and Workspace IDs

**Response**

```json
[
  {
    "id": 123,
    "days": [
      {
        "date": "2026-10-07T00:00:00.000Z",
        "sms_volume": {
          "total": 15,
          "tx": 7,
          "rx": 8,
          "cost": 0.75
        },
        "data_volume": {
          "total": 150,
          "tx": 60,
          "rx": 90,
          "cost": 7.5
        }
      }
    ],
    "total": {
      "data_volume": {
        "total": 150,
        "tx": 60,
        "rx": 90,
        "cost": 7.5
      },
      "sms_volume": {
        "total": 15,
        "tx": 7,
        "rx": 8,
        "cost": 0.75
      }
    }
  }
]
```

**SDK Code**

```python Complete Example - Date Range and Workspace IDs
import requests

url = "https://smartsim.telecom.li/api/v2/workspace/stats/daily"

querystring = {"end_date":"2026-10-07T00:00:00.000Z","start_date":"2026-10-01T00:00:00.000Z","workspace_ids":"123"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Complete Example - Date Range and Workspace IDs
const url = 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z&workspace_ids=123';
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);
}
```

```go Complete Example - Date Range and Workspace IDs
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z&workspace_ids=123"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Complete Example - Date Range and Workspace IDs
require 'uri'
require 'net/http'

url = URI("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z&workspace_ids=123")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Complete Example - Date Range and Workspace IDs
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z&workspace_ids=123")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Complete Example - Date Range and Workspace IDs
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z&workspace_ids=123', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Complete Example - Date Range and Workspace IDs
using RestSharp;

var client = new RestClient("https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z&workspace_ids=123");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Complete Example - Date Range and Workspace IDs
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://smartsim.telecom.li/api/v2/workspace/stats/daily?end_date=2026-10-07T00%3A00%3A00.000Z&start_date=2026-10-01T00%3A00%3A00.000Z&workspace_ids=123")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```