---
title: "Expire workspace subscriptions whose access window has ended"
method: POST
path: "/workspaces/{slug}/subscriptions/sweep"
---

# Expire workspace subscriptions whose access window has ended

`POST /workspaces/{slug}/subscriptions/sweep`

## Request

- Base URL: `https://superskill.sh/api`
- URL: `https://superskill.sh/api/workspaces/{slug}/subscriptions/sweep`
- Auth: HTTP bearer

Requires member:write/workspace admin access. This is the cron/admin expiry job path; it updates subscription status and membership expiry without charging money.

## Path parameters

- `slug` string, required

## Response `200`

Workspace subscription sweep

- object
  - `workspace` Workspace, required
    - `slug` string, required
    - `name` string, required
    - `type` 'company' | 'community' | 'team' | 'course' | 'agency' | 'chat', required
    - `visibility` 'private' | 'invite_only' | 'gated' | 'public' | 'unlisted', required
    - `plan` 'free' | 'team' | 'enterprise', required
    - `description` string, nullable
    - `avatarUrl` string, nullable
  - `checked` integer, required
  - `expired` WorkspaceSubscription[], required
    - `id` string, required
    - `workspaceSlug` string, required
    - `userId` string, required
    - `policyId` string, required
    - `provider` 'manual', required
    - `providerSubscriptionRef` string, required
    - `status` 'incomplete' | 'active' | 'past_due' | 'canceled' | 'expired', required
    - `currentPeriodStart` string, date-time, nullable
    - `currentPeriodEnd` string, date-time, nullable
    - `graceUntil` string, date-time, nullable
    - `accessUntil` string, date-time, nullable
    - `cancelAtPeriodEnd` boolean, required
    - `canceledAt` string, date-time, nullable
    - `checkoutUrl` string, nullable
    - `portalUrl` string, nullable
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `401`: Authorization required
- `403`: Authorization was provided but is not allowed for this action
- `404`: Resource not found

---

[API](https://skmtc.dev/superskill/apis/superskill-api.md) · [All operations](https://skmtc.dev/superskill/apis/superskill-api/llms.txt) · [OpenAPI document](https://skmtc.dev/superskill/apis/superskill-api/revisions/ced2d2d1f217?raw)
