Skip to main content

Update User Plan

Update the subscription plan for an existing user within your enterprise account. This endpoint allows enterprise administrators to manage user access levels and subscription tiers.

API Endpoint

POST enterprise/update-user-plan

Authentication

This endpoint requires Enterprise API key authentication. Include your API key in the request headers:

sivi-api-key: YOUR_ENTERPRISE_API_KEY
Enterprise Admin Access Required

This endpoint can only be accessed using an Enterprise Admin API key. Regular API keys do not have sufficient privileges.

Request Body

{
"abstractUserId": "281743-2322-34i44sd3-dkfjgdkjf292",
"planId": "ent-01"
}

Request Parameters

ParameterTypeRequiredDescription
abstractUserIdstringYesUnique identifier for the existing user
planIdstringYesNew plan identifier to assign to the user

Response

Successful Update

{
"status": 200,
"body": {
"message": "Successfully updated the user plan",
"nextBillingDate": 179842232232,
"type": "upgrade"
}
}

User Not Found

{
"status": 400,
"body": {
"message": "User does not exists"
}
}

Authentication Error

{
"status": 401,
"body": {
"message": "Failed to authenticate request. Please add sivi-api-key header in request"
}
}

Response Fields

FieldTypeDescription
messagestringStatus message confirming the plan update
availableCreditsstringNumber of design credits available in the new plan
nextBillingDatenumberUnix timestamp for the next billing cycle
typestringType of plan update: "upgrade" or "downgrade"

Usage Notes

  • This API only works with existing users. If you need to create a new user, use the Login User API first
  • The operation will fail if the user doesn't exist in Sivi's system
  • Plan changes take effect immediately for upgrade and end of the billing date for the downgrade
  • Plans will be pre-configured during the enterprise onboarding

Example

curl -X POST "https://connect.sivi.ai/api/prod/v2/enterprise/update-user-plan" \
-H "sivi-api-key: YOUR_ENTERPRISE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"abstractUserId": "user-12345",
"planId": "ent-premium-01"
}'
  • Login User - Create a new user or login an existing user