List subscriptions
curl --request GET \
--url https://api.wsapi.chat/account/subscriptions \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.wsapi.chat/account/subscriptions"
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.wsapi.chat/account/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/account/subscriptions");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"items": [
{
"id": "<string>",
"created": "2023-11-07T05:31:56Z",
"curPeriodStart": "2023-11-07T05:31:56Z",
"curPeriodEnd": "2023-11-07T05:31:56Z",
"quantity": 123,
"plan": "<string>",
"price": "<string>",
"status": "<string>",
"cancelAtPeriodEnd": true,
"instanceIds": [
"<string>"
]
}
],
"totalCount": 123,
"pageNumber": 123,
"pageSize": 123
}{
"status": 401,
"detail": "unauthorized"
}Account
List subscriptions
Returns a paginated list of customer subscriptions.
GET
/
account
/
subscriptions
List subscriptions
curl --request GET \
--url https://api.wsapi.chat/account/subscriptions \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.wsapi.chat/account/subscriptions"
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.wsapi.chat/account/subscriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.wsapi.chat/account/subscriptions");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Api-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"items": [
{
"id": "<string>",
"created": "2023-11-07T05:31:56Z",
"curPeriodStart": "2023-11-07T05:31:56Z",
"curPeriodEnd": "2023-11-07T05:31:56Z",
"quantity": 123,
"plan": "<string>",
"price": "<string>",
"status": "<string>",
"cancelAtPeriodEnd": true,
"instanceIds": [
"<string>"
]
}
],
"totalCount": 123,
"pageNumber": 123,
"pageSize": 123
}{
"status": 401,
"detail": "unauthorized"
}Authorizations
Customer API key. Only the customer-level key is accepted for /account/* endpoints. No X-Instance-Id header is required.
⌘I