Subscription
The Subscription APIs give you the data about your Tray contract: the packages and add-ons that you bought, the contract periods and the allowances.
Use these endpoints with the Usage APIs to compare your usage with your allowances.
All Subscription endpoints use the POST method. The JSON body is optional.
Key terms
- Package: The core product of your contract, for example the Embedded package.
- Add-on: An extra product that you bought with your package, for example more tasks or more workflows.
- Allowance: The quantity that your contract gives you, for example a number of tasks each billing month.
- Fair use policy (FUP): A task allowance that comes with a package or add-on. Some FUP values give one task allowance for the full package or add-on (
cumulative...TasksFUP). Other FUP values give a task allowance for each unit, for example for each workflow (per...TasksFUP). - Contract period: The time from the start to the end of one contract.
Permissions
Use the token of an API user with the Owner or Admin organization role. Refer to API users and tokens.
Only an organization Owner or Admin can give an API user this role. A token of an API user with a different role gets a 403 response.
Allowance values
Allowance values are strings. A value is a number, for example "25", or "Unlimited".
Rate limits
Tray limits the number of requests to the Subscription endpoints: 300 requests each minute and 5,000 requests each hour.
Each response has headers that show the limit and the number of requests that remain, for example RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. RateLimit-Reset is the number of seconds before the limit for the minute starts again.
If you go above a limit, the response is 429. Wait, then send the request again.
Get Subscription
Gets the packages and add-ons of your contract.
If you do not set a time period, the response contains the contracts that are active now. If you set a time period, the response contains the contracts that are active for some or all of the time period.
Packages
Each package has a status:
status |
Meaning |
|---|---|
active |
The contract is active. |
upcoming expiry |
The contract is active and ends soon. |
renewed |
The contract is active and you renewed it. |
expired |
The contract is not active. |
standardAllowance is the number of workflows that the package includes.
Add-ons
quantity is the number of units that you bought, for example 10 workflows. addonCategory is the type of unit.
Other values
organizationStatusis the status of your organization:Active,Trial,LegacyorUnknown.inMultipleRegionsistrueif your contract has organizations in more than one region. In this case, use the/accountUsage endpoints.subscriptionDisplayTypelists the types of usage that apply to your contract.
Request Examples
{}Response Examples
{
"packages": [
{
"productName": "Embedded Enterprise",
"productType": "Core Package",
"productCode": "T-UAC-EMB",
"productFamily": "Embedded",
"startDate": "2026-01-15T00:00:00Z",
"endDate": "2027-01-14T00:00:00Z",
"status": "active",
"standardAllowance": [
{
"allowanceType": "Workflows",
"quantity": "50"
}
]
}
],
"addons": [
{
"productName": "Additional Tasks",
"productCode": "T-TASK",
"productFamily": "Embedded",
"startDate": "2026-01-15T00:00:00Z",
"endDate": "2027-01-14T00:00:00Z",
"quantity": "100000",
"addonCategory": "Task"
}
],
"organizationStatus": "Active",
"inMultipleRegions": true,
"subscriptionDisplayType": [
"CAPI",
"End User"
]
}Get Allowances
Gets the allowances of your active contracts.
| Field | Allowance |
|---|---|
workflowsAllowed |
The number of workflows in the package and the workflow add-ons. |
taskAllowed |
The number of tasks from task add-ons. This does not include fair use policy allowances. For your full task allowance, use Get Usage with usageType Tasks. |
capiTaskAllowed |
The number of tasks from Connectivity API task add-ons. |
uaAllowed |
The number of unique authentications from add-ons. |
solutionsAllowed |
The number of solutions from add-ons. |
solutionsInstancesAllowed |
The number of solution instances from add-ons. |
If an allowance is 0, the response does not contain that field.
Request Examples
{}Response Examples
{
"allowances": {
"workflowsAllowed": "50",
"taskAllowed": "100000",
"uaAllowed": "Unlimited"
}
}List Contract Organizations
Gets the IDs of all organizations that are on the same contract as your organization. The list includes organizations in all regions, and your organization.
The Usage endpoints include the usage of all these organizations.
Request Examples
{}Response Examples
{
"data": {
"organizationIds": [
"3f2a9c4e-0b1d-4e8f-a6c7-5d9e1f2a3b4c",
"8c7b6a5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d"
]
}
}List Contract Periods
Gets the periods of your contracts. Use these periods as the time period for the Usage endpoints.
The period with default set to true is the current contract period. The Get Usage endpoint uses this period if you do not set a time period.
The list is not in a fixed order. Sort it by start.
Request Examples
{}Response Examples
{
"data": {
"periods": [
{
"start": "2025-01-15T00:00:00Z",
"end": "2026-01-14T00:00:00Z",
"default": false
},
{
"start": "2026-01-15T00:00:00Z",
"end": "2027-01-14T00:00:00Z",
"default": true
}
]
}
}