Delete Group API
Remove a subscription group (plan) from the system permanently
Delete Group API
Permanently remove subscription plans from the system. Use with caution as this may affect existing subscriptions and user access.
Permanent Removal
Completely remove subscription plan.
User Impact
May affect existing subscribers.
Admin Only
Requires administrative privileges.
Endpoint Overview
/graphqlDelete a subscription group by its ID. This operation is permanent and may affect users currently subscribed to this plan.
Request Parameters
idInt!RequiredThe unique identifier of the group to delete.
GraphQL Mutation
mutation deleteGroup($id: Int!) {
deleteGroup(id: $id)
}Variables:
{
"id": 15
}HTTP Request:
curl -X POST https://api.orbnet.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
-d '{
"query": "mutation deleteGroup($id: Int!) { deleteGroup(id: $id) }",
"variables": {
"id": 15
}
}'Response
{
"data": {
"deleteGroup": true
}
}{
"errors": [
{
"message": "Group not found",
"path": ["deleteGroup"],
"extensions": {
"code": "NOT_FOUND"
}
}
],
"data": null
}{
"errors": [
{
"message": "Cannot delete group with active subscribers",
"path": ["deleteGroup"],
"extensions": {
"code": "HAS_ACTIVE_SUBSCRIBERS",
"subscriberCount": 50
}
}
],
"data": null
}Before Deleting
Check Subscribers
Verify no active users are on this plan.
Migrate Users
Move existing subscribers to another plan first.
Hide Instead
Consider hiding from new signups instead of deleting.
Export Data
Backup plan configuration before deletion.
Deletion Consequences
Plan Removed
Plan no longer available for new subscriptions.
User Impact
Existing subscribers may need migration.
No Recovery
Cannot undo deletion - must recreate if needed.
Config Lost
All plan settings are permanently removed.
Best Practices
Verify ID
Double-check the group ID before deleting.
Empty First
Migrate all subscribers before deletion.
Document
Record reason for deletion in your logs.
Soft Delete
Consider hiding instead of permanent deletion.
Related Endpoints
Irreversible Action
Deleting a group is permanent. Consider using the edit endpoint to hide the plan from new signups instead of deleting it entirely.
Review Group Details
Check the group's current subscribers and configuration before proceeding with deletion.