Zenmeter Management API (2026-07-01:v1.0.2318)

Download OpenAPI specification:

Overview

This is the documentation for Zenmeter.

Zenmeter is a product in the Nalpeiron Growth Platform (NGP), which contains the Zentitle2, Zengain, and Zenmeter products. This API reference documents the Management API for Zenmeter within that broader NGP landscape.

Please provide feedback to your account manager on things you like and things you'd like to see.

Authentication

The Nalpeiron Growth Platform (NGP) Management API uses OAuth2 over https to manage authentication and authorization.

OAuth2 is an open standard for authorization that enables applications to securely access resources from other apps or services. We use client_credentials flow in the API.

In the client credentials flow, the app sends a request to the authorization server's token endpoint with its client ID and secret, which are used to authenticate the app. If the request is successful, the authorization server returns an access token, which the app can use to access protected resources on the resource server.

The client credentials flow is typically used by server-side apps or apps that run in a trusted environment, such as a secure server or device. It allows these apps to access protected resources on behalf of themselves, rather than on behalf of a user. This grant type is not suitable for browser-based apps or mobile apps, as it does not involve user interaction and does not provide a way for users to grant access to their protected resources.

Here is an example of how to generate client credentials for OAuth2:

  1. Register your application in the NGP administration site in the "API Credentials" section.

  2. During the registration process, the authorization server will provide you with a client secret for your provided client ID. These are unique, secret values that identify your app and are used to authenticate your requests to the authorization server.

  3. In order to use the client credentials grant type, your app must be able to securely store the client ID and secret. These values should never be shared or exposed to anyone outside of your app, as they provide access to the authorization server on your app's behalf.

  4. Once you have securely stored the client ID and secret, you can begin making requests to the authorization server's token endpoint using the client credentials grant type. This typically involves sending a POST request to the token endpoint, with the client ID and secret provided in the request body.

  5. You will find the token endpoint URL in the NGP administration site in the "API Credentials" section.

  6. If the request is successful, the authorization server will return an access token, which can be used to access protected resources on the resource server. The access token may also include a refresh token, which can be used to obtain a new access token when the original one expires.

Here is an example code in JavaScript that gets the access token:

var body = 'grant_type=client_credentials'
            + '&client_id=' + clientId
            + '&client_secret=' + clientSecret;
pm.sendRequest({
    url: oauth_url + '/protocol/openid-connect/token',
    method: 'POST',
    header: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Accept': 'application/json'
    },
    body: {
        mode: 'raw',
        raw: body
    }
}, function (err, res) {
    var response = res.json();
    environment.set("access_token", response.access_token);
    environment.set("token_time", Date.now() + response.expires_in * 1000);
});

Access token should be sent with every API request in the Authorization header as:

Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI...

Whenever the Authorization section for an endpoint contains more than one role in the list, it means that any of those roles is sufficient to access this endpoint.

API requires one more header to be set with the tenant ID for your NGP account, for example:

N-TenantId: t_KRwhRp1yl0_9gsZjE5Yjaw

Date and Time

All NGP APIs adhere to the ISO 8601 standard for date and time formatting. For instance, "2021-12-31T23:59:59Z" signifies the final second of the year 2021 in the UTC time zone. The backend systems of NGP function in UTC, and as such, all DateTime fields returned by the API are also in UTC. To enhance the usability of our API, we accept datetime values in several formats:

  • 2021-12-31T23:59:59Z - UTC time
  • 2021-12-31T23:59:59 - dates without timezone information are assumed to be UTC time
  • 2021-12-31T23:59:59+01:00 - time with timezone information

Postman Configuration

To set up Postman to use the NGP Management API and to test your setup, see Configure Postman.

Responses

Status Meaning Description
200 OK Returned after successful GET requests, body contains requested data
201 Created Returned after successful POST request, body contains created object
204 No Content Returned after successful PUT and DELETE requests. Body is empty

In case of an error, API returns error status code along with ApiError object if applicable.

Errors

Status Meaning Description
400 Bad Request cannot parse request body or parameters
401 Unauthorized missing or invalid access token
402 Request Failed parameters were valid but the request failed
403 Forbidden insufficient permissions to perform request
404 Not Found requested resource has not been found
409 Conflict request conflicts with the current state
422 Unprocessable entity request parses correctly, but fails validation
429 Too many requests too many requests hit the API too quickly
500, 502, 503, 504 Server errors something went wrong on the NGP's end

Changelog

Please see API Versioning documentation for more information about our versioning strategy and how to select an API version.

2026-07-01

Initial release

Customer general operations

Create, retrieve, and update customers shared across Nalpeiron products.

Create customer

Creates new customer

Authorizations:
Bearer
Request Body schema: application/json
required

Properties required to create a customer

name
required
string [ 1 .. 255 ] characters

Customer name

legalName
string or null <= 500 characters

Customer legal name

description
string or null <= 500 characters

Customer description

type
string (CustomerType)
Enum: "customer" "prospect" "lostCustomer" "lostProspect" "remove"
accountRefId
string or null <= 50 characters

Account reference id

status
string (CustomerStatus)
Enum: "active" "disabled" "inactive"
object or null

Custom fields

property name*
additional property
string or null
object (CustomerAddressApiRequest)
addressLine1
string or null <= 255 characters

Address line 1

addressLine2
string or null <= 255 characters

Address line 2

city
string or null <= 100 characters

City

stateRegion
string or null <= 100 characters

State or region

postalCode
string or null <= 20 characters

Postal code

country
string or null <= 2 characters

Country code (ISO 3166-1 alpha-2)

website
string or null <uri>

Customer website URL

linkedInUrl
string or null <uri>

Customer LinkedIn URL

contractValue
number or null <decimal> [ 0 .. 1000000000000 ]

Contract value in USD

contractStartDate
string or null <date-time>

Contract start date

contractRenewalDate
string or null <date-time>

Contract renewal date

Responses

Request samples

Content type
application/json
{
  • "name": "Boeing",
  • "legalName": "Boeing LLC",
  • "description": "string",
  • "type": "customer",
  • "accountRefId": "account12395-32",
  • "status": "active",
  • "customFields": {
    },
  • "address": {
    },
  • "contractValue": 0,
  • "contractStartDate": "2019-08-24T14:15:22Z",
  • "contractRenewalDate": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "cust_n1bmaIvXnEW7DOl0w5EiHQ",
  • "name": "Boeing",
  • "legalName": "Boeing LLC",
  • "description": "Enterprise customer using premium analytics suite.",
  • "type": "customer",
  • "accountRefId": "account12395-32",
  • "disabledDate": "2019-08-24T14:15:22Z",
  • "status": "active",
  • "customFields": {
    },
  • "address": {
    },
  • "contractValue": 0,
  • "contractStartDate": "2019-08-24T14:15:22Z",
  • "contractRenewalDate": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get customer list

This method returns list of customers

Authorizations:
Bearer
query Parameters
pageNumber
integer <int32>
Example: pageNumber=1

Requested page number

pageSize
integer <int32>
Example: pageSize=10

Maximum number of items per page

Responses

Response Schema: application/json
Array of objects (CustomerListModel)

Array of items matching specified query filters

Array
id
string <CustomerId>

Customer identifier

name
string

Customer name

type
string (CustomerType)
Enum: "customer" "prospect" "lostCustomer" "lostProspect" "remove"
accountRefId
string or null

Customer account reference id

disabledDate
string or null <date-time>

Customer disabled date

status
string (CustomerStatus)
Enum: "active" "disabled" "inactive"
description
string or null

Customer description

pageSize
integer <int32>

Requested page size or default page size if not specified

pageNumber
integer <int32>

Requested page number or first page if not specified

elementsTotal
integer <int32>

Total number of elements matching filter criteria

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pageSize": 10,
  • "pageNumber": 1,
  • "elementsTotal": 1
}

