curl --request PUT \
--url https://app.dynamicauth.com/api/v0/organizations/{organizationId}/billing/subscription/coupon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"coupon": "An example name"
}
'{
"hasPaymentMethod": true,
"planType": "free",
"inTrial": true,
"scope": [
"<string>"
],
"version": "<string>",
"billingPortalUrl": "<string>",
"billingPortalAddPaymentMethodUrl": "<string>",
"trialStart": "2023-11-07T05:31:56Z",
"trialEnd": "2023-11-07T05:31:56Z",
"trialDaysLeft": 123,
"currentBillingPeriod": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"usagesCount": 123
},
"shouldLockEnvironmentSwitch": true,
"coupons": [
{
"coupon": "An example name"
}
]
}curl --request PUT \
--url https://app.dynamicauth.com/api/v0/organizations/{organizationId}/billing/subscription/coupon \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"coupon": "An example name"
}
'{
"hasPaymentMethod": true,
"planType": "free",
"inTrial": true,
"scope": [
"<string>"
],
"version": "<string>",
"billingPortalUrl": "<string>",
"billingPortalAddPaymentMethodUrl": "<string>",
"trialStart": "2023-11-07T05:31:56Z",
"trialEnd": "2023-11-07T05:31:56Z",
"trialDaysLeft": 123,
"currentBillingPeriod": {
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"usagesCount": 123
},
"shouldLockEnvironmentSwitch": true,
"coupons": [
{
"coupon": "An example name"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of organization
36^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"95b11417-f18f-457f-8804-68e361f9164f"
User new fields data
255^(?=\S)[\p{L}\p{N}a-zA-Z _.,:!?&%@\/+\-'|]+(?<=\S)$"An example name"
Success
free, advanced, enterprise, standard Show child attributes
Show child attributes
Was this page helpful?