Skip to main content
GET
/
organization
/
billing_analytics
Organization billing analytics
curl --request GET \
  --url https://api.beyondwords.io/v1/organization/billing_analytics \
  --header 'X-Api-Key: <api-key>'
import requests

url = "https://api.beyondwords.io/v1/organization/billing_analytics"

headers = {"X-Api-Key": "<api-key>"}

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

print(response.text)
const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};

fetch('https://api.beyondwords.io/v1/organization/billing_analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beyondwords.io/v1/organization/billing_analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api.beyondwords.io/v1/organization/billing_analytics"

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

req.Header.Add("X-Api-Key", "<api-key>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.beyondwords.io/v1/organization/billing_analytics")
.header("X-Api-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.beyondwords.io/v1/organization/billing_analytics")

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

request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "projects": [
    {
      "id": 1,
      "name": "Project A"
    },
    {
      "id": 2,
      "name": "Project B"
    }
  ],
  "analytics": [
    {
      "project_id": 1,
      "counter": 5,
      "start": "2099-12-31 23:59:59 UTC"
    },
    {
      "project_id": 2,
      "counter": 3,
      "start": "2099-12-31 23:59:59 UTC"
    }
  ]
}

Authorizations

X-Api-Key
string
header
required

Query Parameters

aggregation
enum<string>
The way to aggregate the analytics. Possible values are all (aggregate all data together),
year (aggregate data on a yearly basis), month (aggregate data on a yearly basis),
week (aggregate data on a yearly basis), day (aggregate data on a yearly basis), or hour
(aggregate data on an hourly basis, limited to a time_range 7 days or less).
Available options:
all,
hour,
day,
week,
month,
year
time_range[start]
string

The start date of the aggregation period. The value of this property should be a string in the format yyyy-mm-dd according to ISO 8601.

time_range[end]
string

The end date of the aggregation period. The value of this property should be a string in the format yyyy-mm-dd according to ISO 8601. If this is set to today, the current day is still in progress and therefore only partial analytics data is returned until the day ends.

event_type
enum<string>
Available options:
content,
characters,
articles_credits,
credits,
total_characters
entity_type
enum<string>
Available options:
podcast,
video
group_by[]
enum<string>[]
Available options:
by_project,
by_voice,
by_content
filter[project_ids][]
integer[]
filter[voice_ids][]
integer[]
filter[content_ids][]
string[]
filter[source_ids][]
string[]

Response

200 - application/json

OK

projects
object[]
voices
object[]
content
object[]
analytics
object[]