Reset Subscription (New Group) API

Reset user subscription and assign them to a new group/plan with fresh settings

Admin

Reset Subscription with New Group API

Reset a user's subscription and move them to a new plan. Combine a fresh subscription start with a group change in one operation.

Complete Reset

Fresh subscription start.

New Plan

Assign to different group.

New Settings

Apply new group defaults.


Endpoint Overview

MUTATION/graphql

Reset a user's subscription and assign them to a new group simultaneously. The subscription will start fresh with the new group's default parameters.

Authentication:Bearer Token
Required scopes:admin

Request Parameters

usernameString!Required

The username of the user whose subscription should be reset.

groupIdInt!Required

The ID of the new group to assign the user to.


GraphQL Mutation

mutation resetUserSubscriptionWithNewGroup($username: String!, $groupId: Int!) {
  resetUserSubscriptionWithNewGroup(username: $username, groupId: $groupId) {
    duration
    multiLoginCount
    expiresAt
    createdAt
    updatedAt
    dailyBandwidth
    downloadUpload
  }
}

Variables:

{
  "username": "johndoe",
  "groupId": 200
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
  -d '{
    "query": "mutation resetUserSubscriptionWithNewGroup($username: String!, $groupId: Int!) { resetUserSubscriptionWithNewGroup(username: $username, groupId: $groupId) { duration expiresAt multiLoginCount dailyBandwidth } }",
    "variables": {
      "username": "johndoe",
      "groupId": 200
    }
  }'

Response

200Subscription Reset with New Group
{
  "data": {
    "resetUserSubscriptionWithNewGroup": {
      "duration": 30,
      "multiLoginCount": 5,
      "expiresAt": "2024-03-15T10:30:00Z",
      "createdAt": "2024-02-14T08:00:00Z",
      "updatedAt": "2024-02-14T08:00:00Z",
      "dailyBandwidth": "unlimited",
      "downloadUpload": "unlimited"
    }
  }
}
400Invalid Group
{
  "errors": [
    {
      "message": "Group with ID 200 not found",
      "path": ["resetUserSubscriptionWithNewGroup"],
      "extensions": {
        "code": "INVALID_GROUP"
      }
    }
  ],
  "data": null
}
400User Not Found
{
  "errors": [
    {
      "message": "User with username 'johndoe' not found",
      "path": ["resetUserSubscriptionWithNewGroup"],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ],
  "data": null
}

Plan Changes Applied

Duration

Uses new group's subscription period.

Login Limits

New group's concurrent session limit.

Bandwidth

New group's daily data allowance.

Speed

New group's connection speed limits.


Use Cases

Plan Upgrade

Move user to premium tier.

Plan Downgrade

Switch to more affordable option.

Fix Issues

Resolve subscription problems with fresh start.

Migration

Move users between plans programmatically.


Best Practices

Verify Group

Confirm target group exists and is appropriate.

Compare Plans

Understand differences between old and new.

Notify User

Inform user of plan change.

Handle Billing

Process any payment differences.



Complete Reset

This resets the subscription entirely with new group settings. The previous subscription's remaining time will not be carried over. Any custom modifications will be lost.

Just Need to Extend Time?

If you only want to add more days without changing the plan, use Renew Without Group instead.

Renew Without Group