# Delete EGYM site

`DELETE /api/configuration/egym/sites/{siteId}`

- **Success:** `204 No Content`
- **Products:** Operator (`FOH`), Integrations (`INTEGRATIONS`) (any one of these products, not all)
- **Features:** Front of House Generic Access (`FOHGENERIC`), `EGYMSYNC` (any one of these features, not all)

HTML version: [Delete EGYM site](https://support.gladstonesoftware.cloud/reference/configuration/delete-egym-site)

## Overview

Removes a site from the EGYM integration, so its members are no longer sent to EGYM. If the site's initial sync is still scheduled, running or paused, it is stopped. The site's stored EGYM API key is discarded.

**Accounts already created at EGYM are not deleted.** Members already sent to EGYM stay there until they are cleared at the EGYM end. If you later enable the same site again with [Create EGYM sites](create-egym-sites.md), clear those accounts at EGYM first; the Operator screen gives the same warning.

Sync errors already recorded for the site are kept, and still appear in [List EGYM sync errors](list-egym-sync-errors.md). A member deleted in Gladstone is still removed from EGYM after their site has been removed.

## Endpoint

`DELETE {base_url}/api/configuration/egym/sites/{siteId}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `siteId` | string | Yes | The site to remove, as the `siteId` returned by [List EGYM sites](list-egym-sites.md). It must currently be enabled for EGYM. |

## Sample request

```bash title="cURL"
curl -X DELETE '{base_url}/api/configuration/egym/sites/{siteId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Sample response

```http title="204 No Content"
HTTP/1.1 204 No Content
```

## Errors

Validation failures return a plain JSON string containing the message shown below.

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | The site is not enabled for EGYM — `Site {siteId} is not enabled for EGYM.` This is also what a repeated delete of the same site returns. |
| `401` | Unauthorised | The `Authorization` header is missing or the token is invalid or expired. |
| `403` | Forbidden | The token is a member or anonymous token, or does not carry the products or features this endpoint requires. |
| `500` | Internal server error | An unexpected server-side failure. The body is empty. Check [List EGYM sites](list-egym-sites.md) before retrying: if the site is no longer listed, the removal took effect. |
