Delete EGYM site

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

Success: 204 No Content

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, 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. 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.

Path parameters

NameTypeRequiredDescription
siteIdstringYesThe site to remove, as the siteId returned by List EGYM sites. It must currently be enabled for EGYM.

Sample request

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

Sample response

204 No Content
HTTP/1.1 204 No Content

Errors

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

StatusMeaningWhen
400Bad requestThe 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.
401UnauthorisedThe Authorization header is missing or the token is invalid or expired.
403ForbiddenThe token is a member or anonymous token, or does not carry the products or features this endpoint requires.
500Internal server errorAn unexpected server-side failure. The body is empty. Check List EGYM sites before retrying: if the site is no longer listed, the removal took effect.

This page as markdown · All pages · llms.txt