Skip to main content
Updates a project’s details. Only the fields you include in the request body will be changed — all other fields remain untouched.

Endpoint

PUT /api/v1/projects/{slug}

Authentication

Authorization
string
required
Bearer token with your API key. Requires read_write permission.

Path Parameters

slug
string
required
The project’s URL-friendly slug identifier.

Body Parameters

All fields are optional. Only provided fields are updated.

General Settings

name
string
Project name. Maximum 100 characters.
description
string
Short project description.
pricingPageDescription
string
Longer description shown on the pricing page header.
currency
string
Currency code (e.g. "USD", "EUR", "GBP").
annualDiscount
number
Discount for annual billing as a decimal (e.g. 0.2 for 20% off).
annualDiscountEnabled
boolean
Enable or disable the annual billing toggle.
isActive
boolean
Activate or deactivate the project.

Checkout URLs

checkoutSuccessUrl
string
URL to redirect customers after a successful Stripe checkout in live mode.
checkoutCancelUrl
string
URL to redirect customers when they cancel Stripe checkout in live mode.
checkoutTestSuccessUrl
string
URL to redirect after successful checkout in test mode.
checkoutTestCancelUrl
string
URL to redirect on cancel in test mode.

Theme Settings

theme
object
Visual customization settings for the pricing widget.

Response

Returns the full updated project object.

Example — Update Basic Settings

curl -X PUT https://cuprice.io/api/v1/projects/my-saas-app \
  -H "Authorization: Bearer cpk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My SaaS App Pro",
    "annualDiscount": 0.25,
    "annualDiscountEnabled": true,
    "checkoutSuccessUrl": "https://myapp.com/welcome",
    "checkoutCancelUrl": "https://myapp.com/pricing"
  }'

Example — Update Theme with Custom CSS

curl -X PUT https://cuprice.io/api/v1/projects/my-saas-app \
  -H "Authorization: Bearer cpk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "theme": {
      "fontFamily": "Roboto",
      "primaryColor": "#4F46E5",
      "hoverColor": "#4338CA",
      "buttonTextColor": "#FFFFFF",
      "borderRadius": "12px",
      "pricingBackgroundColor": "#F9FAFB",
      "pricingBorderColor": "#E5E7EB",
      "showProjectName": true,
      "showPricingHeader": true,
      "headerAlign": "center",
      "descriptionAlign": "center",
      "toggleAlign": "center",
      "popularBadgePosition": "top",
      "customCSS": ".cuprice-card { box-shadow: 0 4px 12px rgba(0,0,0,0.08); } .cuprice-card:hover { transform: translateY(-2px); transition: transform 0.2s ease; }"
    }
  }'
{
  "id": 42,
  "name": "My SaaS App Pro",
  "slug": "my-saas-app",
  "description": "AI-powered project management tool",
  "pricingPageDescription": "Simple, transparent pricing for teams of all sizes.",
  "shareId": "nTZ7axXQHU",
  "currency": "USD",
  "annualDiscount": 0.25,
  "annualDiscountEnabled": true,
  "isActive": true,
  "checkoutSuccessUrl": "https://myapp.com/welcome",
  "checkoutCancelUrl": "https://myapp.com/pricing",
  "checkoutTestSuccessUrl": null,
  "checkoutTestCancelUrl": null,
  "themeSettings": {
    "fontFamily": "Roboto",
    "primaryColor": "#4F46E5",
    "hoverColor": "#4338CA",
    "buttonTextColor": "#FFFFFF",
    "borderRadius": "12px",
    "pricingBackgroundColor": "#F9FAFB",
    "pricingBorderColor": "#E5E7EB",
    "customCSS": ".cuprice-card { box-shadow: 0 4px 12px rgba(0,0,0,0.08); } .cuprice-card:hover { transform: translateY(-2px); transition: transform 0.2s ease; }",
    "showProjectName": true,
    "showPricingHeader": true,
    "headerAlign": "center",
    "descriptionAlign": "center",
    "toggleAlign": "center",
    "popularBadgePosition": "top"
  },
  "createdAt": "2025-09-15T10:30:00.000Z",
  "updatedAt": "2025-12-05T16:00:00.000Z"
}

Errors

StatusDescription
400Invalid field value (e.g. name exceeds 100 characters)
401Invalid or missing API key
403API key does not have read_write permission
404Project with the given slug not found