Read the tenant's subscription
curl --request GET \
--url https://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription \
--header 'x-api-key: <api-key>'import requests
url = "https://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription"
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://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription', 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://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription",
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://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription"
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://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription")
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{
"success": true,
"data": {
"subscription": {
"billing_status": "TRIAL",
"billing_exempt": true,
"package": {
"code": "<string>",
"display_name": "<string>"
},
"seats": {
"total": 123,
"included": 123
},
"current_period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"cancel_at_period_end": true,
"pending_change": {
"package_code": "<string>",
"effective_at": "2023-11-07T05:31:56Z"
},
"modules": [
"<string>"
],
"payment": {
"has_customer": true,
"has_subscription": true
},
"billing_cycle": "monthly",
"trial": {
"ends_at": "2023-11-07T05:31:56Z",
"modules": [
"<string>"
]
},
"entitlements": [
{
"module_key": "<string>",
"active": true,
"source": "subscription_item",
"activated_at": "2023-11-07T05:31:56Z"
}
],
"dormant": {
"since": "2023-11-07T05:31:56Z",
"data_kept_until": "2023-11-07T05:31:56Z",
"days_left": 123
}
}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"rate_limit": {
"limit": 123,
"remaining": 123,
"reset": 123
}
}
}{
"success": false,
"error": {
"code": "AUTH_INVALID_KEY",
"message": "Invalid API key"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-02-15T10:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"rate_limit": {
"limit": 123,
"remaining": 123,
"reset": 123
}
}
}{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 12 seconds.",
"details": {
"limit": 60,
"remaining": 0,
"reset": 1718400000000,
"retry_after": 12
}
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-02-15T10:00:00.000Z"
}
}Billing
Read the tenant's subscription
Plan, billing status, seats, trial state, entitled modules, current period
and any scheduled downgrade — read from the local billing mirrors, never
from Stripe on the request path. Required scope: billing:view.
GET
/
v1
/
subscription
Read the tenant's subscription
curl --request GET \
--url https://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription \
--header 'x-api-key: <api-key>'import requests
url = "https://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription"
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://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription', 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://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription",
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://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription"
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://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://mwxpyoqrtdfxubdotbmj.supabase.co/functions/v1/public-api/v1/subscription")
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{
"success": true,
"data": {
"subscription": {
"billing_status": "TRIAL",
"billing_exempt": true,
"package": {
"code": "<string>",
"display_name": "<string>"
},
"seats": {
"total": 123,
"included": 123
},
"current_period": {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z"
},
"cancel_at_period_end": true,
"pending_change": {
"package_code": "<string>",
"effective_at": "2023-11-07T05:31:56Z"
},
"modules": [
"<string>"
],
"payment": {
"has_customer": true,
"has_subscription": true
},
"billing_cycle": "monthly",
"trial": {
"ends_at": "2023-11-07T05:31:56Z",
"modules": [
"<string>"
]
},
"entitlements": [
{
"module_key": "<string>",
"active": true,
"source": "subscription_item",
"activated_at": "2023-11-07T05:31:56Z"
}
],
"dormant": {
"since": "2023-11-07T05:31:56Z",
"data_kept_until": "2023-11-07T05:31:56Z",
"days_left": 123
}
}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"rate_limit": {
"limit": 123,
"remaining": 123,
"reset": 123
}
}
}{
"success": false,
"error": {
"code": "AUTH_INVALID_KEY",
"message": "Invalid API key"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-02-15T10:00:00.000Z"
}
}{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "<string>",
"details": "<unknown>"
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"rate_limit": {
"limit": 123,
"remaining": 123,
"reset": 123
}
}
}{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Retry after 12 seconds.",
"details": {
"limit": 60,
"remaining": 0,
"reset": 1718400000000,
"retry_after": 12
}
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-02-15T10:00:00.000Z"
}
}Authorizations
ApiKeyAuthBearerAuth
API key from Settings > API Keys or POST /v1/api-keys. Format
f9_live_<32 hex chars> (live) or f9_test_<32 hex chars> (sandbox — no
real sends, ever). Legacy wcrm_live_ / wcrm_test_ keys still
authenticate but are no longer issued. Shown once at creation; only a hash
is stored.