Zuplo Developer API

List features

GET
https://dev.zuplo.com
/v3/metering/{bucketId}/features

⚠️ Preview: The Metering APIs are in preview and subject to change.

List features.

List features › path Parameters

bucketId
​string · required

The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

List features › query Parameters

meterSlug
​string[] · style: form

Filter by meterSlug

includeArchived
​boolean · style: form

Include archived features in response.

Default: false
page
​integer · min: 1 · style: form

Page index.

Default is 1.

Default: 1
pageSize
​integer · min: 1 · max: 1000 · style: form

The maximum number of items per page.

Default is 100.

Default: 100
offset
​integer · min: 0 · style: form

Number of items to skip.

Default is 0.

Default: 0
limit
​integer · min: 1 · max: 1000 · style: form

Number of items to return.

Default is 100.

Default: 100
order
​SortOrder · enum · style: form

The order direction.

The order direction.

Enum values:
ASC
DESC
Default: ASC
orderBy
​FeatureOrderBy · enum · style: form

The order by field.

Order by options for features.

Enum values:
id
key
name
createdAt
updatedAt

List features › Responses

The request has succeeded.

oneOf
Exactly one variant must match.

Decision Table

VariantMatching Criteria
type = array
type = object · requires: totalCount, page, pageSize +1 more
Properties for Variant 1:
Represents a feature that can be enabled or disabled for a plan. Used both for product catalog and entitlements.
createdAt
​string · date-time · readOnly · required

Timestamp of when the resource was created.

Example: 2024-01-01T01:01:01.001Z
updatedAt
​string · date-time · readOnly · required

Timestamp of when the resource was last updated.

