Skip to main content

End Handbook Subscription

End a handbook subscription. Changes the subscription status from SUBSCRIPTION to UNSUBSCRIBED.

Mutation

mutation EndHandbookSubscription($handbookId: Int!) {
endHandbookSubscription(handbookId: $handbookId)
}

Parameters

ParameterTypeRequiredDescription
handbookIdInt!YesHandbook ID to end subscription for

Response

{
"data": {
"endHandbookSubscription": true
}
}

Examples

End Subscription

mutation {
endHandbookSubscription(handbookId: 123)
}

With Variables

mutation EndSubscription($handbookId: Int!) {
endHandbookSubscription(handbookId: $handbookId)
}

Variables:

{
"handbookId": 123
}

Error Responses

Handbook Not Found

{
"errors": [
{
"message": "Handbook not found",
"extensions": {
"code": "NOT_FOUND"
}
}
]
}

Access Denied

{
"errors": [
{
"message": "Handbook not found or access denied",
"extensions": {
"code": "FORBIDDEN"
}
}
]
}

Subscription Not Active

{
"errors": [
{
"message": "Handbook subscription is not active",
"extensions": {
"code": "BAD_USER_INPUT"
}
}
]
}

Notes

  • Requires reseller API key authentication
  • The handbook must belong to a customer of the authenticated reseller
  • Only handbooks with subscriptionStatus: SUBSCRIPTION can be unsubscribed
  • The handbook's subscription status will be changed to UNSUBSCRIBED
  • The unsubscribe timestamp is automatically recorded
  • The handbook itself is not deleted, only the subscription status is changed
  • Once unsubscribed, the handbook will no longer receive policy updates via the policy feed endpoint