PATCH
/
v3
/
billing
/
subscription
Update Subscription
curl --request PATCH \
  --url http://127.0.0.1:3333/v3/billing/subscription \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "returnUrl": "<string>",
  "plan": "CORE"
}
'
{
  "workspace": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "icon": "<string>",
    "plan": "HOBBY",
    "stripeId": "<string>",
    "settings": {
      "groupTitlesAutoGeneration": {
        "isEnabled": true,
        "provider": "<string>",
        "credentialsId": "<string>",
        "model": "<string>",
        "prompt": "<string>"
      }
    },
    "isQuarantined": true,
    "isSuspended": true,
    "isPastDue": true,
    "isVerified": true,
    "lastActivityAt": "2023-11-07T05:31:56Z",
    "creditsRecurring": 123,
    "creditsPurchased": 123,
    "billingStrategy": "PREPAID",
    "overageCapAmount": 123,
    "autoRechargeEnabled": true,
    "autoRechargeTrigger": 123,
    "autoRechargeAmount": 123,
    "customMonthlyCredits": 123,
    "customStorageLimit": 123,
    "customSeatsLimit": 123,
    "billingCurrency": "brl",
    "resolvedCreditsLimit": 123,
    "resolvedSeatsLimit": 123,
    "resolvedStorageLimit": 123,
    "members": [
      {
        "workspaceId": "<string>",
        "userId": "<string>",
        "user": {
          "name": "<string>",
          "email": "<string>",
          "image": "<string>"
        },
        "role": "ADMIN"
      }
    ],
    "invitations": [
      {
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "email": "<string>",
        "type": "ADMIN"
      }
    ]
  },
  "checkoutUrl": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

workspaceId
string
required

Body

application/json
returnUrl
string
required
plan
enum<string>
required
Available options:
CORE,
SCALE,
DEDICATED
forceCheckout
boolean
currency
string

Response

Default Response

workspace
object
checkoutUrl
string | null