Learn how to retrieve an account's seat count data using the platform API
Seat-based pricing is one pricing method available for marketplace apps. In this method, users purchase an app subscription based on the size of their monday account.
When users make a purchase, our UI will intuitively recommend an app plan based on their monday account size. Seats fluctuate over time, so developers must monitor account size to ensure compliance using the apps_monetization_info API.
Queries
You can use the apps_monetization_info query to retrieve account seat data via the API.
- Required scope:
account:read - Returns an integer representing the number of seats in an account
- Can only be queried directly at the root; can't be nested within another query
query {
apps_monetization_info {
seats_count
}
}import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });
const query = "query { apps_monetization_info { seats_count } }";
const response = await mondayApiClient.request(query);{
"data": {
"apps_monetization_info": {
"seats_count": 3
}
},
"extensions": {
"request_id": "YOUR_REQUEST_ID"
}
}Fields
You can use the following fields to specify what information your apps_monetization_info query will return.
Field | Description |
|---|---|
seats_count
|
|
Error Handling
Refer to the API error handling for a list of common error types, retry strategies, and troubleshooting examples.
When calling apps_monetization_info, you may occasionally see standard GraphQL or HTTP errors. Here are the most common categories to check:
| Error Type | Description | Next Steps |
|---|---|---|
| Permission or scope error | The app token doesn’t include the required account:read scope. | Re-authorize the app requesting account:read. |
| Validation error | The query is nested incorrectly or contains a typo. | Ensure apps_monetization_info is queried at the root level and field names match the docs. |
| Rate-limit error | Too many requests in a short period. | Abide by Retry-After headers before trying your request again. |
| Server or network error | Temporary outage or connectivity issue. | Retry with backoff; if it persists, contact monday.com support with the request_id. |
