Plans

Duplicate a plan

Creates a new plan with the same attributes and items. The new plan's origin_id is set to the source plan.

POST
/plans/{id}/duplicate

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X POST "https://example.com/plans/string/duplicate"
{
  "plan": {
    "object": "plan",
    "id": "pln_IhMUl3rrZ3",
    "name": "APM Monthly",
    "code": "nw_apm_monthly",
    "description": "Northwind APM catalog plan billed monthly.",
    "currency": "USD",
    "status": "active",
    "created_at": "2025-02-14T17:33:40.843Z",
    "items": [
      {
        "object": "plan_item",
        "id": "plni_IhMUl3rrZ3",
        "created_at": "2025-02-14T17:33:40.843Z",
        "product_id": "prd_IhMUl3rrZ3",
        "price_id": "pri_IhMUl3rrZ3"
      }
    ]
  },
  "meta": {
    "request_id": "req_IhMUl3rrZ3"
  }
}