Subscription Usage
The data, voice and SMS usage of a subscription.
Get subscription usage
/subscriptions/{subscriptionId}/usageRetrieve the current period's usage for a subscription.
Path parameters
subscription IdstringrequiredThe identifier of the subscription. May be the entity's internal UUID or an external reference identifier.
Reference identifiers MUST be prefixed with rid_ (e.g., rid_crm-subscription-12345) so the API
can distinguish them from internal UUIDs. The prefix is stripped before lookup.
Responses
200Current usage statistics for the subscription.
application/json
Current usage statistics for the subscription.
Current usage statistics for the subscription.
objectUsage
Current usage statistics for a subscription, organized by service type (voice, SMS, MMS, data). Within each service type, usage is broken down into per-package allowance buckets: the base plan's included allowance plus any add-on packages, each reporting used, remaining, and total amounts. A service type is omitted entirely when the subscription has no allowances of that type.
dataobjectData usage across all scopes and packages.
Mobile data usage for a subscription, split by where the data is consumed: national (used in the home country) and roaming (used while abroad).
Show child attributes
nationalarray of UsageDataNationalPackageAllowance buckets for data used in the home country, including the base plan's data allowance and any add-on packages.
Show child attributes
data Bytes Remainingintegerint64requiredData still available in this allowance, in bytes.
data Bytes Totalintegerint64requiredThe full data allowance of this package, in bytes.
data Bytes Usedintegerint64requiredData consumed from this allowance so far, in bytes.
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
namestringrequiredHuman-readable name of the package, as shown to end users.
rlah Bytes Remainingintegerint64RLAH data still available, in bytes. Once exhausted, roaming usage may incur additional charges even though national data remains.
rlah Bytes Totalintegerint64The portion of this package usable while roaming under RLAH rules, in bytes. Often lower than the full national allowance.
rlah Bytes Usedintegerint64Data consumed while roaming under RLAH (Roam Like At Home) rules, in bytes. Present only when the package includes an RLAH allowance.
statusenum<string>requiredThe status of this package.
Whether a usage package is currently consumable.
- ACTIVE: The package is in its validity window and usage draws from it
- NOT_ACTIVE: The package exists but is not currently consumable, for example a purchased package whose validity window has not started yet
- EXPIRED: The package's validity window has ended; any remaining allowance is no longer usable
values
ACTIVENOT_ACTIVEEXPIRED
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
roamingarray of UsageDataRoamingPackageAllowance buckets for data used while roaming abroad, from the base plan's roaming allowance or dedicated roaming add-on packages.
Show child attributes
data Bytes Remainingintegerint64requiredData still available in this allowance, in bytes.
data Bytes Totalintegerint64requiredThe full data allowance of this package, in bytes.
data Bytes Usedintegerint64requiredData consumed from this allowance so far, in bytes.
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
namestringrequiredHuman-readable name of the package, as shown to end users.
statusenum<string>requiredThe status of this package.
Whether a usage package is currently consumable.
- ACTIVE: The package is in its validity window and usage draws from it
- NOT_ACTIVE: The package exists but is not currently consumable, for example a purchased package whose validity window has not started yet
- EXPIRED: The package's validity window has ended; any remaining allowance is no longer usable
values
ACTIVENOT_ACTIVEEXPIRED
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included roaming allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
mmsobjectMMS usage across all scopes and packages.
MMS (multimedia message) usage for a subscription, split by where and to whom messages are sent: national (domestic messages), roaming (messages sent while abroad), and ILD (international long distance — messages sent from the home country to foreign numbers).
Show child attributes
ildarray of UsageMmsPackageAllowance buckets for multimedia messages sent from the home country to foreign numbers (international long distance).
Show child attributes
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
mms Countintegerint64requiredNumber of multimedia messages consumed from this allowance so far.
mms Remainingintegerint64requiredNumber of multimedia messages still available in this allowance.
mms Totalintegerint64requiredThe full multimedia message allowance of this package.
namestringrequiredHuman-readable name of the package, as shown to end users.
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
nationalarray of UsageMmsPackageAllowance buckets for multimedia messages sent within the home country, including the base plan's MMS allowance and any add-on packages.
Show child attributes
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
mms Countintegerint64requiredNumber of multimedia messages consumed from this allowance so far.
mms Remainingintegerint64requiredNumber of multimedia messages still available in this allowance.
mms Totalintegerint64requiredThe full multimedia message allowance of this package.
namestringrequiredHuman-readable name of the package, as shown to end users.
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
roamingarray of UsageMmsPackageAllowance buckets for multimedia messages sent while roaming abroad.
Show child attributes
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
mms Countintegerint64requiredNumber of multimedia messages consumed from this allowance so far.
mms Remainingintegerint64requiredNumber of multimedia messages still available in this allowance.
mms Totalintegerint64requiredThe full multimedia message allowance of this package.
namestringrequiredHuman-readable name of the package, as shown to end users.
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
smsobjectSMS usage across all scopes and packages.
SMS usage for a subscription, split by where and to whom messages are sent: national (domestic messages), roaming (messages sent while abroad), and ILD (international long distance — messages sent from the home country to foreign numbers).
Show child attributes
ildarray of UsageSmsPackageAllowance buckets for messages sent from the home country to foreign numbers (international long distance).
Show child attributes
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
namestringrequiredHuman-readable name of the package, as shown to end users.
sms Countintegerint64requiredNumber of messages consumed from this allowance so far.
sms Remainingintegerint64requiredNumber of messages still available in this allowance.
sms Totalintegerint64requiredThe full message allowance of this package.
statusenum<string>requiredThe status of this package.
Whether a usage package is currently consumable.
- ACTIVE: The package is in its validity window and usage draws from it
- NOT_ACTIVE: The package exists but is not currently consumable, for example a purchased package whose validity window has not started yet
- EXPIRED: The package's validity window has ended; any remaining allowance is no longer usable
values
ACTIVENOT_ACTIVEEXPIRED
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
nationalarray of UsageSmsPackageAllowance buckets for messages sent within the home country, including the base plan's SMS allowance and any add-on packages.
Show child attributes
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
namestringrequiredHuman-readable name of the package, as shown to end users.
sms Countintegerint64requiredNumber of messages consumed from this allowance so far.
sms Remainingintegerint64requiredNumber of messages still available in this allowance.
sms Totalintegerint64requiredThe full message allowance of this package.
statusenum<string>requiredThe status of this package.
Whether a usage package is currently consumable.
- ACTIVE: The package is in its validity window and usage draws from it
- NOT_ACTIVE: The package exists but is not currently consumable, for example a purchased package whose validity window has not started yet
- EXPIRED: The package's validity window has ended; any remaining allowance is no longer usable
values
ACTIVENOT_ACTIVEEXPIRED
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
roamingarray of UsageSmsPackageAllowance buckets for messages sent while roaming abroad.
Show child attributes
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
namestringrequiredHuman-readable name of the package, as shown to end users.
sms Countintegerint64requiredNumber of messages consumed from this allowance so far.
sms Remainingintegerint64requiredNumber of messages still available in this allowance.
sms Totalintegerint64requiredThe full message allowance of this package.
statusenum<string>requiredThe status of this package.
Whether a usage package is currently consumable.
- ACTIVE: The package is in its validity window and usage draws from it
- NOT_ACTIVE: The package exists but is not currently consumable, for example a purchased package whose validity window has not started yet
- EXPIRED: The package's validity window has ended; any remaining allowance is no longer usable
values
ACTIVENOT_ACTIVEEXPIRED
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
updated Atstringdate-timerequiredWhen the usage information was last refreshed from the network. Usage counters are not real-time; recent activity may not be reflected yet.
voiceobjectVoice call usage across all scopes and packages.
Voice call usage for a subscription, split by where and to whom calls are made: national (domestic calls), roaming (calls made while abroad), and ILD (international long distance — calls placed from the home country to foreign numbers).
Show child attributes
ildarray of UsageVoiceIldPackageInternational long distance (ILD) balances for calls placed from the home country to foreign numbers. Tracked as a monetary balance rather than minutes.
Show child attributes
balance Minorintegerint64Remaining prepaid amount available for international long distance calls, in minor units of the currency given by currency. Each ILD call deducts from this balance at the destination's per-minute rate.
currencystringThree-letter ISO 4217 code for the currency the balance is denominated in. Matches the subscription's billing currency.
expiry DatestringdateThe date the remaining balance expires and can no longer be used. Absent when the balance does not expire.
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
namestringrequiredHuman-readable name of the package, as shown to end users.
subscription Addon IdstringThe subscription add-on that granted this balance. Present only when the balance comes from an add-on.
nationalarray of UsageVoicePackageAllowance buckets for calls made within the home country, including the base plan's voice allowance and any add-on packages.
Show child attributes
call Countintegerint64requiredNumber of calls placed against this allowance.
call Remaining Secondsintegerint64requiredCall time still available in this allowance, in seconds.
call Secondsintegerint64requiredCall time consumed from this allowance so far, in seconds.
call Total Secondsintegerint64requiredThe full call time allowance of this package, in seconds.
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
namestringrequiredHuman-readable name of the package, as shown to end users.
statusenum<string>requiredThe status of this package.
Whether a usage package is currently consumable.
- ACTIVE: The package is in its validity window and usage draws from it
- NOT_ACTIVE: The package exists but is not currently consumable, for example a purchased package whose validity window has not started yet
- EXPIRED: The package's validity window has ended; any remaining allowance is no longer usable
values
ACTIVENOT_ACTIVEEXPIRED
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
roamingarray of UsageVoicePackageAllowance buckets for calls made while roaming abroad.
Show child attributes
call Countintegerint64requiredNumber of calls placed against this allowance.
call Remaining Secondsintegerint64requiredCall time still available in this allowance, in seconds.
call Secondsintegerint64requiredCall time consumed from this allowance so far, in seconds.
call Total Secondsintegerint64requiredThe full call time allowance of this package, in seconds.
metadataobject with string keysA set of key-value pairs that can be attached to an object for storing additional information in a semi-structured format. Provided by API clients and returned as-is; the platform does not interpret the values.
Show child attributes
namestringrequiredHuman-readable name of the package, as shown to end users.
statusenum<string>requiredThe status of this package.
Whether a usage package is currently consumable.
- ACTIVE: The package is in its validity window and usage draws from it
- NOT_ACTIVE: The package exists but is not currently consumable, for example a purchased package whose validity window has not started yet
- EXPIRED: The package's validity window has ended; any remaining allowance is no longer usable
values
ACTIVENOT_ACTIVEEXPIRED
subscription Addon IdstringThe subscription add-on that granted this allowance. Present only when the package comes from an add-on; absent for the base plan's included allowance.
valid Fromstringdate-timeStart of the period this allowance applies to.
valid Tostringdate-timeEnd of the period this allowance applies to. For base plan allowances this is the end of the current billing period (when the allowance resets); for time-limited add-on packages it is when the package itself expires.
400The request was malformed or invalid.
application/json
The request was malformed or invalid.
The request was malformed or invalid.
objectError
The error body returned by every endpoint when a request fails. Branch on reason, show message
to a human, and check details for field-level problems when the request was invalid.
codestringdeprecatedrequiredDeprecated. Use reason.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
codestringdeprecatedrequiredDeprecated. Use reason. It is the status of the whole error, the same for each item.
messagestringrequiredA human-readable message providing more details about the error.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
reasonstringNames the problem with the property. property_required is a missing value,
property_invalid is a value with the wrong format, and property_conflict is two values
that cannot occur together. Other reasons name a business condition. Your client must
accept a reason that it does not know.
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
domainstringThe business area of the reason, for example customer or porting. It is for information
only. Do not branch on it.
external CodestringThe code that a third party, for example a network operator, sent for the failure. It is exactly as the third party sent it.
external SourcestringThe third party that reported the failure.
hintstringA hint to help resolve the error.
internal CodestringThe number of the condition that failed. It is stable across releases. A condition that we
added after reason has no number, so branch on reason instead.
messagestringrequiredA human-readable message providing more details about the error.
reasonstringNames the condition that failed, in lower snake_case. It is independent of which system reported the failure, and it is stable across releases. Branch on this field. We add new reasons without notice, so your client must accept a reason that it does not know.
If the request has problems with different reasons, the reason is validation_failed. Then
each item of details names its own problem.
retryablebooleanTrue when the same request can pass later with no change. A 429 and a 503 are always
retryable.
span IdstringThe span within the trace that failed.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
401Authentication is required to access this resource.
application/json
Authentication is required to access this resource.
Authentication is required to access this resource.
objectError
The error body returned by every endpoint when a request fails. Branch on reason, show message
to a human, and check details for field-level problems when the request was invalid.
codestringdeprecatedrequiredDeprecated. Use reason.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
codestringdeprecatedrequiredDeprecated. Use reason. It is the status of the whole error, the same for each item.
messagestringrequiredA human-readable message providing more details about the error.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
reasonstringNames the problem with the property. property_required is a missing value,
property_invalid is a value with the wrong format, and property_conflict is two values
that cannot occur together. Other reasons name a business condition. Your client must
accept a reason that it does not know.
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
domainstringThe business area of the reason, for example customer or porting. It is for information
only. Do not branch on it.
external CodestringThe code that a third party, for example a network operator, sent for the failure. It is exactly as the third party sent it.
external SourcestringThe third party that reported the failure.
hintstringA hint to help resolve the error.
internal CodestringThe number of the condition that failed. It is stable across releases. A condition that we
added after reason has no number, so branch on reason instead.
messagestringrequiredA human-readable message providing more details about the error.
reasonstringNames the condition that failed, in lower snake_case. It is independent of which system reported the failure, and it is stable across releases. Branch on this field. We add new reasons without notice, so your client must accept a reason that it does not know.
If the request has problems with different reasons, the reason is validation_failed. Then
each item of details names its own problem.
retryablebooleanTrue when the same request can pass later with no change. A 429 and a 503 are always
retryable.
span IdstringThe span within the trace that failed.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
403Access to this resource is forbidden.
application/json
Access to this resource is forbidden.
Access to this resource is forbidden.
objectError
The error body returned by every endpoint when a request fails. Branch on reason, show message
to a human, and check details for field-level problems when the request was invalid.
codestringdeprecatedrequiredDeprecated. Use reason.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
codestringdeprecatedrequiredDeprecated. Use reason. It is the status of the whole error, the same for each item.
messagestringrequiredA human-readable message providing more details about the error.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
reasonstringNames the problem with the property. property_required is a missing value,
property_invalid is a value with the wrong format, and property_conflict is two values
that cannot occur together. Other reasons name a business condition. Your client must
accept a reason that it does not know.
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
domainstringThe business area of the reason, for example customer or porting. It is for information
only. Do not branch on it.
external CodestringThe code that a third party, for example a network operator, sent for the failure. It is exactly as the third party sent it.
external SourcestringThe third party that reported the failure.
hintstringA hint to help resolve the error.
internal CodestringThe number of the condition that failed. It is stable across releases. A condition that we
added after reason has no number, so branch on reason instead.
messagestringrequiredA human-readable message providing more details about the error.
reasonstringNames the condition that failed, in lower snake_case. It is independent of which system reported the failure, and it is stable across releases. Branch on this field. We add new reasons without notice, so your client must accept a reason that it does not know.
If the request has problems with different reasons, the reason is validation_failed. Then
each item of details names its own problem.
retryablebooleanTrue when the same request can pass later with no change. A 429 and a 503 are always
retryable.
span IdstringThe span within the trace that failed.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
404The requested resource was not found.
application/json
The requested resource was not found.
The requested resource was not found.
objectError
The error body returned by every endpoint when a request fails. Branch on reason, show message
to a human, and check details for field-level problems when the request was invalid.
codestringdeprecatedrequiredDeprecated. Use reason.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
codestringdeprecatedrequiredDeprecated. Use reason. It is the status of the whole error, the same for each item.
messagestringrequiredA human-readable message providing more details about the error.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
reasonstringNames the problem with the property. property_required is a missing value,
property_invalid is a value with the wrong format, and property_conflict is two values
that cannot occur together. Other reasons name a business condition. Your client must
accept a reason that it does not know.
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
domainstringThe business area of the reason, for example customer or porting. It is for information
only. Do not branch on it.
external CodestringThe code that a third party, for example a network operator, sent for the failure. It is exactly as the third party sent it.
external SourcestringThe third party that reported the failure.
hintstringA hint to help resolve the error.
internal CodestringThe number of the condition that failed. It is stable across releases. A condition that we
added after reason has no number, so branch on reason instead.
messagestringrequiredA human-readable message providing more details about the error.
reasonstringNames the condition that failed, in lower snake_case. It is independent of which system reported the failure, and it is stable across releases. Branch on this field. We add new reasons without notice, so your client must accept a reason that it does not know.
If the request has problems with different reasons, the reason is validation_failed. Then
each item of details names its own problem.
retryablebooleanTrue when the same request can pass later with no change. A 429 and a 503 are always
retryable.
span IdstringThe span within the trace that failed.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
500An unexpected error occurred on the server.
application/json
An unexpected error occurred on the server.
An unexpected error occurred on the server.
objectError
The error body returned by every endpoint when a request fails. Branch on reason, show message
to a human, and check details for field-level problems when the request was invalid.
codestringdeprecatedrequiredDeprecated. Use reason.
This field mixes three unrelated codes and does not say which one you have: a code that we publish, an operator's own code when the failure came from an operator, or the request status when there is neither. Do not branch on it.
detailsarray of objectAdditional details about the error, typically one entry per invalid field on validation failures.
Show child attributes
codestringdeprecatedrequiredDeprecated. Use reason. It is the status of the whole error, the same for each item.
messagestringrequiredA human-readable message providing more details about the error.
propertystringThe property or field related to the error. May be nested using dot notation (e.g., "billing.email").
reasonstringNames the problem with the property. property_required is a missing value,
property_invalid is a value with the wrong format, and property_conflict is two values
that cannot occur together. Other reasons name a business condition. Your client must
accept a reason that it does not know.
suggestionone ofA suggested value for the particular property.
For example, this may be set when validating an address with an alias, suggesting the expected value by the operator.
A string, number, boolean, object, or array value. The concrete type depends on the field the value is returned for.
Show child attributes
domainstringThe business area of the reason, for example customer or porting. It is for information
only. Do not branch on it.
external CodestringThe code that a third party, for example a network operator, sent for the failure. It is exactly as the third party sent it.
external SourcestringThe third party that reported the failure.
hintstringA hint to help resolve the error.
internal CodestringThe number of the condition that failed. It is stable across releases. A condition that we
added after reason has no number, so branch on reason instead.
messagestringrequiredA human-readable message providing more details about the error.
reasonstringNames the condition that failed, in lower snake_case. It is independent of which system reported the failure, and it is stable across releases. Branch on this field. We add new reasons without notice, so your client must accept a reason that it does not know.
If the request has problems with different reasons, the reason is validation_failed. Then
each item of details names its own problem.
retryablebooleanTrue when the same request can pass later with no change. A 429 and a 503 are always
retryable.
span IdstringThe span within the trace that failed.
trace IdstringIdentifies the trace this request produced. Quote it when reporting a failure — it is what lets us find the request among everything else the platform served.
Auth required
Send
X-Api-Key+Bearer JWT
curl https://apiv2.example.com/api/v2/end-user/subscriptions/SUBSCRIPTION_ID/usage \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'fetch('https://apiv2.example.com/api/v2/end-user/subscriptions/SUBSCRIPTION_ID/usage', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
Authorization: 'Bearer YOUR_ACCESS_TOKEN'
}
})requests.get(
"https://apiv2.example.com/api/v2/end-user/subscriptions/SUBSCRIPTION_ID/usage",
headers={
"X-Api-Key": "YOUR_API_KEY",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
)package main
import (
"fmt"
"io"
"net/http"
)
func main() {
requestUrl := "https://apiv2.example.com/api/v2/end-user/subscriptions/SUBSCRIPTION_ID/usage"
req, _ := http.NewRequest("GET", requestUrl, nil)
req.Header.Add("X-Api-Key", "YOUR_API_KEY")
req.Header.Add("Authorization", "Bearer YOUR_ACCESS_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}{
"data": {
"national": [
{
"dataBytesRemaining": 7516192768,
"dataBytesTotal": 10737418240,
"dataBytesUsed": 3221225472,
"name": "10GB National",
"status": "ACTIVE",
"validFrom": "2025-01-01T00:00:00Z",
"validTo": "2025-02-01T00:00:00Z"
}
],
"roaming": [
{
"dataBytesRemaining": 4294967296,
"dataBytesTotal": 5368709120,
"dataBytesUsed": 1073741824,
"name": "Asia 5GB Roaming",
"status": "ACTIVE",
"subscriptionAddonId": "a47ac10b-58cc-4372-a567-0e02b2c3d479",
"validFrom": "2025-01-01T00:00:00Z",
"validTo": "2025-02-01T00:00:00Z"
}
]
},
"sms": {
"national": [
{
"name": "500 SMS National",
"smsCount": 25,
"smsRemaining": 475,
"smsTotal": 500,
"status": "ACTIVE",
"validFrom": "2025-01-01T00:00:00Z",
"validTo": "2025-02-01T00:00:00Z"
}
]
},
"updatedAt": "2025-01-15T10:30:00Z",
"voice": {
"ild": [
{
"balanceMinor": 1550,
"currency": "USD",
"expiryDate": "2025-12-31",
"name": "ILD Top-up"
}
],
"national": [
{
"callCount": 15,
"callRemainingSeconds": 32400,
"callSeconds": 3600,
"callTotalSeconds": 36000,
"name": "Unlimited National",
"status": "ACTIVE",
"validFrom": "2025-01-01T00:00:00Z",
"validTo": "2025-02-01T00:00:00Z"
}
]
}
}{
"code": "bad_request",
"details": [
{
"code": "invalid_email",
"message": "Email format is invalid.",
"property": "contact.email"
}
],
"hint": "Check the request payload and correct the highlighted fields.",
"message": "The request body is invalid."
}{
"code": "unauthorized",
"hint": "Provide a valid API key in the X-Api-Key header.",
"message": "Authentication is required to access this resource."
}{
"code": "forbidden",
"hint": "Ensure your API key or user has the required permissions.",
"message": "You do not have permission to perform this action."
}{
"code": "not_found",
"hint": "Verify the customerId and try again.",
"message": "The requested customer could not be found."
}{
"code": "internal_server_error",
"hint": "Retry the request later. If the problem persists, contact support.",
"message": "An unexpected error occurred on the server."
}