---
title: "Share a project via link"
method: PUT
path: "/projects/{project}/shares"
tags: ["sharing"]
---

# Share a project via link

`PUT /projects/{project}/shares`

Share a project via link. The user needs to have write-access to the project to be able do this.

## Path parameters

- `project` integer, required

## Request body

- ModelsLinkSharing
  - `created` string — A timestamp when this project was shared. You cannot change this value.
  - `hash` string — The public id to get this shared project
  - `id` integer — The ID of the shared thing
  - `name` string — The name of this link share. All actions someone takes while being authenticated with that link will appear with that name.
  - `password` string — The password of this link share. You can only set it, not retrieve it after the link share has been created.
  - `permission` 0 | 1 | 2
  - `shared_by` UserUser
    - `bot_owner_id` integer — BotOwnerID is the ID of the owning (human) user if this user is a bot. A non-zero value means this user is a bot and cannot authenticate via password.
    - `created` string — A timestamp when this task was created. You cannot change this value.
    - `email` string — The user's email address.
    - `id` integer — The unique, numeric id of this user.
    - `name` string — The full name of the user.
    - `updated` string — A timestamp when this task was last updated. You cannot change this value.
    - `username` string — The username of the user. Is always unique.
  - `sharing_type` 0 | 1 | 2
  - `updated` string — A timestamp when this share was last updated. You cannot change this value.

## Response `201`

The created link share object.

- ModelsLinkSharing
  - `created` string — A timestamp when this project was shared. You cannot change this value.
  - `hash` string — The public id to get this shared project
  - `id` integer — The ID of the shared thing
  - `name` string — The name of this link share. All actions someone takes while being authenticated with that link will appear with that name.
  - `password` string — The password of this link share. You can only set it, not retrieve it after the link share has been created.
  - `permission` 0 | 1 | 2
  - `shared_by` UserUser
    - `bot_owner_id` integer — BotOwnerID is the ID of the owning (human) user if this user is a bot. A non-zero value means this user is a bot and cannot authenticate via password.
    - `created` string — A timestamp when this task was created. You cannot change this value.
    - `email` string — The user's email address.
    - `id` integer — The unique, numeric id of this user.
    - `name` string — The full name of the user.
    - `updated` string — A timestamp when this task was last updated. You cannot change this value.
    - `username` string — The username of the user. Is always unique.
  - `sharing_type` 0 | 1 | 2
  - `updated` string — A timestamp when this share was last updated. You cannot change this value.

## Other responses

- `400` — Invalid link share object provided.
- `403` — Not allowed to add the project share.
- `404` — The project does not exist.
- `500` — Internal error

---

[API](https://skmtc.net/go-vikunja/apis/vikunja-api.md) · [All operations](https://skmtc.net/go-vikunja/apis/vikunja-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/go-vikunja/vikunja-api/versions/feb3f68bbdf1/schema)
