# Set a practitioner's access entries

Canonical page: https://docs.ovok.com/api/projects/set-a-practitioner-s-access-entries

`PUT /v1/projects/me/practitioners/{practitionerId}/access`

Replaces the access entries of a practitioner of your current project: the AccessPolicies that limit what they can read and write.

**Scope:** the caller's project (from the token). A project admin, such as an Admin client application on your server.

## Behaviour

- `:practitionerId` is the practitioner's `Practitioner` id. A practitioner who is not a member of the project answers 404.
- `access` replaces the membership's `access[]` entries. Each must name an AccessPolicy of this project, written `AccessPolicy/<id>`; an entry can carry `parameter` values (`name` plus `valueReference` or `valueString`) for a policy that takes parameters.
- The membership's base `accessPolicy` and its admin flag stay as they are. An empty `access` clears the entries, unless the membership has no base `accessPolicy`: a membership with neither reaches the whole project, so that answers 400.
- `versionId`, optional, is the membership's `meta.versionId` you read; a membership changed since answers 409.
- The change applies on the practitioner's next request.
- Answers 204 with no body.

## Example

```bash
curl -X PUT 'https://api.sandbox.ovok.com/v1/projects/me/practitioners/c3499c27-2973-0a7f-807e-fb8676a92dcb/access' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \
  -H 'Content-Type: application/json' \
  -d '{ "access": [{ "policy": { "reference": "AccessPolicy/c3499c27-2973-0a7f-807e-fb8676a92dcb" } }] }'
```

**Who can call it:** a project admin. See [roles](/access-policies#who-can-call-a-route).