Get customer

This method returns the selected customer

Authorizations:
Bearer
path Parameters
customerId
required
string <CustomerId>
Example: cust_Bx_XkJrFzE2HStEdPdRing

Customer identifier

Responses

Response Schema: application/json
id
string <CustomerId>

Customer identifier

name
string

Customer name

legalName
string or null

Customer legal name

description
string or null

Customer description

type
string (CustomerType)
Enum: "customer" "prospect" "lostCustomer" "lostProspect" "remove"
accountRefId
string or null

Customer account reference id

disabledDate
string or null <date-time>

Customer disabled date

status
string (CustomerStatus)
Enum: "active" "disabled" "inactive"
object or null

Customer custom fields

property name*
additional property
string or null
object (CustomerAddressModel)
addressLine1
string or null

Address line 1

addressLine2
string or null

Address line 2

city
string or null

City

stateRegion
string or null

State or region

postalCode
string or null

Postal code

country
string or null

Country code (ISO 3166-1 alpha-2)

website
string or null <uri>

Customer website URL

linkedInUrl
string or null <uri>

Customer LinkedIn URL

contractValue
number or null <decimal>

Contract value in USD

contractStartDate
string or null <date-time>

Contract start date (UTC)

contractRenewalDate
string or null <date-time>

Contract renewal date (UTC)

createdAt
string <date-time>

Creation date

updatedAt
string or null <date-time>

Last update date

Response samples

Content type
application/json
{
  • "id": "cust_n1bmaIvXnEW7DOl0w5EiHQ",
  • "name": "Boeing",
  • "legalName": "Boeing LLC",
  • "description": "Enterprise customer using premium analytics suite.",
  • "type": "customer",
  • "accountRefId": "account12395-32",
  • "disabledDate": "2019-08-24T14:15:22Z",
  • "status": "active",
  • "customFields": {
    },
  • "address": {
    },
  • "contractValue": 0,
  • "contractStartDate": "2019-08-24T14:15:22Z",
  • "contractRenewalDate": "2019-08-24T14:15:22Z",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update customer

This method allows to change settings of selected customer

Authorizations:
Bearer
path Parameters
customerId
required
string <CustomerId>
Example: cust_Bx_XkJrFzE2HStEdPdRing

Customer identifier

Request Body schema: application/json
required

Properties required to update a customer

name
required
string [ 1 .. 255 ] characters

Customer name

legalName
string or null <= 500 characters

Customer legal name

description
string or null <= 500 characters

Customer description

type
string (CustomerType)
Enum: "customer" "prospect" "lostCustomer" "lostProspect" "remove"
accountRefId
string or null <= 50 characters

Account reference id

status
string (CustomerStatus)
Enum: "active" "disabled" "inactive"
object or null

Custom fields

property name*
additional property
string or null
object (CustomerAddressApiRequest)
addressLine1
string or null <= 255 characters

Address line 1

addressLine2
string or null <= 255 characters

Address line 2

city
string or null <= 100 characters

City

stateRegion
string or null <= 100 characters

State or region

postalCode
string or null <= 20 characters

Postal code

country
string or null <= 2 characters

Country code (ISO 3166-1 alpha-2)

website
string or null <uri>

Customer website URL

linkedInUrl
string or null <uri>

Customer LinkedIn URL

contractValue
number or null <decimal> [ 0 .. 1000000000000 ]

Contract value in USD

contractStartDate
string or null <date-time>

Contract start date

contractRenewalDate
string or null <date-time>

Contract renewal date

Responses

Request samples

Content type
application/json
{
  • "name": "Boeing",
  • "legalName": "Boeing LLC",
  • "description": "string",
  • "type": "customer",
  • "accountRefId": "account12395-32",
  • "status": "active",
  • "customFields": {
    },
  • "address": {
    },
  • "contractValue": 0,
  • "contractStartDate": "2019-08-24T14:15:22Z",
  • "contractRenewalDate": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Disable customer

This method disables customer and it's entitlements.

Authorizations:
Bearer
path Parameters
customerId
required
string <CustomerId>
Example: cust_Bx_XkJrFzE2HStEdPdRing

Customer identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Enable customer

This method re-enables customer and it's entitlements.

Authorizations:
Bearer
path Parameters
customerId
required
string <CustomerId>
Example: cust_Bx_XkJrFzE2HStEdPdRing

Customer identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Webhooks

Create webhook

Creates tenant webhook

Authorizations:
Bearer
Request Body schema: application/json
required
uri
required
string [ 1 .. 2048 ] characters

Webhook uri

subscriptions
required
Array of strings non-empty

Array of webhook event subscription codes

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": "wh_oH_hPJ3BgEO8T9Yd9-k9tg",
  • "subscriptions": [
    ]
}

Get list of webhooks

Returns list of account webhooks

Authorizations:
Bearer
query Parameters
pageNumber
integer <int32>
Example: pageNumber=1

Requested page number

pageSize
integer <int32>
Example: pageSize=10

Maximum number of items per page

Responses

Response Schema: application/json
Array of objects (WebhookModel)

Array of items matching specified query filters

Array
id
string <WebhookListenerId>

Id of an webhook in the system

uri
string <uri> <= 2048 characters

Webhook uri

subscriptions
required
Array of strings

Array of webhook events

pageSize
integer <int32>

Requested page size or default page size if not specified

pageNumber
integer <int32>

Requested page number or first page if not specified

elementsTotal
integer <int32>

Total number of elements matching filter criteria

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pageSize": 10,
  • "pageNumber": 1,
  • "elementsTotal": 1
}

Get webhook

Get account webhook by webhookId

Authorizations:
Bearer
path Parameters
webhookListenerId
required
string <WebhookListenerId>
Example: whl_CNrc8PbApEapAfJQN15aIA

Webhook Listener identifier

Responses

Response Schema: application/json
id
string <WebhookListenerId>

Id of an webhook in the system

uri
string <uri> <= 2048 characters

Webhook uri

subscriptions
required
Array of strings

Array of webhook events

Response samples

Content type
application/json
{
  • "id": "wh_oH_hPJ3BgEO8T9Yd9-k9tg",
  • "subscriptions": [
    ]
}

Update webhook

Updates account webhook

Authorizations:
Bearer
path Parameters
webhookListenerId
required
string <WebhookListenerId>
Example: whl_CNrc8PbApEapAfJQN15aIA

Webhook Listener identifier

Request Body schema: application/json
required
uri
required
string [ 1 .. 2048 ] characters

Webhook uri

subscriptions
required
Array of strings non-empty

Array of webhook events subscription codes

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Delete webhook

Deletes account webhook

Authorizations:
Bearer
path Parameters
webhookListenerId
required
string <WebhookListenerId>
Example: whl_CNrc8PbApEapAfJQN15aIA

Webhook Listener identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Test webhook listener

Sends a test event to webhook URL

Authorizations:
Bearer
path Parameters
webhookListenerId
required
string <WebhookListenerId>
Example: whl_CNrc8PbApEapAfJQN15aIA

Webhook Listener identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Get webhook events list

Returns list of all available events

Authorizations:
Bearer

Responses

Response Schema: application/json
Array of objects (WebhookEventTypeModel)

Array of items matching specified query filters

Array
type
string (EventType)
Enum: "entitlementGroup" "entitlement" "customer" "insight" "zenmeterSubscription"
code
string

Webhook event code

description
string

Webhook event description

elementsTotal
integer <int32>

Total number of elements matching filter criteria

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "elementsTotal": 1
}

Webhook events