Example: 2024-01-01T01:01:01.001Z
key
​string · minLength: 1 · maxLength: 64 · pattern: ^[a-z0-9]+(?:_[a-z0-… · required

A key is a unique string that is used to identify a resource.

name
​string · required
id
​string · readOnly · pattern: ^[0-7][0-9A-HJKMNP-T… · required

Readonly unique ULID identifier.

Example: 01ARZ3NDEKTSV4RRFFQ69G5FAV
deletedAt
​string · date-time · readOnly

Timestamp of when the resource was permanently deleted.

Example: 2024-01-01T01:01:01.001Z
archivedAt
​string · date-time · readOnly

Timestamp of when the resource was archived.

Example: 2023-01-01T01:01:01.001Z
​object

Set of key-value pairs. Metadata can be used to store additional information about a resource.

Example: {"key":"value"}
meterSlug
​string · minLength: 1 · maxLength: 64 · pattern: ^[a-z0-9]+(?:_[a-z0-…

A key is a unique string that is used to identify a resource.

Example: tokens_total
​object

Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields.

Example: {"model":{"$in":["gpt-4","gpt-4o"]},"type":{"$eq":"input"}}

Create feature

POST
https://dev.zuplo.com
/v3/metering/{bucketId}/features

⚠️ Preview: The Metering APIs are in preview and subject to change.

Features are either metered or static. A feature is metered if meterSlug is provided at creation. For metered features you can pass additional filters that will be applied when calculating feature usage, based on the meter's groupBy fields. Only meters with SUM and COUNT aggregation are supported for features. Features cannot be updated later, only archived.

Create feature › path Parameters

bucketId
​string · required

The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

Create feature › Request Body

Represents a feature that can be enabled or disabled for a plan. Used both for product catalog and entitlements.
key
​string · minLength: 1 · maxLength: 64 · pattern: ^[a-z0-9]+(?:_[a-z0-… · required

A key is a unique string that is used to identify a resource.

name
​string · required
​object

Set of key-value pairs. Metadata can be used to store additional information about a resource.

Example: {"key":"value"}
meterSlug
​string · minLength: 1 · maxLength: 64 · pattern: ^[a-z0-9]+(?:_[a-z0-…

A key is a unique string that is used to identify a resource.

Example: tokens_total
​object

Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields.

Example: {"model":{"$in":["gpt-4","gpt-4o"]},"type":{"$eq":"input"}}

Create feature › Responses

The request has succeeded and a new resource has been created as a result.

Represents a feature that can be enabled or disabled for a plan. Used both for product catalog and entitlements.
createdAt
​string · date-time · readOnly · required

Timestamp of when the resource was created.

Example: 2024-01-01T01:01:01.001Z
updatedAt
​string · date-time · readOnly · required

Timestamp of when the resource was last updated.

Example: 2024-01-01T01:01:01.001Z
key
​string · minLength: 1 · maxLength: 64 · pattern: ^[a-z0-9]+(?:_[a-z0-… · required

A key is a unique string that is used to identify a resource.

name
​string · required
id
​string · readOnly · pattern: ^[0-7][0-9A-HJKMNP-T… · required

Readonly unique ULID identifier.

Example: 01ARZ3NDEKTSV4RRFFQ69G5FAV
deletedAt
​string · date-time · readOnly

Timestamp of when the resource was permanently deleted.

Example: 2024-01-01T01:01:01.001Z
archivedAt
​string · date-time · readOnly

Timestamp of when the resource was archived.

Example: 2023-01-01T01:01:01.001Z
​object

Set of key-value pairs. Metadata can be used to store additional information about a resource.

Example: {"key":"value"}
meterSlug
​string · minLength: 1 · maxLength: 64 · pattern: ^[a-z0-9]+(?:_[a-z0-…

A key is a unique string that is used to identify a resource.

Example: tokens_total
​object

Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields.

Example: {"model":{"$in":["gpt-4","gpt-4o"]},"type":{"$eq":"input"}}

Get feature

GET
https://dev.zuplo.com
/v3/metering/{bucketId}/features/{featureId}

⚠️ Preview: The Metering APIs are in preview and subject to change.

Get a feature by ID.

Get feature › path Parameters

bucketId
​string · required

The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

featureId
​string · required

Get feature › Responses

The request has succeeded.

Represents a feature that can be enabled or disabled for a plan. Used both for product catalog and entitlements.
createdAt
​string · date-time · readOnly · required

Timestamp of when the resource was created.

Example: 2024-01-01T01:01:01.001Z
updatedAt
​string · date-time · readOnly · required

Timestamp of when the resource was last updated.

Example: 2024-01-01T01:01:01.001Z
key
​string · minLength: 1 · maxLength: 64 · pattern: ^[a-z0-9]+(?:_[a-z0-… · required

A key is a unique string that is used to identify a resource.

name
​string · required
id
​string · readOnly · pattern: ^[0-7][0-9A-HJKMNP-T… · required

Readonly unique ULID identifier.

Example: 01ARZ3NDEKTSV4RRFFQ69G5FAV
deletedAt
​string · date-time · readOnly

Timestamp of when the resource was permanently deleted.

Example: 2024-01-01T01:01:01.001Z
archivedAt
​string · date-time · readOnly

Timestamp of when the resource was archived.

Example: 2023-01-01T01:01:01.001Z
​object

Set of key-value pairs. Metadata can be used to store additional information about a resource.

Example: {"key":"value"}
meterSlug
​string · minLength: 1 · maxLength: 64 · pattern: ^[a-z0-9]+(?:_[a-z0-…

A key is a unique string that is used to identify a resource.

Example: tokens_total
​object

Optional advanced meter group by filters. You can use this to filter for values of the meter groupBy fields.

Example: {"model":{"$in":["gpt-4","gpt-4o"]},"type":{"$eq":"input"}}

Delete feature

DELETE
https://dev.zuplo.com
/v3/metering/{bucketId}/features/{featureId}

⚠️ Preview: The Metering APIs are in preview and subject to change.

Archive a feature by ID.

Once a feature is archived it cannot be unarchived. If a feature is archived, new entitlements cannot be created for it, but archiving the feature does not affect existing entitlements. This means, if you want to create a new feature with the same key, and then create entitlements for it, the previous entitlements have to be deleted first on a per subject basis.

Delete feature › path Parameters

bucketId
​string · required

The id of the bucket. Zuplo automatically creates buckets for your project. You can find it in your Zuplo Portal under the Settings tab for your project.

featureId
​string · required

Delete feature › Responses

There is no content to send for this request, but the headers may be useful.

No data returned