Update Handbook Limit
Update the global handbook generation limit for all users under this reseller. If updateAllUserCustomLimits is true, also updates all existing user-specific limits to match the new global limit.
Note: To update the handbook limit for a single customer, use updateCustomer instead.
Mutation
mutation UpdateDefaultCustomerHandbookLimit(
$limit: Int!
$updateAllUserCustomLimits: Boolean
) {
updateDefaultCustomerHandbookLimit(
limit: $limit
updateAllUserCustomLimits: $updateAllUserCustomLimits
) {
limit
usersUpdated
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | Int! | Yes | New global handbook limit for all users under this reseller |
updateAllUserCustomLimits | Boolean | No | If true, updates all existing user-specific limits (customer_handbook_limit) to match the new global limit |
Response
{
"data": {
"updateDefaultCustomerHandbookLimit": {
"limit": 50,
"usersUpdated": 15
}
}
}
Examples
Update Global Limit Only
This updates the global limit but leaves existing user-specific limits unchanged:
mutation {
updateDefaultCustomerHandbookLimit(limit: 50) {
limit
usersUpdated
}
}
Response:
{
"data": {
"updateDefaultCustomerHandbookLimit": {
"limit": 50,
"usersUpdated": null
}
}
}
Update Global Limit and All User Limits
This updates both the global limit and all existing user-specific limits:
mutation {
updateDefaultCustomerHandbookLimit(
limit: 100
updateAllUserCustomLimits: true
) {
limit
usersUpdated
}
}
Response:
{
"data": {
"updateDefaultCustomerHandbookLimit": {
"limit": 100,
"usersUpdated": 25
}
}
}
With Variables
mutation UpdateLimit($limit: Int!, $updateAll: Boolean) {
updateDefaultCustomerHandbookLimit(
limit: $limit
updateAllUserCustomLimits: $updateAll
) {
limit
usersUpdated
}
}
Variables:
{
"limit": 75,
"updateAll": true
}
Response Fields
| Field | Type | Description |
|---|---|---|
limit | Int! | The updated global handbook limit |
usersUpdated | Int | Number of users that had their custom limits updated (if updateAllUserCustomLimits was true) |
How Limits Work
- Global Limit: The default limit for all users under the reseller
- User-Specific Limit: Can be set per customer using
handbookLimitincreateHandbookCustomerorupdateHandbookCustomer - Effective Limit: Users with a custom limit use that; others use the global limit
Example Scenario
Global Limit: 50
- User A: No custom limit → Uses 50
- User B: Custom limit 100 → Uses 100
- User C: Custom limit 25 → Uses 25
After updating global limit to 75 with updateAllUserCustomLimits: true:
Global Limit: 75
- User A: No custom limit → Uses 75
- User B: Custom limit 75 → Uses 75 (updated from 100)
- User C: Custom limit 75 → Uses 75 (updated from 25)
After updating global limit to 100 with updateAllUserCustomLimits: false:
Global Limit: 100
- User A: No custom limit → Uses 100
- User B: Custom limit 75 → Uses 75 (unchanged)
- User C: Custom limit 75 → Uses 75 (unchanged)
Error Responses
Invalid Limit
{
"errors": [
{
"message": "Limit must be a positive number",
"extensions": {
"code": "BAD_USER_INPUT"
}
}
]
}
Notes
- Requires reseller API key authentication
- The limit applies to handbook generation via the GraphQL API
- Setting
updateAllUserCustomLimits: truewill override all existing user-specific limits - New customers created after this update will use the new global limit (unless a custom limit is specified)
- Limits are enforced per customer, not per reseller
- The limit must be a positive integer (0 or greater)
- To update the limit for a single customer, use
updateCustomerwith thehandbookLimitfield instead of this mutation