customer.created Webhook

Event generated when customer was successfully created

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (CustomerCreatedWebhookModel)

Webhook model for notifying that a customer has been created

customerId
string <CustomerId>

Customer identifier

name
string

Customer name

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

customer.updated Webhook

Event generated when customer was successfully updated

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (CustomerUpdatedWebhookModel)

Webhook model for notifying that a customer has been updated

customerId
string <CustomerId>

Customer identifier

name
string

Customer name

disabled
boolean

True of the customer is disabled

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.created Webhook

Event generated when a Zenmeter subscription was successfully created

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionCreatedWebhookModel)

Webhook model for notifying that a Zenmeter subscription has been created

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

customerId
string or null <CustomerId>

Customer associated with the subscription

orderRefId
string or null

External order reference associated with the subscription

sku
string

SKU of the subscription offering

planType
string (ZenmeterPlanType)
Enum: "trial" "paid"
expiryDate
string <date-time>

Date when the subscription expires

createdAt
string <date-time>

Date when the subscription was created

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.cancellation.reverted Webhook

Event generated when a pending Zenmeter subscription cancellation was successfully reverted

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionCancellationRevertedWebhookModel)

Webhook model for notifying that a pending Zenmeter subscription cancellation has been reverted

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

revertedAt
string <date-time>

Date when the pending cancellation was reverted

expiryDate
string <date-time>

Date when the subscription expires

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.usage.period.closed Webhook

Event generated when a Zenmeter usage period closes and creates a usage snapshot

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionUsagePeriodClosedWebhookModel)

Webhook model for notifying about a closed usage period. The end state of every closed usage period is captured by an immutable snapshot.

subscriptionId
required
string <ZenmeterSubscriptionId>

Subscription whose usage period closed; equal to the envelope resource identifier.

snapshotId
required
string <SubscriptionUsageSnapshotId>

Identifier of the immutable usage snapshot captured by this closure, used for correlation.

closureReason
required
string (SubscriptionUsageResetTrigger)
Enum: "scheduledReset" "expiry" "trialToPaidConversion" "offeringChange"

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.renewed Webhook

Event generated when a Zenmeter subscription was successfully renewed

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionRenewedWebhookModel)

Webhook model for notifying that a Zenmeter subscription has been renewed

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

renewedAt
string <date-time>

Date when the subscription was renewed

expiryDate
string <date-time>

Date when the renewed subscription expires

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.canceled Webhook

Event generated when cancellation of a Zenmeter subscription was successfully requested

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionCanceledWebhookModel)

Webhook model for notifying that cancellation of a Zenmeter subscription has been requested

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

canceledAt
string <date-time>

Date when cancellation was requested

expiryDate
string <date-time>

Date when the subscription expires

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.graceperiod.started Webhook

Event generated when a Zenmeter subscription successfully entered its grace period

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionGracePeriodStartedWebhookModel)

Webhook model for notifying that a Zenmeter subscription has entered its grace period

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

startedAt
string <date-time>

Date when the subscription entered its grace period, which is the date its commercial period expired

gracePeriodExpiry
string <date-time>

Date when the subscription grace period expires

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.trial.extended Webhook

Event generated when a Zenmeter subscription trial was successfully extended

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionTrialExtendedWebhookModel)

Webhook model for notifying that a Zenmeter subscription trial has been extended

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

extendedAt
string <date-time>

Date when the subscription trial was extended

expiryDate
string <date-time>

Date when the extended subscription trial expires

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.expired Webhook

Event generated when a Zenmeter subscription has expired

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionExpiredWebhookModel)

Webhook model for notifying that a Zenmeter subscription has expired

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

expiredAt
string <date-time>

Date when the subscription expired

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.trial.converted Webhook

Event generated when a Zenmeter trial subscription was successfully converted to paid

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionTrialConvertedWebhookModel)

Webhook model for notifying that a Zenmeter trial subscription has been converted to paid

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

convertedAt
string <date-time>

Date when the trial was converted to paid

sku
string

SKU of the paid subscription offering

expiryDate
string <date-time>

Date when the paid subscription expires

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.user.added Webhook

Event generated when a user was successfully added to a Zenmeter subscription

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionUserAddedWebhookModel)

Webhook model for notifying that a user has been added to a Zenmeter subscription

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

subscriptionUserId
string <ZenmeterSubscriptionUserId>

Subscription user identifier

externalUserId
string

External identifier assigned to the subscription user by the ISV

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.addon.created Webhook

Event generated when an add-on was successfully attached to a Zenmeter subscription

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionAddonCreatedWebhookModel)

Webhook model for notifying that an add-on has been attached to a Zenmeter subscription

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

subscriptionAddonId
string <ZenmeterSubscriptionAddonId>

Attached subscription add-on identifier

addonSku
string

SKU of the attached add-on offering

createdAt
string <date-time>

Time the add-on was attached to the subscription (UTC)

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.addon.canceled Webhook

Event generated when cancellation was requested for an add-on attached to a Zenmeter subscription

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionAddonCanceledWebhookModel)

Webhook model for notifying that cancellation has been requested for an add-on attached to a Zenmeter subscription

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

subscriptionAddonId
string <ZenmeterSubscriptionAddonId>

Attached subscription add-on identifier

addonSku
string

SKU of the attached add-on offering

canceledAt
string <date-time>

Time cancellation was requested (UTC); the add-on may remain active until renewal

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.addon.cancellation.reverted Webhook

Event generated when pending cancellation was reverted for an add-on attached to a Zenmeter subscription

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionAddonCancellationRevertedWebhookModel)

Webhook model for notifying that pending cancellation has been reverted for an add-on attached to a Zenmeter subscription

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

subscriptionAddonId
string <ZenmeterSubscriptionAddonId>

Attached subscription add-on identifier

addonSku
string

SKU of the attached add-on offering

revertedAt
string <date-time>

Time the pending add-on cancellation was reverted (UTC)

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

subscription.addon.expired Webhook

Event generated when an add-on attached to a Zenmeter subscription expired

Request Body schema: application/json
eventId
string <EventId>

Event identifier

eventDate
string <date-time>

Date when the event occurred

eventCode
string

Code specifying the Webhook event type

resourceId
string

Identifier of the related resource

callAttempt
integer <int32>

Number of times the webhook has been attempted

object (SubscriptionAddonExpiredWebhookModel)

Webhook model for notifying that an expiry has occurred for an add-on attached to a Zenmeter subscription

subscriptionId
string <ZenmeterSubscriptionId>

Subscription identifier

subscriptionAddonId
string <ZenmeterSubscriptionAddonId>

Attached subscription add-on identifier

addonSku
string

SKU of the attached add-on offering

expiredAt
string <date-time>

Effective time the attached add-on expired (UTC)

Responses

Request samples

Content type
application/json
{
  • "eventId": "event_NsqUHwSXC0S4f4vuNkegSg",
  • "eventDate": "2019-08-24T14:15:22Z",
  • "eventCode": "entitlement.created",
  • "resourceId": "ent_qWVHS0LKfUiuqRCzKfJqlA\"",
  • "callAttempt": 3,
  • "payload": {
    }
}

Product catalog

Read Zenmeter catalog configuration for products, business models, and compatible add-ons.

Get compatible add-ons

Returns add-ons and related offerings that can be attached to a specific base offering.

Authorizations:
Bearer
query Parameters
baseOfferingSku
required
string <= 50 characters
Example: baseOfferingSku=ACME-AI-PRO-MONTHLY

Base offering SKU.

Responses

Response Schema: application/json
object (CatalogCompatibleBaseOfferingModel)
sku
string

Base offering SKU.

productId
string <ZenmeterProductId>

