Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Subscriptions

List, create, update, activate, and deactivate subscriptions.

Overview

A Subscription is the primary resource, and it encapsulates all things related to the endpoints and tokens you define. This also includes a name, a start and end timestamp, and other metadata. This is one of the first resources that you should create to get started using Triton and making RPC requests. You'll need to have an account and obtain an account_uuid to create a subscription.

List subscriptions

GET /api/v1/subscriptions

Returns subscriptions that the current authentication token has access to.

Parameters

All parameters are optional.

Name
Type
Description

subscription_type

string

Will filter the results by subscription_type.

account_uuid

string

Will filter the results by account_uuid.

user_uuid

string

Will filter the results by user_uuid.

per

integer

Will limit the results to NN entries per page, defaults to 500 (also the maximum)

page

integer

Will return the results from passed page, defaults to 1

include

string

Pass any value (for example endpoints,tokens) to get full subscription objects instead of summaries.

Request

Example requests with page filtering, number of subscriptions per page and filtering by subscription type, account uuid or user uuid.

curl 'https://customers.triton.one/api/v1/subscriptions' -H "Authorization: secret-api-token" -H "Content-Type: application/json" -H "Accept:application/json"

Response

Returns a hash with the subscriptions key containing an array of subscriptions, newest first, and the meta containing pagination data. Without include, each entry is a summary: uuid, name, is_active, bam_preconfs_enabled, harmonic_preconfs_enabled, created_at, updated_at, current_billing_plan_code, and short account and subscription_type objects.

Get subscription

GET /api/v1/subscriptions/:subscription-uuid

Get Subscription that the current authentication token has access to.

Parameters

subscription-uuid is the only parameter that needs to be provided.

Request

Example request containing subscription-uuid

Response

Returns a hash with the subscription key containing the full subscription object. Below is the sample response.

Name
Type
Description

uuid

string

The generated primary key to reference this subscription.

endpoints

array[{endpoint_object}, ...]

An array of Endpoint objects, documented in the Endpoints section.

tokens

array[{token_object}, ...]

An array of Token objects, documented in the Tokens section.

supported_rate_tiers

array[{supported_rate_tier_object}, ...]

An array of Supported Rate Tiers objects, documented in the Rate Tiers section.

deactivation_reasons

array[{deactivation_reason_object}, ...]

An array of Deactivation Reasons objects.

Create subscription

API tokens are read-only, so this request returns 403 Forbidden.

POST /api/v1/subscriptions

Parameters

Name
Type
Description

account_uuid *required

string

Primary key of the account that the subscription should belong to.

subscription_type *required

string

Name of the subscription type. Obtained from Subscription types

name *required

string

A human readable display name to describe the subscription.

starts_at

datetime

The scheduled timestamp for the subscription to become active. Defaults to null, which means the subscription is immediately active.

ends_at

datetime

The timestamp for which the subscription becomes inactive. Defaults to null, which means the subscription never becomes inactive.

Request

Request JSON (-d command line parameter) must contain subscription key for a subscription object. All parameters should be placed inside.

Response

Returns a hash with the subscription key containing a subscription object. Note that endpoints, tokens and deactivation_reasons arrays are empty because this is newly created subscription. Below is the sample response.

Update subscription

API tokens are read-only, so this request returns 403 Forbidden.

PUT /api/v1/subscriptions/:subscription_uuid

Update attributes like name on an existing Subscription that the current authentication token has access to. Any other updatable attributes for a Subscription like Endpoints and Tokens should be updated via their distinct account management APIs.

Parameters

Name
Type
Description

name

string

A human readable display name to describe the subscription.

Request

Request JSON (-d command line parameter) must contain subscription key for a subscription object. All parameters should be placed inside.

Response

Returns a hash with the subscription key containing a subscription object. The response data for subscription object is the same as for GET /api/v1/subscriptions/:subscription-uuid and GET /api/v1/subscriptions

Activate subscription

API tokens are read-only, so this request returns 403 Forbidden.

PUT /api/v1/subscriptions/:subscription_uuid/activate

Activate a subscription so that it can be used.

Parameters

subscription_uuid is the only parameter that needs to be provided.

Request

Response

Deactivate subscription

API tokens are read-only, so this request returns 403 Forbidden.

PUT /api/v1/subscriptions/:subscription_uuid/deactivate

Deactivate a subscription so that it cannot be used.

Parameters

All parameters are optional.

Name
Type
Description

deactivation_reason

string

A human readable description to describe the deactivation reason.

Request

Example request with deactivation_reason.

Response

Returns the deactivation reason that was recorded.


Contact support by clicking the chat icon in your customer dashboard Sales questions? Contact us AI agent? Read llms.txt Follow updates: Blog · X · YouTube · Telegram · GitHub

Last updated