# Enable, configure or disable the public link

> PUT /boards/{boardId}/public-link

Source: https://mockflow.com/developers/reference/members/set-public-link

**PUT** `https://api.mockflow.com/v1/boards/{boardId}/public-link`  
Scopes: `members:write`

**curl**

```bash
curl https://api.mockflow.com/v1/boards/brd_3f9e2a/public-link \
  -X PUT \
  -H "Authorization: Bearer $MOCKFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false,
  "slug": "string",
  "password": "string"
}'
```

**JavaScript**

```javascript
const response = await fetch("https://api.mockflow.com/v1/boards/brd_3f9e2a/public-link", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.MOCKFLOW_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
  "enabled": false,
  "slug": "string",
  "password": "string"
})
});

const data = await response.json();
```

**Python**

```python
import os, requests

response = requests.put(
    "https://api.mockflow.com/v1/boards/brd_3f9e2a/public-link",
    headers={"Authorization": f"Bearer {os.environ['MOCKFLOW_API_KEY']}"},
    json={
  "enabled": False,
  "slug": "string",
  "password": "string"
},
)

response.raise_for_status()
data = response.json()
```

**200**

```json
{
  "enabled": false,
  "url": "https://app.mockflow.com/board/brd_3f9e2a",
  "slug": "string",
  "passwordProtected": false,
  "embedUrl": "https://app.mockflow.com/board/brd_3f9e2a",
  "embedHtml": "string"
}
```

**429**

```json
{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests.",
    "docsUrl": "https://mockflow.com/developers/concepts/errors#rate_limited"
  },
  "requestId": "req_45d49816999bac40"
}
```

Admin and above. The slug must be unique across every board's slug and id.

### Authorization

- `Authorization` (string, required): `Bearer <key>`. The key needs `members:write` scope. Create and manage keys in the [developer console](/developers/console/); what each scope unlocks is on the [scopes page](/developers/concepts/scopes).

### Path parameters

- `boardId` (string, required)

### Body

- `enabled` (boolean)
- `slug` (string | null): Custom slug for the public URL. Null clears it.
- `password` (string): Set to protect. Send empty string to clear.

### Response

- `enabled` (boolean)
- `url` (string | null): The /iview/ link, using the slug when one is set.
- `slug` (string | null)
- `passwordProtected` (boolean)
- `embedUrl` (string | null)
- `embedHtml` (string | null): A responsive iframe snippet for the public board.

### Errors

- 429 `rate_limited`: Too many requests.
