# Map a diagram to a control, or take a suggested one off

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

One override of the controls a diagram's format suggests: add, remove, or null to return to the suggestion.

`PUT /orgs/{org}/evidence/controls`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Map a diagram to a control, or take a suggested one off. |
| What does it take? | A JSON body of type [`EvidenceControlBody`](https://docs.plotwork.dev/api/schemas.md#evidencecontrolbody). |
| What does it return? | Status 204 with no body. |
| What can go wrong? | `400` the body is not valid; `401` not signed in; `403` a member or a reader (orgs.forbidden), a plan without compliance evidence (plan.compliance_evidence_not_included), or an origin that may not make changes; `404` no such organisation, or the caller is not a member of it; `429` too many requests; `503` organisations are not set up on this server. Every failure uses the one error envelope. |

## What it does

One override of the controls a diagram's format suggests: add, remove, or null to return to the suggestion. The owner and admins, on Enterprise. Audited.

## Path parameters

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

## Request body

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

| Field | Type | Required | Description |
|---|---|---|---|
| `repository` | `string` | yes | The repository, as owner/name. at most 140 characters; pattern `^[A-Za-z0-9][A-Za-z0-9-]{0,38}\/[A-Za-z0-9._-]{1,100}$`. |
| `diagram` | `string` | yes | The diagram: a source name, or `mermaid:<finding id>` for a hand-drawn one. at least 1 character; at most 160 characters; pattern `^[^\p{Cc}]+$/u`. |
| `control` | `"pci-dss:1.2.3" \| "pci-dss:1.2.4" \| "soc2:CC2.1" \| "soc2:CC8.1" \| "iso27001:A.5.9" \| "iso27001:A.8.9" \| "nist-800-53:CM-8" \| "nist-800-53:PL-2"` | yes | A control: `<framework>:<control>`, such as `pci-dss:1.2.4`. |
| `mode` | `"add" \| "remove" \| null` | yes | `add` maps the diagram to the control, `remove` takes a suggested one off, and null returns it to its suggestion. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 204 | Saved. | none |
| 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 | A member or a reader (orgs.forbidden), a plan without compliance evidence (plan.compliance_evidence_not_included), or 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) |
| 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) |

## 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 |
