update(slug: string, patch: ProductPatch, options?: RequestScope): Promise<ProductResource>Partial update: only the keys present in the patch are touched. A new slug is validated against the whole workspace rather than against the product being renamed, so any collision is reported as a conflict.
Flipping isPrivate to true also records a grant for the key owner, so an integration cannot lock itself out in one call. Flipping it back to false leaves every stored grant in place, and those grants start applying again the moment the product is made private.
A product beyond the plan allowance refuses every patch, including a rename. Delete something or upgrade the plan to get back under the cap.
Example
const product = await envless.products.update('billing', { isPrivate: true })
console.log(product.isPrivate, product.updatedAt)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Product slug, or the product uniqueId when the value is UUID shaped. |
patch.name | string | No | New display name. |
patch.slug | string | No | New slug, unique across the workspace. |
patch.isPrivate | boolean | No | Switches grant enforcement on or off for the product. |
options.signal | AbortSignal | No | Cancels the request. |
Returns
ProductResource reflecting the patched product.
Worth knowing
- An
iconkey of any value, including null, is rejected before the product is resolved, so an unknown slug plusiconreports the body error and not a missing product.
Required scopes
products:write
Underlying endpoint
PATCH /products/{slug}
Request and response schema, every error code, and a live playground.
In Python
envless.products.update()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.products.update
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->products->update()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.