# MD_SET_GUIDE_ACCESS
> Change a Guide's visibility between private and org-wide
Change a [Guide](/key-tasks/guides/)'s visibility to `'user'` (private) or `'organization'` (visible to your whole org). Setting org-wide access is admin-permission gated.

## Syntax

```sql
SELECT * FROM MD_SET_GUIDE_ACCESS(
  id = '<guide_uuid>',
  access = 'organization'
);
```

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | `UUID` | Yes | The guide's UUID. |
| `access` | `VARCHAR` | Yes | `'user'` (private) or `'organization'` (org-wide, admin-permission gated). |

## Return columns

| Column | Type | Description |
|--------|------|-------------|
| `id` | `UUID` | Guide UUID |
| `topic` | `VARCHAR` | Grouping label (`NULL` for guides without a topic) |
| `title` | `VARCHAR` | Guide title |
| `description` | `VARCHAR` | One-line summary |
| `owner_id` | `UUID` | UUID of the guide owner |
| `owner_name` | `VARCHAR` | Name of the guide owner |
| `access` | `VARCHAR` | Updated access level |
| `current_version` | `UINTEGER` | Latest version number |
| `created_at` | `TIMESTAMP WITH TIME ZONE` | When the guide was created |
| `updated_at` | `TIMESTAMP WITH TIME ZONE` | When the guide was last updated |

## Examples

Publish a guide to the whole org:

```sql
SELECT access
FROM MD_SET_GUIDE_ACCESS(
  id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
  access = 'organization'
);
```

Make a guide private again:

```sql
SELECT access
FROM MD_SET_GUIDE_ACCESS(
  id = 'b2c3d4e5-f6a7-8901-bcde-f12345678901',
  access = 'user'
);
```

## Related

- [`MD_UPDATE_GUIDE_METADATA`](../md-update-guide-metadata) — Change title, description, or topic.
- [`MD_CREATE_GUIDE`](../md-create-guide) — Set access at creation time.
- [`set_guide_access` MCP tool](/sql-reference/mcp/guides/set-guide-access) — AI assistant equivalent.


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fsql-reference%2Fmotherduck-sql-reference%2Fguides%2Fmd-set-guide-access%2F&page_title=MD_SET_GUIDE_ACCESS&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
