# Turn a repository's badge on, or give it a new address

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

A README badge of the repository's status at an unguessable address that names no repository.

`POST /orgs/{org}/evidence/badges`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Turn a repository's badge on, or give it a new address. |
| What does it take? | A JSON body of type [`EvidenceBadgeBody`](https://docs.plotwork.dev/api/schemas.md#evidencebadgebody). |
| What does it return? | Status 201 with a body of type [`EvidenceBadge`](https://docs.plotwork.dev/api/schemas.md#evidencebadge). |
| 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

A README badge of the repository's status at an unguessable address that names no repository. Shown once; asking again replaces it. 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 [`EvidenceBadgeBody`](https://docs.plotwork.dev/api/schemas.md#evidencebadgebody).

| 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}$`. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 201 | The badge's address and the Markdown for a README. | [`EvidenceBadge`](https://docs.plotwork.dev/api/schemas.md#evidencebadge) |
| 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) |

## Response body

A 201 answer has the type [`EvidenceBadge`](https://docs.plotwork.dev/api/schemas.md#evidencebadge).

| Field | Type | Required | Description |
|---|---|---|---|
| `repository` | `string` | yes |  |
| `url` | `string` | yes | The badge, an SVG. The address is the secret: it names no repository. |
| `markdown` | `string` | 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 |
