Retrieve a subscription alert
curl --request GET \
--url https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code} \
--header 'Authorization: Bearer <token>'import requests
url = "https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}")
.header("Authorization", "Bearer <token>")
.asString();{
"alert": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_subscription_id": "sub_1234567890",
"feature": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"code": "seats",
"name": "Number of seats",
"feature_type": "metered",
"created_at": "2025-07-17T12:34:35Z",
"description": "Number of users of the account",
"privileges": [
{
"code": "max",
"name": "Maximum",
"value_type": "integer",
"config": {}
},
{
"code": "max_admins",
"name": "Max Admins",
"value_type": "integer",
"config": {}
},
{
"code": "root",
"name": "Allow root user",
"value_type": "boolean",
"config": {}
},
{
"code": "provider",
"name": "SSO Provider",
"value_type": "select",
"config": {
"select_options": [
"google",
"okta"
]
}
}
],
"aggregation_type": "sum_agg",
"consumable": true,
"recurring": false,
"field_name": "tokens",
"expression": "round((ended_at - started_at) * units)",
"custom_aggregator": "<string>",
"weighted_interval": "seconds",
"rounding_function": "ceil",
"rounding_precision": 2,
"filters": [
{
"key": "region",
"values": [
"us-east-1"
]
}
]
},
"alert_type": "feature_current_usage_amount",
"code": "storage_threshold_alert",
"name": "Storage Usage Alert",
"previous_value": 1000,
"last_processed_at": "2025-05-19T10:04:21Z",
"thresholds": [
{
"code": "warn",
"recurring": false,
"value": "99.0"
}
],
"created_at": "2025-03-20T10:00:00Z",
"lago_wallet_id": null,
"wallet_code": null,
"direction": "increasing"
}
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}Subscriptions
Retrieve a subscription alert
This endpoint enables the retrieval of a specific alert for a subscription.
GET
/
subscriptions
/
{external_id}
/
alerts
/
{code}
Retrieve a subscription alert
curl --request GET \
--url https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code} \
--header 'Authorization: Bearer <token>'import requests
url = "https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://core.nozle.app/api/v1/subscriptions/{external_id}/alerts/{code}")
.header("Authorization", "Bearer <token>")
.asString();{
"alert": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"lago_organization_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_subscription_id": "sub_1234567890",
"feature": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"code": "seats",
"name": "Number of seats",
"feature_type": "metered",
"created_at": "2025-07-17T12:34:35Z",
"description": "Number of users of the account",
"privileges": [
{
"code": "max",
"name": "Maximum",
"value_type": "integer",
"config": {}
},
{
"code": "max_admins",
"name": "Max Admins",
"value_type": "integer",
"config": {}
},
{
"code": "root",
"name": "Allow root user",
"value_type": "boolean",
"config": {}
},
{
"code": "provider",
"name": "SSO Provider",
"value_type": "select",
"config": {
"select_options": [
"google",
"okta"
]
}
}
],
"aggregation_type": "sum_agg",
"consumable": true,
"recurring": false,
"field_name": "tokens",
"expression": "round((ended_at - started_at) * units)",
"custom_aggregator": "<string>",
"weighted_interval": "seconds",
"rounding_function": "ceil",
"rounding_precision": 2,
"filters": [
{
"key": "region",
"values": [
"us-east-1"
]
}
]
},
"alert_type": "feature_current_usage_amount",
"code": "storage_threshold_alert",
"name": "Storage Usage Alert",
"previous_value": 1000,
"last_processed_at": "2025-05-19T10:04:21Z",
"thresholds": [
{
"code": "warn",
"recurring": false,
"value": "99.0"
}
],
"created_at": "2025-03-20T10:00:00Z",
"lago_wallet_id": null,
"wallet_code": null,
"direction": "increasing"
}
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
External ID of the existing subscription
Example:
"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
Unique code of the alert
Example:
"storage_threshold_alert"
Query Parameters
Filter by subscription status. When provided, the subscription is looked up with this status instead of the default active status. Possible values are pending, active, terminated, or canceled.
Available options:
pending, active, terminated, canceled Example:
"active"
Response
Subscription alert
Show child attributes
Show child attributes