Skip to content

Update a draft workspace plan

PATCH /admin/v1/plans/{planId} — Update a draft workspace plan

Updated View as Markdown
Audience: application-backendPlane: adminAuth: management-keyStatus: beta

Endpoint

PATCH /admin/v1/plans/{planId}

Operation ID: updatePlan

Authentication

Send a Nexus Management Key as Authorization: Bearer <management-key>. This credential is control-plane only.

Idempotency

This operation does not declare an Idempotency-Key requirement in the accepted OpenAPI contract.

Request

Parameters

Name Location Required Schema Description
planId path Yes string

application/json body

Required: Yes

Type: UpdateWorkspacePlanDto

Field Required Type Description
key No string
name No string
billingInterval No string (MONTH | YEAR)

Responses

Status Description Content type Schema
200 application/json WorkspacePlanDto

Only responses explicitly declared by the accepted Admin OpenAPI contract are shown. The current contract does not declare operation-specific error bodies; the SDK preserves any non-success status and body in AdminApiError.

200 application/json schema

Type: WorkspacePlanDto

Field Required Type Description
id Yes string
workspaceId Yes string
key Yes string
name Yes string
billingInterval Yes string (MONTH | YEAR)
status Yes string (DRAFT | ACTIVE | ARCHIVED)

Examples

TypeScript Management SDK

NexusAdminClient.updatePlan uses AdminOperationInput<"updatePlan"> and returns Promise<AdminOperationOutput<"updatePlan">>.

import { NexusAdminClient } from '@nexus/sdk-typescript';

const nexus = new NexusAdminClient({
  baseUrl: 'https://nexus.microvoid.io',
  managementKey: process.env.NEXUS_MANAGEMENT_KEY,
});

const result = await nexus.updatePlan({
  path: {
    planId: '533c4e1e-2823-4349-86b9-d6f1a869a2ca',
  },
  body: {},
});

Fetch

const response = await fetch('https://nexus.microvoid.io/admin/v1/plans/533c4e1e-2823-4349-86b9-d6f1a869a2ca', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.NEXUS_MANAGEMENT_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
});

if (!response.ok) throw new Error(`Nexus request failed: ${response.status}`);

curl

curl --request PATCH \
  "https://nexus.microvoid.io/admin/v1/plans/533c4e1e-2823-4349-86b9-d6f1a869a2ca" \
  --header "Authorization: Bearer ${NEXUS_MANAGEMENT_KEY}" \
  --header "Content-Type: application/json" \
  --data "{}"
Navigation

Type to search…

↑↓ navigate↵ selectEsc close