Owning product identifier.

businessModelId
string <BusinessModelId>

Owning business model identifier.

tierId
string <TierId>

Owning tier identifier.

Array of objects (CatalogCompatibleAddonListItemModel)

Add-ons compatible with the base offering.

Array
object (CatalogAddonModel)
Array of objects (CatalogAddonOfferingModel)

Compatible offerings owned by the add-on.

Response samples

Content type
application/json
{
  • "baseOffering": {
    },
  • "items": [
    ]
}

Get business model

Returns the configured Zenmeter business model including rates, tiers, and offerings.

Authorizations:
Bearer
path Parameters
businessModelId
required
string <BusinessModelId>
Example: zm-bm_oH_hPJ3BgEO187Yd9-kuTg

Business model identifier

Responses

Response Schema: application/json
id
string <BusinessModelId>

Business model identifier.

productId
string <ZenmeterProductId>

Owning product identifier.

name
string

Business model name.

description
string or null

Optional business model description.

object (CatalogBusinessModelTemplateModel)

API model for the reusable business model template descriptor.

pricingStructure
string (PricingStructure)
Enum: "usageLimit" "utilityBased" "creditPool"

Defines how quantitative feature usage is configured and billed. These semantics are currently driven by UI logic and are not yet strictly enforced across backend/domain code paths.

consumptionScope
string (ConsumptionScope)
Enum: "shared" "user"
overageMode
string (OverageMode)
Enum: "blocked" "tracked"

Defines whether usage above the included amount is blocked or tracked as overage.

Array of objects (RateEntryModel)

Configured rate plan entries.

Array
rate
number <decimal>

Configured rate amount.

object (RateFeatureModel)
object (RateMeterModel)
Array of objects (TierModel)

Configured tiers.

Array
id
string <TierId>

Tier identifier.

name
string

Tier name.

description
string or null

Optional tier description.

object (UsageResetPolicyModel)
Array of objects (TierFeatureLimitModel)

Feature limits included in the tier.

Array of objects (TierMeterModel)

Meters included in the tier.

Array of objects (TierOfferingModel)

Commercial offerings available for the tier.

Response samples

Content type
application/json
{
  • "id": "zm-bm_oH_hPJ3BgEO187Yd9-kuTg",
  • "productId": "zm-prod_oH_hPJ3BgEO187Yd9-kuTg",
  • "name": "Credit-based",
  • "description": "Commercial model billed by credit usage.",
  • "template": {
    },
  • "rates": [
    ],
  • "tiers": [
    ]
}

Get product list

Returns paginated Zenmeter products.

Authorizations:
Bearer
query Parameters
pageNumber
integer <int32>
Example: pageNumber=1

Requested page number

pageSize
integer <int32>
Example: pageSize=10

Maximum number of items per page

Responses

Response Schema: application/json
Array of objects (CatalogProductListItemModel)

Array of items matching specified query filters

Array
id
string <ZenmeterProductId>

Product identifier.

name
string

Display name of the Zenmeter product.

description
string or null

Optional product description.

pageSize
integer <int32>

Requested page size or default page size if not specified

pageNumber
integer <int32>

Requested page number or first page if not specified

elementsTotal
integer <int32>

Total number of elements matching filter criteria

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pageSize": 10,
  • "pageNumber": 1,
  • "elementsTotal": 1
}

List business models

Returns all configured Zenmeter business models for the specified product.

Authorizations:
Bearer
path Parameters
productId
required
string <ZenmeterProductId>
Example: zm-prod_oH_hPJ3BgEO187Yd9-kuTg

Zenmeter product identifier

Responses

Response Schema: application/json
Array of objects (CatalogBusinessModelListItemModel)
Array
id
string <BusinessModelId>

Business model identifier.

productId
string <ZenmeterProductId>

Owning product identifier.

name
string

Business model name.

description
string or null

Optional business model description.

object (CatalogBusinessModelTemplateModel)

API model for the reusable business model template descriptor.

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Subscription general operations

Create, list, retrieve, and manage Zenmeter subscriptions.

Create a subscription

Creates a Zenmeter subscription for the supplied customer and line items.

Authorizations:
Bearer
Request Body schema: application/json
required

Request body with customer and line items to subscribe.

startMode
required
string (SubscriptionStartMode)
Enum: "paid" "trial"
required
Array of objects (SubscriptionLineItemApiRequest) non-empty

Ordered offering SKUs and quantities to subscribe the customer to.

Array (non-empty)
sku
required
string [ 1 .. 50 ] characters

Offering SKU.

quantity
required
integer <int32> [ 1 .. 2147483647 ]

Number of logical units represented by this line item.

customerId
required
string <CustomerId>

Identifier of the customer that owns the subscription.

object (BillingReferenceApiRequest)

Request payload identifying an external billing order and its optional billing system.

orderRefId
string or null <= 50 characters

External order reference identifier.

billingSystem
string or null <= 50 characters

Optional billing system that issued the order reference.

subscriptionRefId
string or null <= 50 characters

Optional external billing provider subscription reference identifier. Must be unique.

Responses

Request samples

Content type
application/json
{
  • "startMode": "paid",
  • "lineItems": [
    ],
  • "customerId": "cust_n1bmaIvXnEW7DOl0w5EiHQ",
  • "billingReference": {
    },
  • "subscriptionRefId": "sub_1QxYz..."
}

Response samples

Content type
application/json
{
  • "id": "zm-sub_oH_hPJ3BgEO172Yd9-KuTg",
  • "subscriptionRevision": 17,
  • "customer": {
    },
  • "offering": {
    },
  • "gracePeriod": {
    },
  • "billingReference": {
    },
  • "subscriptionRefId": "sub_1QxYz...",
  • "statusInfo": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "businessModel": "usage-based",
  • "businessModelId": "zm-bm_oH_hPJ3BgEO187Yd9-kuTg",
  • "userCount": 12,
  • "addons": [
    ],
  • "billingPeriod": "monthly",
  • "usageResetPolicy": {
    },
  • "currentUsagePeriodStart": "2019-08-24T14:15:22Z",
  • "nextUsageResetAt": "2019-08-24T14:15:22Z"
}

Get subscription list

Returns paginated Zenmeter subscriptions, optionally filtered by subscription user identity.

Authorizations:
Bearer
query Parameters
pageNumber
integer <int32>
Example: pageNumber=1

Requested page number

pageSize
integer <int32>
Example: pageSize=10

Maximum number of items per page

userId
string or null <ZenmeterSubscriptionUserId>

Zenmeter subscription user identifier. Mutually exclusive with ExternalUserId.

externalUserId
string or null <= 50 characters

External user identifier shared by one or more subscription users. Mutually exclusive with UserId.

Responses

Response Schema: application/json
Array of objects (SubscriptionListItemModel)

Array of items matching specified query filters

Array
id
string <ZenmeterSubscriptionId>

Subscription identifier.

subscriptionRevision
integer <int32>

Revision of the subscription consumption configuration.

object (SubscriptionCustomerModel)
object (SubscriptionOfferingModel)
object (BillingReferenceModel)

Identifies an external billing order and, optionally, the billing system that issued it.

subscriptionRefId
string or null

Optional billing provider subscription reference identifier.

object (SubscriptionStatusModel)
createdAt
string <date-time>

Timestamp when the subscription was created in UTC.

businessModel
string

Billing business model.

currentUsagePeriodStart
string <date-time>

Start of current usage period in UTC.

nextUsageResetAt
string or null <date-time>

Planned timestamp for next usage reset in UTC.

pageSize
integer <int32>

Requested page size or default page size if not specified

pageNumber
integer <int32>

Requested page number or first page if not specified

