Skip to main content
PUT
/
v1
/
users
/
{user_id}
/
billing
/
subscription
Set tenant subscription
curl --request PUT \
  --url https://api.usenaive.ai/v1/users/{user_id}/billing/subscription \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "planKey": "<string>",
  "status": "active",
  "stripeCustomerId": "<string>",
  "stripeSubscriptionId": "<string>",
  "currentPeriodEnd": "2023-11-07T05:31:56Z",
  "assignKit": true
}
'
{}

Authorizations

Authorization
string
header
required

Workspace API key. Create one via the dashboard or POST /v1/auth/keys.

Path Parameters

user_id
string
required

Tenant user UUID, or default / me for the operator's default user.

Body

application/json
planKey
string
required
status
string
default:active
stripeCustomerId
string
stripeSubscriptionId
string
currentPeriodEnd
string<date-time>
assignKit
boolean
default:true

Response

OK.

The response is of type object.