> For the complete documentation index, see [llms.txt](https://docs.netmap.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.netmap.dev/guides/share-topology-layout.md).

# Share A Topology Layout

Saved layouts belong to a user. A layout can be shared with a generated code and imported by another user as an independent snapshot.

API equivalents:

* `POST /api/v1/topology/layouts/{layout_id}/share`
* `DELETE /api/v1/topology/layouts/{layout_id}/share`
* `GET /api/v1/topology/layouts/shared/{code}`
* `POST /api/v1/topology/layouts/import`

Authentication is required. Owner rules are enforced by the topology router.

## What This Does

Layout sharing lets one user hand another user a copy of topology positions and display preferences. Imported layouts are snapshots; they do not stay synchronized with the original.

## Required Permissions

Authentication is required. Layout ownership rules are enforced by the topology router. Creating and managing devices still requires `topology_write`, but layout ownership is per user.

## Steps

1. Open Topology.
2. Arrange the map.
3. Save a named layout.
4. Open the Layouts modal.
5. Generate a share code for the layout.
6. Send the code to another NetMap user through a trusted channel.
7. The other user imports the code and receives their own layout copy.

## Example Import

```bash
API_URL="https://netmap.example.com"
API_KEY="<api-key>"
SHARE_CODE="<share-code>"

curl --fail-with-body \
  --request POST \
  --url "${API_URL}/api/v1/topology/layouts/import" \
  --header "X-API-Key: ${API_KEY}" \
  --header "Content-Type: application/json" \
  --data "{\"code\":\"${SHARE_CODE}\"}"
```

## Common Problems

| Symptom                                       | Likely cause                    | Fix                                 |
| --------------------------------------------- | ------------------------------- | ----------------------------------- |
| code not found                                | code was typed wrong or revoked | ask owner to regenerate/share again |
| imported layout name changed                  | name collision                  | NetMap auto-suffixes copy names     |
| layout does not update after owner changes it | imported copy is independent    | re-import a new shared snapshot     |

## Related Pages

* [Topology](/using-netmap/topology.md)
* [Endpoint Inventory](/api/api-reference.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.netmap.dev/guides/share-topology-layout.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
