Create share link
create_share_linkUse when a site lost its link and the user wants it back. Gives a site a fresh share link when it has none. Every site gets one when it is published, so this is the way back from a link that was taken away, not an everyday act: it is what puts a landing page back on its /lp address without deleting anything, and the page, its version history and every record it has collected are left untouched. A site that already has an active link keeps it and gets no second one. It puts back whom the last link let in: a page that was open to anyone comes back open and live, and one that was restricted comes back restricted, so the page is NOT live until you also call set_visibility with "public", read the visibility that comes back and say which happened. On a workspace with its own subdomain (the marketing site is one) an address is the folder path, not the link id, so the /lp address and the review copy are the same as before and campaign links to them work again; only a bare sites.* link, if one was ever handed out, carries the id and is now a different address. The address to hand out is landing_url where there is one; share_url is the review copy. The one case this refuses is a link that was restricted on a workspace whose plan has since lapsed: putting it back restricted gives a link nobody can open, and putting it back public would publish a page its owner kept private, so it asks for the plan to be brought back instead of choosing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | Yes | The id of the site | |
| workspace_id | No | Optional: the workspace to act in, from list_workspaces (the connection reaches the person's personal space and every workspace they are a member of). Required on a write when the connection reaches more than one workspace. Omit to act in the personal space (for an older single-workspace connection, the one workspace it was authorized for). |