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
Bearer token with your API key. Requires read_write permission.
Path Parameters
The project’s URL-friendly slug identifier.
Body Parameters
All fields are optional. Only provided fields are updated.
General Settings
Project name. Maximum 100 characters.
Short project description.
Longer description shown on the pricing page header.
Currency code (e.g. "USD", "EUR", "GBP").
Discount for annual billing as a decimal (e.g. 0.2 for 20% off).
Enable or disable the annual billing toggle.
Activate or deactivate the project.
Checkout URLs
URL to redirect customers after a successful Stripe checkout in live mode.
URL to redirect customers when they cancel Stripe checkout in live mode.
URL to redirect after successful checkout in test mode.
URL to redirect on cancel in test mode.
Theme Settings
Visual customization settings for the pricing widget.
Font family for the pricing widget (e.g. "Inter", "Roboto").
Primary accent color as a hex code (e.g. "#298558").
Button hover color as a hex code.
Text color inside buttons as a hex code.
Border radius for cards and buttons (e.g. "8px", "12px").
theme.pricingBackgroundColor
Background color of the pricing cards.
Border color of the pricing cards.
Custom CSS to inject into the pricing widget. Overrides default styles.
Show or hide the project name in the pricing header.
Show or hide the pricing page header section.
Alignment of the header text ("left", "center", "right").
Alignment of the description text ("left", "center", "right").
Alignment of the monthly/annual toggle ("left", "center", "right").
theme.popularBadgePosition
Position of the “Popular” badge on plan cards ("top", "inline").
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
| Status | Description |
|---|
400 | Invalid field value (e.g. name exceeds 100 characters) |
401 | Invalid or missing API key |
403 | API key does not have read_write permission |
404 | Project with the given slug not found |