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

# GET /api/sites/enable/{id} — activate a site

> GET /api/sites/enable/{id} activates a HackGATE site so researchers can connect. The site must not be already active or in deployment.

Activates a HackGATE site and makes the proxy subdomain live. Researchers can connect via the `hackgatedName` subdomain immediately after the site is enabled. A **Started** event is written to the site's activity log.

## Request

```
GET https://api-admin.hackgate.io/api/sites/enable/{id}
```

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Example: `Bearer <token>`
</ParamField>

### Path parameters

<ParamField path="id" type="string" required>
  The UUID of the site to activate.
</ParamField>

## Errors

| Condition               | Status | `title`                            |
| ----------------------- | ------ | ---------------------------------- |
| Site is already active  | `400`  | `"Site is already active"`         |
| Site is still deploying | `400`  | `"Site deployment is in progress"` |
| Site not found          | `404`  | Site not found message             |

<Warning>
  You cannot enable a site while `isDeploymentProgress` is `true`. Wait for deployment to complete before enabling.
</Warning>

## Response

Returns the updated site object with `isActive` set to `true`.

<ResponseField name="id" type="string" required>
  Unique identifier for the site (UUID).
</ResponseField>

<ResponseField name="originName" type="string" required>
  The origin URL being proxied.
</ResponseField>

<ResponseField name="hackgatedName" type="string" required>
  The `hackgate.io` subdomain now accepting researcher traffic.
</ResponseField>

<ResponseField name="isActive" type="boolean" required>
  `true` after a successful enable request.
</ResponseField>

<ResponseField name="orgId" type="string" required>
  Organization ID that owns this site.
</ResponseField>

<ResponseField name="cretedByUserId" type="string" required>
  User ID of the account that created the site.
</ResponseField>

<ResponseField name="creationdDate" type="string" required>
  ISO 8601 timestamp of when the site was created.
</ResponseField>

<ResponseField name="hasCustomList" type="boolean" required>
  Whether a custom researcher allowlist is enabled.
</ResponseField>

<ResponseField name="isDeploymentProgress" type="boolean" required>
  `false` for a site that can be enabled.
</ResponseField>

<ResponseField name="startDate" type="string">
  Scheduled activation date, if set. `null` otherwise.
</ResponseField>

<ResponseField name="stopDate" type="string">
  Scheduled deactivation date, if set. `null` otherwise.
</ResponseField>

<ResponseField name="credentials" type="string">
  Test credentials for researchers. `null` if not configured.
</ResponseField>

<ResponseField name="instructions" type="string">
  Testing instructions for researchers. `null` if not configured.
</ResponseField>

<ResponseField name="rateLimit" type="string">
  Rate limiting rule string. `null` if not configured.
</ResponseField>

<ResponseField name="blockList" type="string">
  JSON-encoded block rules. `null` if not configured.
</ResponseField>

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl https://api-admin.hackgate.io/api/sites/enable/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -H "Authorization: Bearer <token>"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "originName": "https://www.example.com",
    "hackgatedName": "www-myorg.hackgate.io",
    "isActive": true,
    "orgId": "org-uuid",
    "cretedByUserId": "user-uuid",
    "creationdDate": "2024-06-01T10:00:00Z",
    "hasCustomList": false,
    "isDeploymentProgress": false,
    "startDate": null,
    "stopDate": null,
    "credentials": null,
    "instructions": null,
    "rateLimit": null,
    "blockList": null
  }
  ```

  ```json 400 theme={null}
  {
    "title": "Site is already active",
    "status": 400
  }
  ```
</ResponseExample>
