PUT
/
organizations
/
{organizationId}
/
billing
/
subscription
/
coupon
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"
}'
{
  "billingPortalUrl": "<string>",
  "billingPortalAddPaymentMethodUrl": "<string>",
  "hasPaymentMethod": true,
  "planType": "free",
  "inTrial": true,
  "scope": [
    "<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
  },
  "version": "<string>",
  "shouldLockEnvironmentSwitch": true,
  "coupons": [
    {
      "coupon": "An example name"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

ID of organization

Required string length: 36

Body

application/json
User new fields data
coupon
string
required
Maximum length: 255

Response

200
application/json
Success
hasPaymentMethod
boolean
required
planType
enum<string>
required
Available options:
free,
advanced,
enterprise,
standard
inTrial
boolean
required
scope
string[]
required
version
string
required
billingPortalUrl
string
billingPortalAddPaymentMethodUrl
string
trialStart
string
trialEnd
string
trialDaysLeft
number
currentBillingPeriod
object
shouldLockEnvironmentSwitch
boolean
coupons
object[]