---
title: "Update a plan and cycle"
method: PUT
path: "/{companyDomain}/products/{productId}/plans/{planId}"
---

# Update a plan and cycle

`PUT /{companyDomain}/products/{productId}/plans/{planId}`

## Request

- Base URL: `https://public.billsby.com/api/v1/rest/core`
- URL: `https://public.billsby.com/api/v1/rest/core/{companyDomain}/products/{productId}/plans/{planId}`
- Auth: API key in header `ApiKey`
- TypeScript: <https://skmtc.dev/billsby/apis/billsby-api/docs/:companyDomain/products/:productId/plans/:planId/put.ts> (a function with typed inputs; its response is checked against the schema)

Update a plan and cycle for your company

## Path parameters

- `companyDomain` string, required
- `productId` integer, required
- `planId` integer, required

## Request body

- object
  - `name` string: The name of the plan you want to update
  - `displayName` string: The display name of the plan you want to update
  - `description` string: The description of the plan
  - `featureTags` string: The feature tags associated with the plan
  - `visibility` integer: The visibility of the plan
  - `cycles` object: Define your cycles
    - `cycleId` integer: The unique identifier of the cycle in the Billsby platform
    - `frequency` integer: A number with the update frequency (for example: 5 to renew every five of frequencyType)
    - `frequencyType` integer: Daily = 1, Weekly = 2, Monthly = 3, Yearly = 4
    - `price` integer: The price amount of this cycle (unused in tiered based cycles)
    - `freeTrial` integer: A number with the amount of free trial (for example: 5 for five of frequencyType of free trial)
    - `freeTrialFrequencyType` integer: Daily = 1, Weekly = 2, Monthly = 3, Yearly = 4
    - `setupFeePrice` integer: The price amount of setup fee (charged only on first invoice of new subscriptions)
    - `freeQuantity` integer: The amount of free units in tiered based cycles
    - `billingDateType` integer: Anniversary = 1, FixedDayEachMonth = 2, FixedDayOfTheWeek = 3
    - `fixedBillingDateDay` integer: The fixed billing date if there is one (from 1 to 28)
    - `proRateOption` integer: DoNotProRate = 1, DoNotChargeUntilNextCycle = 2, ProRateBasedOnDaysRemaining = 3
    - `visibility` integer: The type of visibility of each product; public, hidden and on-sale. Available values: 0, 1, 2, 3 (Public=0, Hidden=1, Internal=2, OffSale=3)
    - `tiers` object: Define your tiers
      - `start` integer: Start unit
      - `finish` integer: Ending units (it could be null, which means this tiers goes from start to unlimited)
      - `price` integer: Unit price
  - `redirectUrl` string: The URL you want your customer to redirected to when they have completed the checkout flow
  - `alertEmail` string: Set up an email to receive alerts when a customer signs up for the plan

## Response `200`

200

---

[API](https://skmtc.dev/billsby/apis/billsby-api.md) - [All operations](https://skmtc.dev/billsby/apis/billsby-api/llms.txt) - [OpenAPI document](https://skmtc.dev/billsby/apis/billsby-api/revisions/adcb2fd4c52f?raw)
