Skip to content
Connect an agent

Organisations

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

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

POST/orgs/{org}/evidence/badges

TL;DR

QuestionAnswer
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.
What does it return?Status 201 with a body of type 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

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Request body

The body has the type EvidenceBadgeBody.

FieldTypeRequiredDescription
repositorystringyesThe 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

StatusMeaningBody
201The badge's address and the Markdown for a README.EvidenceBadge
400The body is not valid.ErrorResponse
401Not signed in.ErrorResponse
403A 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
404No such organisation, or the caller is not a member of it.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 201 answer has the type EvidenceBadge.

FieldTypeRequiredDescription
repositorystringyes
urlstringyesThe badge, an SVG. The address is the secret: it names no repository.
markdownstringyes

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools