create_subscription

Create an auto-renewable subscription within a subscription group.

Parameters

ParameterTypeRequiredDescription
projectIdstringYesThe project ID
groupIdstringConditionalExisting subscription group ID
newGroupNamestringConditionalCreate new group with this name
productIdstringYesUnique product ID
namestringYesReference name
subscriptionPeriodstringYesONE_WEEK, ONE_MONTH, TWO_MONTHS, THREE_MONTHS, SIX_MONTHS, ONE_YEAR
groupLevelnumberNoService level (1 = highest tier, default: 1)
familyShareablebooleanNoEnable family sharing (default: false)

Example Usage

Natural Language Promptstext
"Create a monthly premium subscription at $9.99"
"Add an annual subscription to the Premium group"
"Create a new Pro subscription group with monthly and yearly options"

Response

{
"success": true,
"group": {
"id": "group_xyz",
"referenceName": "Premium",
"syncStatus": "pending_creation"
},
"subscription": {
"id": "sub_abc123",
"productId": "com.app.premium_monthly",
"name": "Premium Monthly",
"subscriptionPeriod": "ONE_MONTH",
"groupLevel": 1,
"syncStatus": "pending_creation"
}
}