# Give a member access to a project

Source: https://openpanel.sh/docs/api/projects/give-a-member-access-to-a-project

Overrides their organization role on this project: none hides it, view, deploy or admin; null lets the role decide again. The owner always has admin.

`PUT https://openpanel.sh/api/v1/projects/{projectId}/access/{userId}`

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `projectId` | path | yes |  |
| `userId` | path | yes |  |

## Request body

JSON, `ProjectAccessSet`.

## Responses

| Status | Meaning | Body |
|---|---|---|
| 204 | Done. | none |
| 401 | No valid credential was sent. | `application/problem+json`, `Problem` |
| 403 | The credential may not do this. | `application/problem+json`, `Problem` |
| 404 | Not found, or not visible to this credential. | `application/problem+json`, `Problem` |
| 409 | It clashes with something that exists, such as a name in use. | `application/problem+json`, `Problem` |
| 422 | The input was refused; detail says why. | `application/problem+json`, `Problem` |
| 429 | Too many requests; wait for Retry-After seconds. | `application/problem+json`, `Problem` |

## Schemas

### Problem

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "A link to the error's explanation in the docs."
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string",
      "description": "Stable machine-readable code: not_found, forbidden, invalid, conflict, rate_limited, not_implemented, …"
    },
    "detail": {
      "type": "string",
      "description": "What went wrong, in a sentence written for a person."
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail"
  ]
}
```

### ProjectAccessSet

```json
{
  "type": "object",
  "properties": {
    "access": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "view",
            "deploy",
            "admin"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Their access to this project; none hides it from them; null lets their organization role decide again."
    }
  },
  "required": [
    "access"
  ],
  "additionalProperties": false
}
```