elementsTotal
integer <int32>

Total number of elements matching filter criteria

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pageSize": 10,
  • "pageNumber": 1,
  • "elementsTotal": 1
}

Get subscription

Returns a detailed Zenmeter subscription view for a specific subscription identifier.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response Schema: application/json
id
string <ZenmeterSubscriptionId>

Subscription identifier.

subscriptionRevision
integer <int32>

Revision of the subscription consumption configuration.

object (SubscriptionCustomerModel)
id
string <CustomerId>

Customer identifier.

name
string

Customer display name.

accountRefId
string or null

External account reference identifier.

object (SubscriptionOfferingModel)
productName
string

Product display name.

productId
string <ZenmeterProductId>

Product identifier.

offeringName
string

Offering display name.

sku
string

Offering SKU.

object (Interval)
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute" "second"
count
integer or null [ 1 .. 32767 ]

Number of units for interval

object (BillingReferenceModel)

Identifies an external billing order and, optionally, the billing system that issued it.

orderRefId
string

External order reference identifier.

billingSystem
string or null

Optional billing system that issued the order reference.

subscriptionRefId
string or null

Optional billing provider subscription reference identifier.

object (SubscriptionStatusModel)
status
string (SubscriptionStatus)
Enum: "active" "gracePeriod" "expired"

Lifecycle state of a Zenmeter subscription.

expiryDate
string <date-time>

Subscription expiry timestamp in UTC.

gracePeriodExpiry
string <date-time>

Grace period end timestamp in UTC.

disabledAt
string or null <date-time>

Timestamp when the subscription was disabled in UTC.

customerDisabledAt
string or null <date-time>

Timestamp when the subscription customer was disabled in UTC.

cancelledAt
string or null <date-time>

Timestamp when subscription cancellation was requested in UTC.

trial
boolean

Indicates whether the subscription is in trial period.

createdAt
string <date-time>

Timestamp when the subscription was created.

businessModel
string

Billing business model.

businessModelId
string <BusinessModelId>

Billing business model identifier.

userCount
integer <int32>

Number of active users assigned to the subscription.

Array of objects (SubscriptionAddonModel)

Enabled add-ons.

Array
id
string <ZenmeterSubscriptionAddonId>

Subscription add-on identifier.

sku
string

Add-on SKU.

offeringName
string

Add-on offering display name.

createdAt
string <date-time>

Timestamp when the add-on was attached in UTC.

expiryDate
string or null <date-time>

Add-on expiry timestamp in UTC.

object (AddonOfferingTermModel)
object (SubscriptionAddonStatusModel)
object (BillingReferenceModel)

Identifies an external billing order and, optionally, the billing system that issued it.

billingPeriod
string (BillingPeriod)
Enum: "monthly" "yearly"

Billing cadence used by subscriptions and recurring add-ons.

object (UsageResetPolicyModel)
mode
string (ConsumptionResetMode)
Enum: "never" "onInterval"

Defines whether included usage resets automatically and, if so, on a configured interval.

object (Interval)
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute" "second"
count
integer or null [ 1 .. 32767 ]

Number of units for interval

currentUsagePeriodStart
string <date-time>

Start of current usage period in UTC.

nextUsageResetAt
string or null <date-time>

Planned timestamp for next usage reset in UTC.

Response samples

Content type
application/json
{
  • "id": "zm-sub_oH_hPJ3BgEO172Yd9-KuTg",
  • "subscriptionRevision": 17,
  • "customer": {
    },
  • "offering": {
    },
  • "gracePeriod": {
    },
  • "billingReference": {
    },
  • "subscriptionRefId": "sub_1QxYz...",
  • "statusInfo": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "businessModel": "usage-based",
  • "businessModelId": "zm-bm_oH_hPJ3BgEO187Yd9-kuTg",
  • "userCount": 12,
  • "addons": [
    ],
  • "billingPeriod": "monthly",
  • "usageResetPolicy": {
    },
  • "currentUsagePeriodStart": "2019-08-24T14:15:22Z",
  • "nextUsageResetAt": "2019-08-24T14:15:22Z"
}

Cancel subscription

Requests cancellation for a Zenmeter subscription.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Change subscription offering

Changes the base offering of an existing Zenmeter subscription and reconciles add-ons and usage state.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Request Body schema: application/json
required

Request body with target base offering and add-on quantities.

required
Array of objects (SubscriptionLineItemApiRequest) non-empty

Ordered target base offering and add-on quantities. Omitted recurring add-ons expire; one-time add-ons represent new purchases.

Array (non-empty)
sku
required
string [ 1 .. 50 ] characters

Offering SKU.

quantity
required
integer <int32> [ 1 .. 2147483647 ]

Number of logical units represented by this line item.

Responses

Request samples

