List plan versions
curl --request GET \
--url https://commet.co/api/v1/plans/{id}/versions \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://commet.co/api/v1/plans/{id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://commet.co/api/v1/plans/{id}/versions"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commet.co/api/v1/plans/{id}/versions"
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://commet.co/api/v1/plans/{id}/versions")
.header("x-api-key", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commet.co/api/v1/plans/{id}/versions",
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;
}{
"object": "list",
"data": [
{
"id": "plr_9i0j1k2l",
"label": "4",
"number": 4,
"experiment": null,
"isCurrent": true,
"parentVersionId": "plr_5e6f7g8h",
"subscriptionCount": 0,
"maxPlanCredits": null,
"maxPlanBalance": null,
"prices": [
{
"id": "pp_1a2b3c4d",
"billingInterval": "monthly",
"price": 5500,
"includedCredits": null,
"includedBalance": 5000,
"regionalPrices": [
{
"currency": "mxn",
"price": 99900,
"includedBalance": null
}
]
}
],
"createdAt": "2026-09-07T12:00:00.000Z",
"object": "plan_version"
},
{
"id": "plr_1a2b3c4d",
"label": "price-test 2",
"number": null,
"experiment": {
"code": "pro:price-test",
"version": 2
},
"isCurrent": false,
"parentVersionId": "plr_5e6f7g8h",
"subscriptionCount": 4,
"maxPlanCredits": null,
"maxPlanBalance": null,
"prices": [
{
"id": "pp_1a2b3c4d",
"billingInterval": "monthly",
"price": 5500,
"includedCredits": null,
"includedBalance": 5000,
"regionalPrices": [
{
"currency": "mxn",
"price": 99900,
"includedBalance": null
}
]
}
],
"createdAt": "2026-09-07T12:00:00.000Z",
"object": "plan_version"
}
],
"hasMore": false
}{
"error": {
"type": "validation_error",
"code": "validation_error",
"message": "The request contains an invalid parameter.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/validation_error.md"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "A valid API key is required.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/unauthorized.md"
}
}{
"error": {
"type": "authentication_error",
"code": "forbidden",
"message": "You do not have permission to perform this operation.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/forbidden.md"
}
}{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/not_found.md"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the interval specified in the Retry-After header.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/rate_limited.md"
}
}{
"error": {
"type": "internal_error",
"code": "internal_error",
"message": "An unexpected error occurred while processing the request.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/internal_error.md"
}
}Plans
List plan versions
List a plan’s published versions, newest first, with their prices and how many subscriptions are on each. Versions published before Commet recorded every term are not listed.
GET
/
plans
/
{id}
/
versions
List plan versions
curl --request GET \
--url https://commet.co/api/v1/plans/{id}/versions \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://commet.co/api/v1/plans/{id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://commet.co/api/v1/plans/{id}/versions"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commet.co/api/v1/plans/{id}/versions"
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://commet.co/api/v1/plans/{id}/versions")
.header("x-api-key", "<api-key>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commet.co/api/v1/plans/{id}/versions",
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;
}{
"object": "list",
"data": [
{
"id": "plr_9i0j1k2l",
"label": "4",
"number": 4,
"experiment": null,
"isCurrent": true,
"parentVersionId": "plr_5e6f7g8h",
"subscriptionCount": 0,
"maxPlanCredits": null,
"maxPlanBalance": null,
"prices": [
{
"id": "pp_1a2b3c4d",
"billingInterval": "monthly",
"price": 5500,
"includedCredits": null,
"includedBalance": 5000,
"regionalPrices": [
{
"currency": "mxn",
"price": 99900,
"includedBalance": null
}
]
}
],
"createdAt": "2026-09-07T12:00:00.000Z",
"object": "plan_version"
},
{
"id": "plr_1a2b3c4d",
"label": "price-test 2",
"number": null,
"experiment": {
"code": "pro:price-test",
"version": 2
},
"isCurrent": false,
"parentVersionId": "plr_5e6f7g8h",
"subscriptionCount": 4,
"maxPlanCredits": null,
"maxPlanBalance": null,
"prices": [
{
"id": "pp_1a2b3c4d",
"billingInterval": "monthly",
"price": 5500,
"includedCredits": null,
"includedBalance": 5000,
"regionalPrices": [
{
"currency": "mxn",
"price": 99900,
"includedBalance": null
}
]
}
],
"createdAt": "2026-09-07T12:00:00.000Z",
"object": "plan_version"
}
],
"hasMore": false
}{
"error": {
"type": "validation_error",
"code": "validation_error",
"message": "The request contains an invalid parameter.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/validation_error.md"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "A valid API key is required.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/unauthorized.md"
}
}{
"error": {
"type": "authentication_error",
"code": "forbidden",
"message": "You do not have permission to perform this operation.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/forbidden.md"
}
}{
"error": {
"type": "not_found_error",
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/not_found.md"
}
}{
"error": {
"type": "rate_limit_error",
"code": "rate_limited",
"message": "Too many requests. Retry after the interval specified in the Retry-After header.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/rate_limited.md"
}
}{
"error": {
"type": "internal_error",
"code": "internal_error",
"message": "An unexpected error occurred while processing the request.",
"doc_url": "https://commet.co/docs/api-reference/2026-08-27/errors/internal_error.md"
}
}List a plan’s published versions, newest first, with their prices and how many subscriptions are on each. Versions published before Commet recorded every term are not listed.
Autorizaciones
Encabezados
API version used by this reference. Send this header to select this contract explicitly.
Parámetros de ruta
Parámetros de consulta
Minimum string length:
1Rango requerido:
1 <= x <= 100¿Esta página le ayudó?