Learn how to query app subscription data using the monday.com platform API
App monetization utilizes subscriptions as a billing contract between a user and an app. Each subscription contains unique data about the user's billing frequency, plan type, and renewal period.
Queries
You can use the app_subscriptions query to retrieve your app's subscription data via the API.
- Only works for app collaborators
- Limit: 120 times per minute
- Returns an array containing data about all of your app's subscriptions
- Can only be queried directly at the root; can't be nested within another query
If you only want to query a specific account's subscription from the context of your app, use the
app_subscriptionobject instead.
query {
app_subscriptions(
app_id: 1234567890
) {
cursor
total_count
subscriptions {
account_id
monthly_price
currency
}
}
}import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });
const query = "query($appId:ID!) { app_subscriptions (app_id: $appId) { cursor total_count subscriptions { account_id monthly_price currency } } }";
const variables = {
appId: 123456789,
};
const response = await mondayApiClient.request(query, variables);Arguments
You can use the following arguments to reduce the number of app subscriptions returned.
Fields | Description | Enum Values |
|---|---|---|
account_id | The account's unique identifier. | |
app_id | The app's unique identifier. | |
cursor | An opaque token representing the position in a set of results to fetch subscriptions from. Use this to paginate through large result sets. | |
limit | The number of subscriptions to return. The default is 100, but the maximum is 500. | |
status | The subscription's status. |
|
Fields
You can use the following fields to specify what information your app_subscriptions query will return. Some fields support their own subfields.
Fields | Description | Supported Subfields |
|---|---|---|
cursor | An opaque cursor that represents the position in the list after the last returned subscription. Use this cursor for pagination to fetch the next set of subscriptions. If the cursor is null, there are no more subscriptions to fetch. | |
subscriptions | Further details about the app's subscriptions. | account_id |
total_count | The total number of subscriptions. |