Content type
application/json
{
  • "lineItems": [
    ]
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Preview a subscription offering change

Evaluates a proposed subscription composition without changing the subscription.

Include exactly one base offering SKU and every recurring add-on that should remain active. An omitted recurring add-on is projected to expire. Each one-time add-on line specifies the quantity for a new purchase; existing one-time add-ons are included in the preview automatically.

The complete composition is evaluated. If an add-on is incompatible, the preview still returns all projections, sets canExecute to false, and marks the affected add-on as rejected with a projectedStatusReason.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Request Body schema: application/json
required

Complete target base offering and add-on quantities.

required
Array of objects (SubscriptionLineItemApiRequest) non-empty

Ordered target base offering and add-on quantities. Omitted recurring add-ons expire; one-time add-ons represent new purchases.

Array (non-empty)
sku
required
string [ 1 .. 50 ] characters

Offering SKU.

quantity
required
integer <int32> [ 1 .. 2147483647 ]

Number of logical units represented by this line item.

Responses

Response Schema: application/json
canExecute
boolean

Whether every add-on projection can be applied. false when any projection is rejected.

object (OfferingChangeBaseOfferingModel)

Base offering details included in an offering-change preview.

sku
string

Base offering SKU.

name
string

Base offering display name.

productName
string

Product display name.

tierName
string

Tier display name.

billingPeriod
string (BillingPeriod)
Enum: "monthly" "yearly"

Billing cadence used by subscriptions and recurring add-ons.

object (OfferingChangeBaseOfferingModel)

Base offering details included in an offering-change preview.

sku
string

Base offering SKU.

name
string

Base offering display name.

productName
string

Product display name.

tierName
string

Tier display name.

billingPeriod
string (BillingPeriod)
Enum: "monthly" "yearly"

Billing cadence used by subscriptions and recurring add-ons.

Array of objects (OfferingChangeAddonModel)

Projected actions and resulting statuses for existing add-on instances and requested additions.

Array
subscriptionAddonId
string or null <ZenmeterSubscriptionAddonId>

Existing subscription add-on identifier; null for a requested new add-on.

sku
string

Add-on offering SKU.

name
string

Add-on offering display name.

term
string (AddonRenewalBehavior)
Enum: "oneTime" "renewsWithSubscription"

Describes whether an add-on expires once or renews alongside the parent subscription.

currentStatus
string (AddonStatus)
Enum: "active" "incompatible" "expired"

Lifecycle state of a Zenmeter add-on.

action
string (OfferingChangeAddonAction)
Enum: "retain" "add" "cancelAndExpire" "markIncompatible" "restoreCompatibility"

Action the offering change attempts for an add-on instance or requested addition.

projectedStatus
string (OfferingChangeAddonProjectedStatus)
Enum: "active" "expired" "incompatible" "rejected"

Projected add-on lifecycle result. Rejected is preview-only and is never persisted.

projectedStatusReason
string (OfferingChangeAddonProjectedStatusReason)
Enum: "includedInTargetComposition" "omittedFromTargetComposition" "compatibleWithTargetBaseOffering" "incompatibleWithTargetBaseOffering" "cancellationAlreadyRequested"

Stable reason for the projected add-on action and result.

expiresAt
string or null <date-time>

Current expiry timestamp of the existing add-on in UTC; null for requested additions or existing add-ons without an expiry.

Request samples

Content type
application/json
{
  • "lineItems": [
    ]
}

Response samples

Content type
application/json
{
  • "canExecute": true,
  • "currentBaseOffering": {
    },
  • "targetBaseOffering": {
    },
  • "addons": [
    ]
}

Convert trial subscription to paid

Immediately converts a trial Zenmeter subscription to paid using its existing offering configuration. A cancellation request is cleared as part of the conversion.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Disable subscription

Disables a Zenmeter subscription. Disabled subscriptions cannot consume features. Effective immediately.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Enable subscription

Re-enables a Zenmeter subscription. Does not override disabled customer. The enabled subscription can consume features. Effective immediately.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Extend trial subscription

Extends a trial Zenmeter subscription using the trial duration configured at creation time. When cancellation is recorded, set the optional cancellation override to true to extend and clear the cancellation.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

query Parameters
overrideCancellation
boolean
Example: overrideCancellation=false

Whether to clear a recorded cancellation while extending the trial. Defaults to false.

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Get subscription features list

Returns the visible feature grants for a specific Zenmeter subscription.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response Schema: application/json
subscriptionRevision
integer <int32>

Revision of the subscription consumption configuration.

Array of objects (SubscriptionFeatureListItemModel)

Resolved feature grants for the subscription.

Array
object (FeatureReferenceModel)

API model referencing a Zenmeter product feature.

object (UnitModel)
featureKind
string (FeatureKind)
Enum: "access" "quantitative"

Distinguishes feature grants that provide access from those that track quantities.

meterKey
string or null

Associated meter key when the feature is meter-backed.

Array of objects (FeatureGrantSourceModel)

Resolved grant sources contributing to this feature.

Response samples

Content type
application/json
{
  • "subscriptionRevision": 17,
  • "items": [
    ]
}

Get subscription access features.

Returns the access features a specific Zenmeter subscription grants right now.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response Schema: application/json
Array of objects (FeatureReferenceModel)

Access features the subscription currently grants.

Array
key
string

Feature key.

displayName
string

Display name for the feature.

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get subscription consumable features.

Returns the consumable features available to a specific Zenmeter subscription. Discovering a consumable feature does not guarantee that a subsequent Consume operation succeeds.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response Schema: application/json
object (UsageResetPolicyModel)
mode
string (ConsumptionResetMode)
Enum: "never" "onInterval"

Defines whether included usage resets automatically and, if so, on a configured interval.

object (Interval)
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute" "second"
count
integer or null [ 1 .. 32767 ]

Number of units for interval

nextResetAt
string or null <date-time>

Next scheduled usage reset, or null when the usage period is stopped.

Array of objects (ConsumableFeatureListItemModel)

Consumable features available to the subscription.

Array
object (FeatureReferenceModel)

API model referencing a Zenmeter product feature.

object (UnitModel)
object (BalanceOwnerReferenceModel)

API model referencing the feature or meter that owns a subscription balance.

Response samples

Content type
application/json
{
  • "resetPolicy": {
    },
  • "nextResetAt": "2019-08-24T14:15:22Z",
  • "items": [
    ]
}

Get subscription meters

Returns the visible meter grants for a specific Zenmeter subscription identifier.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response Schema: application/json
subscriptionRevision
integer <int32>

Revision of the subscription consumption configuration.

Array of objects (SubscriptionMeterListItemModel)

Resolved meter grants for the subscription.

Array
object (MeterReferenceModel)

API model referencing a Zenmeter product meter.

object (UnitModel)
Array of objects (MeterGrantSourceModel)

Resolved grant sources contributing to this meter.

Response samples

Content type
application/json
{
  • "subscriptionRevision": 17,
  • "items": [
    ]
}

Renew subscription

Renews a paid Zenmeter subscription using the subscription duration configured at creation time. When cancellation is recorded, set the optional cancellation override to true to renew and clear the cancellation.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

query Parameters
overrideCancellation
boolean
Example: overrideCancellation=false

Whether to clear a recorded cancellation while renewing. Defaults to false.

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Revert subscription cancellation before expiry

Reverts a pending Zenmeter subscription cancellation before expiry only. The current subscription period and usage period dates are preserved.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Lookup subscription

Returns a detailed Zenmeter subscription view for one external billing reference. Supply exactly one of orderRefId or subscriptionRefId.

Authorizations:
Bearer
query Parameters
OrderRefId
string or null <= 50 characters
Example: OrderRefId=PO-2026-0042

Optional external order reference identifier.

SubscriptionRefId
string or null <= 50 characters
Example: SubscriptionRefId=sub_1QxYz...

Optional external billing provider subscription reference identifier.

Responses

Response Schema: application/json
id
string <ZenmeterSubscriptionId>

Subscription identifier.

subscriptionRevision
integer <int32>

Revision of the subscription consumption configuration.

object (SubscriptionCustomerModel)
id
string <CustomerId>

Customer identifier.

name
string

Customer display name.

accountRefId
string or null

External account reference identifier.

object (SubscriptionOfferingModel)
productName
string

Product display name.

productId
string <ZenmeterProductId>

Product identifier.

offeringName
string

Offering display name.

sku
string

Offering SKU.

object (Interval)
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute" "second"
count
integer or null [ 1 .. 32767 ]

Number of units for interval

object (BillingReferenceModel)

Identifies an external billing order and, optionally, the billing system that issued it.

orderRefId
string

External order reference identifier.

billingSystem
string or null

Optional billing system that issued the order reference.

subscriptionRefId
string or null

Optional billing provider subscription reference identifier.

object (SubscriptionStatusModel)
status
string (SubscriptionStatus)
Enum: "active" "gracePeriod" "expired"

Lifecycle state of a Zenmeter subscription.

expiryDate
string <date-time>

Subscription expiry timestamp in UTC.

gracePeriodExpiry
string <date-time>

Grace period end timestamp in UTC.

disabledAt
string or null <date-time>

Timestamp when the subscription was disabled in UTC.

customerDisabledAt
string or null <date-time>

Timestamp when the subscription customer was disabled in UTC.

cancelledAt
string or null <date-time>

Timestamp when subscription cancellation was requested in UTC.

trial
boolean

Indicates whether the subscription is in trial period.

createdAt
string <date-time>

Timestamp when the subscription was created.

businessModel
string

Billing business model.

businessModelId
string <BusinessModelId>

Billing business model identifier.

userCount
integer <int32>

Number of active users assigned to the subscription.

Array of objects (SubscriptionAddonModel)

Enabled add-ons.

Array
id
string <ZenmeterSubscriptionAddonId>

Subscription add-on identifier.

sku
string

Add-on SKU.

offeringName
string

Add-on offering display name.

createdAt
string <date-time>

Timestamp when the add-on was attached in UTC.

expiryDate
string or null <date-time>

Add-on expiry timestamp in UTC.

object (AddonOfferingTermModel)
object (SubscriptionAddonStatusModel)
object (BillingReferenceModel)

Identifies an external billing order and, optionally, the billing system that issued it.

billingPeriod
string (BillingPeriod)
Enum: "monthly" "yearly"

Billing cadence used by subscriptions and recurring add-ons.

object (UsageResetPolicyModel)
mode
string (ConsumptionResetMode)
Enum: "never" "onInterval"

Defines whether included usage resets automatically and, if so, on a configured interval.

object (Interval)
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute" "second"
count
integer or null [ 1 .. 32767 ]

Number of units for interval

currentUsagePeriodStart
string <date-time>

Start of current usage period in UTC.

nextUsageResetAt
string or null <date-time>

Planned timestamp for next usage reset in UTC.

Response samples

Content type
application/json
{
  • "id": "zm-sub_oH_hPJ3BgEO172Yd9-KuTg",
  • "subscriptionRevision": 17,
  • "customer": {
    },
  • "offering": {
    },
  • "gracePeriod": {
    },
  • "billingReference": {
    },
  • "subscriptionRefId": "sub_1QxYz...",
  • "statusInfo": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "businessModel": "usage-based",
  • "businessModelId": "zm-bm_oH_hPJ3BgEO187Yd9-kuTg",
  • "userCount": 12,
  • "addons": [
    ],
  • "billingPeriod": "monthly",
  • "usageResetPolicy": {
    },
  • "currentUsagePeriodStart": "2019-08-24T14:15:22Z",
  • "nextUsageResetAt": "2019-08-24T14:15:22Z"
}

Consumption

Consume usage-based Zenmeter subscription features, inspect the resulting usage state, and browse recorded usage-event history.

Consume subscription feature

Consumes the requested amount for a usage feature and returns resolved feature and bucket state. For insufficient balance, this endpoint returns HTTP 402 with ConsumeFeatureErrorResponse instead of the standard success payload. The error response includes a Data snapshot with current usage buckets.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Request Body schema: application/json
required

Feature-consumption request payload

featureKey
required
string [ 1 .. 50 ] characters

Requested usage feature key to consume. Rate-based features can be charged to a backing meter such as credits.

required
object (SubscriptionUserReferenceModel)
type
required
string (SubscriptionUserIdentityType)
subscriptionUserId
required
string <ZenmeterSubscriptionUserId>

Zenmeter subscription user identifier whose usage should be charged.

amount
required
integer <int64> [ 1 .. 1000000000000000 ]

Requested feature amount to consume.

operationId
string or null <= 50 characters

Optional idempotency key that prevents duplicate consumption for the same subscription for 24 hours. UUID values are recommended.

Responses

Response Schema: application/json
subscriptionRevision
integer <int32>

Revision of the subscription consumption configuration used by this result.

requestedFeatureKey
string

Feature key requested by the caller.

requestedAmount
integer <int64>

Amount requested for this consume operation.

conversionRate
number <decimal>

Conversion rate between requested feature and charged balance-owner feature. Equals 1 If the balance owner it the consumed feature.

object (BalanceSnapshotModel)
object (BalanceOwnerReferenceModel)

API model referencing the feature or meter that owns a subscription balance.

balanceOwnerKey
string

Feature or meter key that owns the subscription balance.

balanceOwnerKind
string (BalanceOwnerKind)
Enum: "feature" "meter"
Array of objects (BalanceBucketModel)

Buckets currently backing this balance owner.

Array
subscriptionAddonId
string or null <ZenmeterSubscriptionAddonId>

Add-on identifier for add-on buckets; otherwise null.

bucketType
string (BucketType)
Enum: "shared" "user" "addonShared"

Identifies whether consumed usage came from shared subscription balance, per-user balance, or shared add-on balance.

used
number <decimal>

Amount already consumed from this bucket.

available
number <decimal>

Remaining amount available for consumption, if limited.

limit
integer <int64>

Effective bucket limit, if defined.

Request samples

Content type
application/json
{
  • "featureKey": "ai_requests",
  • "userIdentity": {
    },
  • "amount": 40,
  • "operationId": "consume-ai-requests-20260606-0001"
}

Response samples

Content type
application/json
{
  • "subscriptionRevision": 17,
  • "requestedFeatureKey": "ai_requests",
  • "requestedAmount": 40,
  • "conversionRate": 2.5,
  • "balanceSnapshot": {
    }
}

Get subscription usage events

Returns successful usage events recorded for a Zenmeter subscription, ordered by creation time, newest first. Events no older than 90 days are returned. Both UTC period bounds are required, and the requested interval cannot exceed seven days.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

query Parameters
pageNumber
integer <int32>
Example: pageNumber=1

Requested page number

pageSize
integer <int32>
Example: pageSize=10

Maximum number of items per page

periodStart
required
string <date-time>

Inclusive start of the UTC event-time range.

periodEnd
required
string <date-time>

Exclusive end of the UTC event-time range.

subscriptionUserId
string or null <ZenmeterSubscriptionUserId>
Example: subscriptionUserId=zm-sub-user_pJ2kJrFzE2HStEdPdRi9g

Optional subscription user identifier filter. Mutually exclusive with ExternalUserId.

externalUserId
string or null <= 50 characters
Example: externalUserId=user-42

Optional exact external user identifier filter. Mutually exclusive with SubscriptionUserId.

consumingFeatureKey
string or null <= 50 characters
Example: consumingFeatureKey=ai_requests

Optional exact consuming feature key filter.

meterKey
string or null <= 50 characters
Example: meterKey=credits

Optional exact meter key filter; includes usage from all consuming features sharing the meter.

operationId
string or null <= 50 characters
Example: operationId=consume-ai-requests-20260606-0001

Optional exact operation ID filter. More than one event may match across users, features, or time.

Responses

Response Schema: application/json
Array of objects (UsageEventListItemModel)

Array of items matching specified query filters

Array
createdAt
string <date-time>

UTC timestamp when the event was recorded.

subscriptionUserId
string <ZenmeterSubscriptionUserId>

Subscription user charged by the event.

externalUserId
string

External identifier of the charged subscription user.

featureKey
string

Consumed subscription feature key.

requestedAmount
integer <int64>

Feature amount requested by the caller.

chargedAmount
number <decimal>

Balance-owner amount charged for the request.

operationId
string or null

Optional idempotency operation identifier.

Array of objects (UsageEventUsageModel)

One entry per balance bucket that contributed to the event.

pageSize
integer <int32>

Requested page size or default page size if not specified

pageNumber
integer <int32>

Requested page number or first page if not specified

elementsTotal
integer <int32>

Total number of elements matching filter criteria

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pageSize": 10,
  • "pageNumber": 1,
  • "elementsTotal": 1
}

