Add generic subscription
Enterprise Only
This endpoint is only available in the Enterprise package and requires the authenticated user to be a Super Admin.
Add a generic subscription to a workspace. Generic subscriptions are managed internally without a payment platform. If the workspace has an existing subscription, it will be canceled and deleted before adding the generic subscription.
Method: POST
URL: https://example.com/<MIXPOST_CORE_PATH>/api/panel/workspaces/{workspaceUuid}/subscription/generic
Authorization: Bearer <token>
Body:
{
"plan_id": 1,
"trial_days": 14,
"keep_prev_trial_ends_at": false
}
| Key | Format | Required | Description |
|---|---|---|---|
plan_id | integer | required | The ID of the subscription plan defined in Mixpost Dashboard |
trial_days | integer | optional | Number of trial days (0-365). If not provided, uses the default trial days from billing configuration. |
keep_prev_trial_ends_at | boolean | required | Whether to keep the previous trial end date if one exists |
Response:
- 200
- 401
- 403
- 404
- 422
{
"success": true
}
{
"message": "Unauthenticated."
}
{
"message": "Access forbidden."
}
{
"message": "Workspace not found."
}
{
"message": "Validation errors",
"errors": {}
}