#304 — set a workspace plan (comp/Enterprise grant); requires a reason; never touches live Stripe
POST
/api/v1/admin/workspaces/{id}/plan
const url = 'https://example.com/api/v1/admin/workspaces/example/plan';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"plan":"free","reason":"example","expires_at":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/admin/workspaces/example/plan \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "plan": "free", "reason": "example", "expires_at": "2026-04-15T12:00:00Z" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Workspace id
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
plan
required
string
reason
required
string
expires_at
string format: date-time