Skip to main content
GET
/
tenants
/
{tenantId}
/
usage
/
timeseries
cURL
# Daily stats for last 30 days
curl "https://api.arkhq.io/v1/tenants/cm6abc123def456/usage/timeseries?period=last_30_days&granularity=day" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Hourly stats for last 7 days
curl "https://api.arkhq.io/v1/tenants/cm6abc123def456/usage/timeseries?period=last_7_days&granularity=hour" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "tenant_id": "cm6abc123def456",
    "tenant_name": "Acme Corp",
    "granularity": "day",
    "period": {
      "start": "2024-01-01T00:00:00.000Z",
      "end": "2024-01-31T23:59:59.999Z"
    },
    "data": [
      {
        "timestamp": "2024-01-01T00:00:00.000Z",
        "sent": 320,
        "delivered": 310,
        "soft_failed": 5,
        "hard_failed": 2,
        "bounced": 2,
        "held": 1
      },
      {
        "timestamp": "2024-01-02T00:00:00.000Z",
        "sent": 345,
        "delivered": 338,
        "soft_failed": 4,
        "hard_failed": 1,
        "bounced": 1,
        "held": 1
      }
    ]
  },
  "meta": {
    "requestId": "req_abc123xyz"
  }
}

Authorizations

Authorization
string
header
required

Use your API key from arkhq.io/org/credentials

Authorization: Bearer YOUR_API_KEY

Path Parameters

tenantId
string
required

The tenant ID

Query Parameters

period
string

Time period for timeseries data. Defaults to current month.

granularity
enum<string>
default:day

Time bucket size for data points

Available options:
hour,
day,
week,
month
timezone
string
default:UTC

Timezone for period calculations (IANA format). Defaults to UTC.

Response

Tenant usage timeseries

Timeseries usage data for a tenant

success
boolean
required
data
object
required

Timeseries usage statistics

meta
object
required