Skip to content
Connect an agent

Organisations

List an organisation's trusted publishers

The CI workflows the organisation trusts to act for it with no API key, oldest first, with whether the owner's plan includes them, the audience a workflow asks GitHub's token for, and the issuer.

GET/orgs/{org}/trusted-publishers

TL;DR

QuestionAnswer
What does it do?List an organisation's trusted publishers.
What does it take?org in the path.
What does it return?Status 200 with a body of type TrustedPublisherList.
What can go wrong?401 not signed in; 403 a member may not see them (orgs.forbidden); 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

The CI workflows the organisation trusts to act for it with no API key, oldest first, with whether the owner's plan includes them, the audience a workflow asks GitHub's token for, and the issuer. The owner and an admin may look.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Responses

StatusMeaningBody
200The trusted publishers.TrustedPublisherList
401Not signed in.ErrorResponse
403A member may not see them (orgs.forbidden).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 200 answer has the type TrustedPublisherList.

FieldTypeRequiredDescription
activebooleanyesWhether the owner's plan includes trusted publishers. Entries saved before stay, and sign nothing in, while it does not.
plan"free" | "pro" | "enterprise"yes
audiencestring | nullyesThe audience a workflow asks GitHub for: this API's origin. Null on a server that cannot exchange tokens.
issuerstringyes
limitintegeryesThe most trusted publishers an organisation may have.
itemsTrustedPublisher[]yes
items[].idstringyes
items[].namestringyes
items[].provider"github"yes
items[].repositorystringyesThe repository, owner/name.
items[].repositoryIdstring | nullyesGitHub's id of the repository, which a run's token must carry. Null until known: a private repository's is pinned by its first run.
items[].repositoryOwnerIdstring | nullyesGitHub's id of the repository's owner, which a run's token must carry. Null until known.
items[].workflowstringyesThe workflow file in .github/workflows the run must start from.
items[].environmentstring | nullyesThe deployment environment the job must run in, or null for any.
items[].refstring | nullyesThe ref pattern the run must match, such as refs/heads/main, or null for any ref.
items[].permissions("diagrams" | "drift:write")[]yesdiagrams: publish to the organisation's library (and read it and the style rules). drift:write: report drift runs to the Drift tab and read the style rules.
items[].createdAtintegeryesMilliseconds since the epoch.
items[].createdByobject | nullyesWho added it, or null when that account is gone.
items[].createdBy.idstringyes
items[].createdBy.emailstringyes
items[].updatedAtintegeryesMilliseconds since the epoch.
items[].lastUsedAtinteger | nullyesWhen a run last signed in with it, in milliseconds since the epoch, or null for never.

See also

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