---
title: "Settle a workspace subscription lifecycle webhook"
method: POST
path: "/webhooks/workspace-subscriptions"
---

# Settle a workspace subscription lifecycle webhook

`POST /webhooks/workspace-subscriptions`

## Request

- Base URL: `https://superskill.sh/api`
- URL: `https://superskill.sh/api/webhooks/workspace-subscriptions`
- Auth: none declared

Requires HARNESS_WEBHOOK_TOKEN via x-harness-token. Activates, renews, marks past_due, cancels or expires a workspace subscription idempotently; membership expiry is updated only here or by the sweep endpoint, and removed/suspended members are not restored by provider webhooks.

## Request body

- object
  - `provider` 'manual'
  - `provider_subscription_ref` string, required
  - `provider_event_ref` string
  - `event_type` string
  - `status` 'active' | 'past_due' | 'canceled' | 'expired'
  - `current_period_start` string, date-time, nullable
  - `current_period_end` string, date-time, nullable
  - `grace_until` string, date-time, nullable
  - `cancel_at_period_end` boolean
  - `provider_customer_ref` string, nullable

## Response `200`

Workspace subscription lifecycle applied

- object
  - `status` string, required
  - `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
  - `policy` WorkspaceJoinPolicy: Workspace join gate metadata. No raw invite code, bot secret, token or external credential is exposed.
    - `id` string, required
    - `workspaceId` string
    - `workspaceSlug` string
    - `kind` 'invite' | 'email_domain' | 'telegram' | 'discord' | 'entitlement' | 'paid_subscription' | 'manual_approval', required
    - `status` 'active' | 'disabled', required
    - `role` 'member' | 'viewer', required
    - `title` string, nullable
    - `instructions` string, nullable
    - `config` object, required
    - `createdAt` string, required
    - `updatedAt` string, required
  - `subscription` WorkspaceSubscription, required: Read-only workspace subscription receipt and access window. Membership is granted only by webhook/sweep lifecycle, never by read endpoints.
    - `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
  - `member` WorkspaceMember
    - `id` string
    - `workspace_id` string
    - `workspace_slug` string
    - `user_id` string, required
    - `role` 'owner' | 'admin' | 'moderator' | 'publisher' | 'member' | 'viewer', required
    - `status` 'invited' | 'active' | 'suspended' | 'removed', required
    - `source` 'direct' | 'invite' | 'email_domain' | 'telegram' | 'discord' | 'entitlement' | 'paid_entitlement' | 'token_bootstrap', required
    - `joined_at` string, required
    - `expires_at` string, nullable
    - `removed_at` string, nullable
  - `next` string, required

## Other responses

- `400`: Bad request
- `401`: Authorization required
- `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)