Subscription add-ons

Attach and manage add-ons for existing Zenmeter subscriptions.

Add subscription add-ons

Adds one or more add-on SKUs to an existing subscription.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Request Body schema: application/json
required

Request payload containing add-on SKUs and quantities.

required
Array of objects (SubscriptionLineItemApiRequest) non-empty

Ordered add-on offering SKUs and quantities to attach to the subscription.

Array (non-empty)
sku
required
string [ 1 .. 50 ] characters

Offering SKU.

quantity
required
integer <int32> [ 1 .. 2147483647 ]

Number of logical units represented by this line item.

object (BillingReferenceApiRequest)

Request payload identifying an external billing order and its optional billing system.

orderRefId
string or null <= 50 characters

External order reference identifier.

billingSystem
string or null <= 50 characters

Optional billing system that issued the order reference.

Responses

Request samples

Content type
application/json
{
  • "lineItems": [
    ],
  • "billingReference": {
    }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Cancel subscription add-on

Requests cancellation of a single subscription add-on. Recurring add-ons remain active until subscription renewal.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

subscriptionAddonId
required
string <ZenmeterSubscriptionAddonId>
Example: zm-sub-addon_ff7QkJrFzE2HStEdPdRing

Add-on identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Revert subscription add-on cancellation

Reverts a pending cancellation for a recurring add-on before the add-on expires.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

subscriptionAddonId
required
string <ZenmeterSubscriptionAddonId>
Example: zm-sub-addon_ff7QkJrFzE2HStEdPdRing

Add-on identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Subscription users

Create, retrieve, update, enable, and disable Zenmeter subscription users.

Create subscription user

Creates a user under a Zenmeter subscription.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

Request Body schema: application/json
required

Properties required to create a subscription user

externalUserId
required
string [ 1 .. 50 ] characters

External user identifier. Must be unique.

firstName
string or null <= 50 characters

User first name.

lastName
string or null <= 50 characters

User last name.

email
string or null <email> <= 100 characters

User email address.

Responses

Request samples

Content type
application/json
{
  • "externalUserId": "user-42",
  • "firstName": "Casey",
  • "lastName": "Jones",
  • "email": "casey.jones@example.com"
}

Response samples

Content type
application/json
{
  • "subscriptionUserId": "zm-sub-user_pJ2kJrFzE2HStEdPdRi9g",
  • "externalUserId": "user-42",
  • "firstName": "Casey",
  • "lastName": "Jones",
  • "email": "casey.jones@example.com",
  • "status": "enabled",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastEnabledAt": "2019-08-24T14:15:22Z",
  • "lastDisabledAt": "2019-08-24T14:15:22Z"
}

Get subscription user list

Returns a paginated list of users for a Zenmeter subscription.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

query Parameters
pageNumber
integer <int32>
Example: pageNumber=1

Requested page number

pageSize
integer <int32>
Example: pageSize=10

Maximum number of items per page

Responses

Response Schema: application/json
Array of objects (SubscriptionUserListItemModel)

Array of items matching specified query filters

Array
subscriptionUserId
string <ZenmeterSubscriptionUserId>

Subscription user identifier.

externalUserId
string

External user identifier.

firstName
string or null

User first name.

lastName
string or null

User last name.

email
string or null

User email address.

status
string (SubscriptionUserStatus)
Enum: "enabled" "disabled"

Lifecycle state of a Zenmeter subscription user.

createdAt
string <date-time>

User creation timestamp in UTC.

updatedAt
string or null <date-time>

Last user update timestamp in UTC.

lastEnabledAt
string <date-time>

Timestamp when the user was last enabled in UTC.

lastDisabledAt
string or null <date-time>

Timestamp when the user was last disabled in UTC.

pageSize
integer <int32>

Requested page size or default page size if not specified

pageNumber
integer <int32>

Requested page number or first page if not specified

elementsTotal
integer <int32>

Total number of elements matching filter criteria

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pageSize": 10,
  • "pageNumber": 1,
  • "elementsTotal": 1
}

