> ## Documentation Index
> Fetch the complete documentation index at: https://docs.digitalseaservice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Member left (YWC)

> POST /v1/partners/members/left — tell DSS a Yacht Workers Council member has left, lapsed, or deleted their YWC account.

<Note>
  **Yacht Workers Council only.** Other partners receive
  [`insufficient_scope` (403)](/errors/insufficient_scope). Auth is the same HTTP
  Basic as the rest of `/v1/partners/*`.
</Note>

```http theme={null}
POST /v1/partners/members/left
Authorization: Basic <base64(client_id:client_secret)>
Content-Type: application/json
```

Call this when a member is no longer in YWC — they left, their membership
lapsed, or they deleted their **YWC** account. DSS closes the billed Crew
Premium seat (James stops paying from that UTC day) and drops sponsored
Premium unless the member already pays for Crew Premium themselves.

This is **not** a DSS account deletion. `reason: "account_deleted"` means the
YWC account is gone, not the DSS user.

Do **not** call the dashboard internal URL. One successful call is enough;
retries are safe.

## Request

| Field          | Type   | Required                        | Notes                                                                                                                    |
| -------------- | ------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `user_id`      | string | If no resolvable `external_ref` | DSS user id from Connect (Firebase uid). Preferred.                                                                      |
| `external_ref` | string | If no `user_id`                 | Your id, e.g. `ywc-user-123`. Used only when `user_id` is omitted; we look up the DSS user from a prior sponsorship row. |
| `reason`       | string | No                              | `membership_lapsed` or `account_deleted`. Both close the billed seat the same way.                                       |

```json theme={null}
{
  "user_id": "aQ0mtT8kRgVv7C3o1p2q3r4s5t6u",
  "external_ref": "ywc-user-123",
  "reason": "membership_lapsed"
}
```

```bash theme={null}
curl -u "$DSS_CLIENT_ID:$DSS_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"<dss-uid>","external_ref":"ywc-user-123","reason":"membership_lapsed"}' \
  https://api.digitalseaservice.com/v1/partners/members/left
```

Sandbox: `https://api.dev.digitalseaservice.com/v1/partners/members/left`.

## Response

`200 OK` — including when the seat was already closed.

| Field        | Type    | Notes                                                                                                             |
| ------------ | ------- | ----------------------------------------------------------------------------------------------------------------- |
| `user_id`    | string  | DSS user we closed the seat for.                                                                                  |
| `ended`      | boolean | `true` when an open billed seat was closed this call.                                                             |
| `downgraded` | boolean | `true` when sponsored Crew Premium was dropped. `false` if they already self-pay, or the seat was already closed. |

```json theme={null}
{
  "user_id": "aQ0mtT8kRgVv7C3o1p2q3r4s5t6u",
  "ended": true,
  "downgraded": true
}
```

We also revoke that member's live YWC OAuth tokens so a later reconcile cannot
re-open James's seat.

## Errors

| Status | `type`                                               | When                                                                      |
| ------ | ---------------------------------------------------- | ------------------------------------------------------------------------- |
| 400    | [`invalid_request`](/errors/invalid_request)         | Neither `user_id` nor a resolvable `external_ref`.                        |
| 401    | [`invalid_token`](/errors/invalid_token)             | Missing or bad Basic credentials.                                         |
| 403    | [`insufficient_scope`](/errors/insufficient_scope)   | Not Yacht Workers Council, or the partner is suspended.                   |
| 422    | [`invalid_request`](/errors/invalid_request)         | `reason` is present but not `membership_lapsed` or `account_deleted`.     |
| 503    | [`service_unavailable`](/errors/service_unavailable) | Dashboard member-left failed. Retry with backoff; the call is idempotent. |

## Related

* [Sponsorship API overview](/sponsorships/overview)
* [Remove a seat](/sponsorships/remove) — JIT sponsorship program seats, not Connect-billed YWC Premium
