# Choose who may read the audit log and the call history

> Page: https://docs.plotwork.dev/api/put-orgs-org-log-access. Index of every page: https://docs.plotwork.dev/llms.txt

Replaces the roles and people who may read the audit log and the call history besides the owner and admins.

`PUT /orgs/{org}/log-access`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Choose who may read the audit log and the call history. |
| What does it take? | A JSON body of type [`LogAccessInput`](https://docs.plotwork.dev/api/schemas.md#logaccessinput). |
| What does it return? | Status 200 with a body of type [`LogAccess`](https://docs.plotwork.dev/api/schemas.md#logaccess). |
| What can go wrong? | `400` the body is not valid; `401` not signed in; `403` not the owner (orgs.forbidden), or the request came from an origin that may not make changes; `404` no such organisation, or the caller is not a member of it; `422` someone chosen is not a member (validation.failed); `429` too many requests; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

Replaces the roles and people who may read the audit log and the call history besides the owner and admins. The owner only; recorded in the audit log.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `org` | `string` | yes | The organisation's id or its slug. |

## Request body

The body has the type [`LogAccessInput`](https://docs.plotwork.dev/api/schemas.md#logaccessinput).

| Field | Type | Required | Description |
|---|---|---|---|
| `roles` | `("member" \| "reader")[]` | yes | Roles let in besides the owner and admins. |
| `members` | `string[]` | yes | Members let in by name, by account id, at most 100. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The setting now. | [`LogAccess`](https://docs.plotwork.dev/api/schemas.md#logaccess) |
| 400 | The body is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 403 | Not the owner (orgs.forbidden), or the request came from an origin that may not make changes. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such organisation, or the caller is not a member of it. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 422 | Someone chosen is not a member (validation.failed). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Organisations are not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`LogAccess`](https://docs.plotwork.dev/api/schemas.md#logaccess).

| Field | Type | Required | Description |
|---|---|---|---|
| `roles` | `("member" \| "reader")[]` | yes |  |
| `members` | `object[]` | yes |  |
| `members[].userId` | `string` | yes |  |
| `members[].email` | `string` | yes |  |
| `members[].role` | `"owner" \| "admin" \| "member" \| "reader"` | yes |  |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