Get subscription user

Returns a single Zenmeter subscription user by identifier from a Zenmeter subscription.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

subscriptionUserId
required
string <ZenmeterSubscriptionUserId>
Example: zm-sub-user_pJ2kJrFzE2HStEdPdRi9g

Zenmeter subscription user identifier.

Responses

Response Schema: application/json
subscriptionUserId
string <ZenmeterSubscriptionUserId>

Subscription user identifier.

externalUserId
string

External user identifier.

firstName
string or null

User first name.

lastName
string or null

User last name.

email
string or null

User email address.

status
string (SubscriptionUserStatus)
Enum: "enabled" "disabled"

Lifecycle state of a Zenmeter subscription user.

createdAt
string <date-time>

User creation timestamp in UTC.

updatedAt
string or null <date-time>

Last user update timestamp in UTC.

lastEnabledAt
string <date-time>

Timestamp when the user was last enabled in UTC.

lastDisabledAt
string or null <date-time>

Timestamp when the user was last disabled in UTC.

Response samples

Content type
application/json
{
  • "subscriptionUserId": "zm-sub-user_pJ2kJrFzE2HStEdPdRi9g",
  • "externalUserId": "user-42",
  • "firstName": "Casey",
  • "lastName": "Jones",
  • "email": "casey.jones@example.com",
  • "status": "enabled",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastEnabledAt": "2019-08-24T14:15:22Z",
  • "lastDisabledAt": "2019-08-24T14:15:22Z"
}

Update subscription user

Replaces mutable subscription user properties.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

subscriptionUserId
required
string <ZenmeterSubscriptionUserId>
Example: zm-sub-user_pJ2kJrFzE2HStEdPdRi9g

Zenmeter subscription user identifier.

Request Body schema: application/json
required

Properties to update for a subscription user

firstName
string or null <= 50 characters

User first name.

lastName
string or null <= 50 characters

User last name.

email
string or null <email> <= 100 characters

User email address.

Responses

Request samples

Content type
application/json
{
  • "firstName": "Casey",
  • "lastName": "Jones",
  • "email": "casey.jones@example.com"
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Get subscription user balance

Returns the current stored balance view for one subscription user across all balance owners.

A balance owner is either a directly consumable feature, for example advanced_reports, or a backing meter such as credits.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

subscriptionUserId
required
string <ZenmeterSubscriptionUserId>
Example: zm-sub-user_pJ2kJrFzE2HStEdPdRi9g

Zenmeter subscription user identifier.

Responses

Response Schema: application/json
subscriptionRevision
integer <int32>

Revision of the subscription consumption configuration used by this result.

Array of objects (BalanceSnapshotModel)

Balance snapshots for the requested subscription user.

Array
object (BalanceOwnerReferenceModel)

API model referencing the feature or meter that owns a subscription balance.

Array of objects (BalanceBucketModel)

Buckets currently backing this balance owner.

Response samples

Content type
application/json
{
  • "subscriptionRevision": 17,
  • "balanceSnapshots": [
    ]
}

Disable subscription user

Disables a Zenmeter subscription user. Disabled user can not consume features. Effective immediately.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

subscriptionUserId
required
string <ZenmeterSubscriptionUserId>
Example: zm-sub-user_pJ2kJrFzE2HStEdPdRi9g

Zenmeter subscription user identifier.

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Enable subscription user

Re-enables a Zenmeter subscription user. The user can consume features. Effective immediately.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

subscriptionUserId
required
string <ZenmeterSubscriptionUserId>
Example: zm-sub-user_pJ2kJrFzE2HStEdPdRi9g

Zenmeter subscription user identifier.

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Get subscription user by external user identifier

Returns a single Zenmeter subscription user by external user identifier from a Zenmeter subscription.

Authorizations:
Bearer
path Parameters
subscriptionId
required
string <ZenmeterSubscriptionId>
Example: zm-sub_oH_hPJ3BgEO172Yd9-KuTg

Subscription identifier

query Parameters
externalUserId
string <= 50 characters
Example: externalUserId=user-42

External user identifier.

Responses

Response Schema: application/json
subscriptionUserId
string <ZenmeterSubscriptionUserId>

Subscription user identifier.

externalUserId
string

External user identifier.

firstName
string or null

User first name.

lastName
string or null

User last name.

email
string or null

User email address.

status
string (SubscriptionUserStatus)
Enum: "enabled" "disabled"

Lifecycle state of a Zenmeter subscription user.

createdAt
string <date-time>

User creation timestamp in UTC.

updatedAt
string or null <date-time>

Last user update timestamp in UTC.

lastEnabledAt
string <date-time>

Timestamp when the user was last enabled in UTC.

lastDisabledAt
string or null <date-time>

Timestamp when the user was last disabled in UTC.

Response samples

Content type
application/json
{
  • "subscriptionUserId": "zm-sub-user_pJ2kJrFzE2HStEdPdRi9g",
  • "externalUserId": "user-42",
  • "firstName": "Casey",
  • "lastName": "Jones",
  • "email": "casey.jones@example.com",
  • "status": "enabled",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "lastEnabledAt": "2019-08-24T14:15:22Z",
  • "lastDisabledAt": "2019-08-24T14:15:22Z"
}