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

# POST Lock twin provision public access

> Disable public access without teardown

```bash theme={null}
POST /validate/twins/provision/{run_id}/lock
```

Revokes public `pub-` host access for a provisioned twin environment. Private proxy-token access remains available until TTL or teardown. The deployment keeps running until its TTL expires or you call teardown.

**Path parameters**

| Field    | Type     | Description                                                         |
| -------- | -------- | ------------------------------------------------------------------- |
| `run_id` | `string` | Provisioning run id returned from `POST /validate/twins/provision`. |

**Response**

When public access is revoked by this call:

```json theme={null}
{"status": "locked", "run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "is_public": false}
```

When the provision was already private, the endpoint is a no-op and returns:

```json theme={null}
{"status": "already_locked", "run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "is_public": false}
```

**Response fields**

| Field       | Type      | Description                                                                                                 |
| ----------- | --------- | ----------------------------------------------------------------------------------------------------------- |
| `status`    | `string`  | `locked` when this call revoked public access, or `already_locked` when public access was already disabled. |
| `run_id`    | `string`  | Provisioning run id.                                                                                        |
| `is_public` | `boolean` | Always `false` after a successful response.                                                                 |

**Errors**

| Status | Description                                            |
| ------ | ------------------------------------------------------ |
| `400`  | `run_id` is not a valid UUID.                          |
| `404`  | No run with that id exists for the authenticated user. |
