---
title: "Add a user to a project"
method: PUT
path: "/projects/{id}/users"
tags: ["sharing"]
---

# Add a user to a project

`PUT /projects/{id}/users`

Gives a user access to a project.

## Path parameters

- `id` integer, required

## Request body

- ModelsProjectUser
  - `created` string — A timestamp when this relation was created. You cannot change this value.
  - `id` integer — The unique, numeric id of this project <-> user relation.
  - `permission` 0 | 1 | 2
  - `updated` string — A timestamp when this relation was last updated. You cannot change this value.
  - `username` string — The username.

## Response `201`

The created user<->project relation.

- ModelsProjectUser
  - `created` string — A timestamp when this relation was created. You cannot change this value.
  - `id` integer — The unique, numeric id of this project <-> user relation.
  - `permission` 0 | 1 | 2
  - `updated` string — A timestamp when this relation was last updated. You cannot change this value.
  - `username` string — The username.

## Other responses

- `400` — Invalid user project object provided.
- `403` — The user does not have access to the project
- `404` — The user 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)
