How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

GitHub Secrets API

The Secrets API from GitHub — 19 operation(s) for secrets.

GitHub Secrets API is one of 350 APIs that GitHub publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.

Tagged areas include Secrets. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an AsyncAPI specification, and an API reference.

This API exposes 34 operations across 19 paths, and defines 41 schemas. It is described by OpenAPI 3.2.0, at version 1.1.4.

Requests are made against 2 base URLs: {protocol}://{hostname}/api/v3, {protocol}://{hostname}.

34 operations 19 paths 41 schemas 7 DELETE17 GET1 PATCH9 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.1.4
Base URL
https://api.github.com
Authentication
HTTP Bearer
License
Terms of Service
Resource Areas
1

Authentication & Security 1

GitHub Secrets API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerHttpAuthentication).

  • bearerHttpAuthentication — Bearer Token

Paths & Operations 34

Across 19 paths, the API surfaces 34 operations — 7 DELETE, 17 GET, 1 PATCH, 9 PUT. Each is listed below with its method, path, parameters, and response codes.

Secrets 34
GET
/orgs/{org}/actions/secrets
GitHub List Organization Secrets
listOrganizationSecrets 3 params → 200
GET
/orgs/{org}/actions/secrets/{secret_name}
GitHub Get an Organization Secret
getAnOrganizationSecret 2 params → 200
PUT
/orgs/{org}/actions/secrets/{secret_name}
GitHub Create or Update an Organization Secret
createOrUpdateAnOrganizationSecret 2 params body → 201204
DELETE
/orgs/{org}/actions/secrets/{secret_name}
GitHub Delete an Organization Secret
deleteAnOrganizationSecret 2 params → 204
GET
/orgs/{org}/actions/secrets/{secret_name}/repositories
GitHub List Selected Repositories for an Organization Secret
listSelectedRepositoriesForAnOrganizationSecret 4 params → 200
PUT
/orgs/{org}/actions/secrets/{secret_name}/repositories
GitHub Set Selected Repositories for an Organization Secret
setSelectedRepositoriesForAnOrganizationSecret 2 params body → 204
PUT
/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}
GitHub Add Selected Repository to an Organization Secret
addSelectedRepositoryToAnOrganizationSecret 3 params → 204409
DELETE
/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}
GitHub Remove Selected Repository from an Organization Secret
removeSelectedRepositoryFromAnOrganizationSecret 3 params → 204409
GET
/orgs/{org}/dependabot/secrets
GitHub List Organization Secrets
listOrganizationSecrets 3 params → 200
GET
/orgs/{org}/dependabot/secrets/{secret_name}
GitHub Get an Organization Secret
getAnOrganizationSecret 2 params → 200
PUT
/orgs/{org}/dependabot/secrets/{secret_name}
GitHub Create or Update an Organization Secret
createOrUpdateAnOrganizationSecret 2 params body → 201204
DELETE
/orgs/{org}/dependabot/secrets/{secret_name}
GitHub Delete an Organization Secret
deleteAnOrganizationSecret 2 params → 204
GET
/orgs/{org}/dependabot/secrets/{secret_name}/repositories
GitHub List Selected Repositories for an Organization Secret
listSelectedRepositoriesForAnOrganizationSecret 4 params → 200
PUT
/orgs/{org}/dependabot/secrets/{secret_name}/repositories
GitHub Set Selected Repositories for an Organization Secret
setSelectedRepositoriesForAnOrganizationSecret 2 params body → 204
PUT
/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}
GitHub Add Selected Repository to an Organization Secret
addSelectedRepositoryToAnOrganizationSecret 3 params → 204409
DELETE
/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}
GitHub Remove Selected Repository from an Organization Secret
removeSelectedRepositoryFromAnOrganizationSecret 3 params → 204409
GET
/orgs/{org}/secret-scanning/alerts
GitHub List Secret Scanning Alerts for an Organization
listSecretScanningAlertsForAnOrganization 10 params → 200404503
GET
/repos/{owner}/{repo}/actions/organization-secrets
GitHub List Repository Organization Secrets
listRepositoryOrganizationSecrets 7 params → 200
GET
/repos/{owner}/{repo}/actions/secrets
GitHub List Repository Secrets
listRepositorySecrets 7 params → 200
GET
/repos/{owner}/{repo}/actions/secrets/{secret_name}
GitHub Get Repository Secret
getRepositorySecret 6 params → 200
PUT
/repos/{owner}/{repo}/actions/secrets/{secret_name}
GitHub Create or Update Repository Secret
createOrUpdateRepositorySecret 6 params body → 201204
DELETE
/repos/{owner}/{repo}/actions/secrets/{secret_name}
GitHub Delete Repository Secret
deleteRepositorySecret 6 params → 204
GET
/repos/{owner}/{repo}/dependabot/secrets
GitHub List Repository Secrets
listRepositoryDependabotSecrets 7 params → 200
GET
/repos/{owner}/{repo}/dependabot/secrets/{secret_name}
GitHub Get Repository Secret
getRepositoryDependabotSecret 6 params → 200
PUT
/repos/{owner}/{repo}/dependabot/secrets/{secret_name}
GitHub Create or Update Repository Secret
createOrUpdateRepositoryDependabotSecret 6 params body → 201204
DELETE
/repos/{owner}/{repo}/dependabot/secrets/{secret_name}
GitHub Delete Repository Secret
deleteRepositoryDependabotSecret 6 params → 204
GET
/repos/{owner}/{repo}/environments/{environment_name}/secrets
GitHub List Environment Secrets
listEnvironmentSecrets 8 params → 200
GET
/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
GitHub Get an Environment Secret
getAnEnvironmentSecret 7 params → 200
PUT
/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
GitHub Create or Update an Environment Secret
createOrUpdateAnEnvironmentSecret 7 params body → 201204
DELETE
/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}
GitHub Delete an Environment Secret
deleteAnEnvironmentSecret 7 params → 204
GET
/repos/{owner}/{repo}/secret-scanning/alerts
GitHub List Secret Scanning Alerts for Repository
listSecretScanningAlertsForRepository 14 params → 200404503
GET
/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}
GitHub Get Secret Scanning Alert
getSecretScanningAlert 6 params → 200304404503
PATCH
/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}
GitHub Update Secret Scanning Alert
updateSecretScanningAlert 6 params body → 200400404422503
GET
/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations
GitHub List Locations for Secret Scanning Alert
listLocationsForSecretScanningAlert 8 params → 200404503

Schemas 41

The contract defines 41 schemas that model the data the API accepts and returns. The most detailed are minimal-repository (87 properties), simple-repository (46 properties), nullable-simple-user_2 (21 properties), simple-user (21 properties). Each schema is shown below with its type and property counts.

secret-scanning-alert-resolution
stringnull
Required when the state is resolved. The reason for resolving the alert.
alert-created-at
string
The time that the alert was created in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
code-of-conduct
object
Code Of Conduct
5 properties 4 required
alert-html-url
string
The GitHub URL of the alert resource.
secret-scanning-alert-state
string
Sets the state of the secret scanning alert. You must provide resolution when you set the state to resolved.
minimal-repository
object
Minimal Repository
87 properties 46 required
organization-actions-secret
object
Secrets for GitHub Actions for an organization.
5 properties 4 required
security-and-analysis
objectnull
3 properties
simple-user
object
A GitHub user.
21 properties 18 required
organization-secret-scanning-alert
object
18 properties
simple-repository
object
A GitHub repository.
46 properties 46 required
basic-error
object
Basic Error
4 properties
alert-number
integer
The security alert number.
nullable-alert-updated-at
stringnull
The time that the alert was last updated in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
empty-object
object
An object without any properties.
alert-url
string
The REST API URL of the alert resource.
organization-dependabot-secret
object
Secrets for GitHub Dependabot for an organization.
5 properties 4 required
nullable-simple-user
objectnull
A GitHub user.
21 properties 18 required
empty-object_2
object
An object without any properties.
actions-secret
object
Set secrets for GitHub Actions.
3 properties 3 required
empty-object_3
object
An object without any properties.
dependabot-secret
object
Set secrets for Dependabot.
3 properties 3 required
secret-scanning-alert-resolution_2
string
Required when the state is resolved. The reason for resolving the alert.
secret-scanning-location
object
2 properties 2 required
secret-scanning-alert-resolution-comment
string
An optional comment when closing an alert. Cannot be updated or deleted. Must be null when changing state to open.
secret-scanning-location-discussion-body
object
Represents a 'discussionbody' secret scanning location type. This location type shows that a secret was detected in the body of a discussion.
1 property 1 required
secret-scanning-location-issue-body
object
Represents an 'issuebody' secret scanning location type. This location type shows that a secret was detected in the body of an issue.
1 property 1 required
secret-scanning-location-issue-comment
object
Represents an 'issuecomment' secret scanning location type. This location type shows that a secret was detected in a comment on an issue.
1 property 1 required
secret-scanning-location-pull-request-body
object
Represents a 'pullrequestbody' secret scanning location type. This location type shows that a secret was detected in the body of a pull request.
1 property 1 required
secret-scanning-location-discussion-comment
object
Represents a 'discussioncomment' secret scanning location type. This location type shows that a secret was detected in a comment on a discussion.
1 property 1 required
nullable-alert-updated-at_2
string
The time that the alert was last updated in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
secret-scanning-location-pull-request-title
object
Represents a 'pullrequesttitle' secret scanning location type. This location type shows that a secret was detected in the title of a pull request.
1 property 1 required
secret-scanning-location-commit
object
Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository.
9 properties 9 required
secret-scanning-location-pull-request-review-comment
object
Represents a 'pullrequestreviewcomment' secret scanning location type. This location type shows that a secret was detected in a review comment on a pull reques…
1 property 1 required
secret-scanning-location-discussion-title
object
Represents a 'discussiontitle' secret scanning location type. This location type shows that a secret was detected in the title of a discussion.
1 property 1 required
secret-scanning-location-issue-title
object
Represents an 'issuetitle' secret scanning location type. This location type shows that a secret was detected in the title of an issue.
1 property 1 required
empty-object_4
object
An object without any properties.
secret-scanning-location-pull-request-review
object
Represents a 'pullrequestreview' secret scanning location type. This location type shows that a secret was detected in a review on a pull request.
1 property 1 required
secret-scanning-alert
object
17 properties
secret-scanning-location-pull-request-comment
object
Represents a 'pullrequestcomment' secret scanning location type. This location type shows that a secret was detected in a comment on a pull request.
1 property 1 required
nullable-simple-user_2
object
GitHub user.
21 properties 18 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

github-secrets-api-openapi.yml Raw ↑

Other APIs GitHub publishes across the network.

GitHub Events API
GitHub Feeds API
GitHub Gists API
GitHub Issues API
GitHub Licenses API
GitHub Markdown API
GitHub Meta API
GitHub Notifications API
GitHub Octocat API
GitHub Projects API
GitHub Repos API
GitHub Search API
Where this information came from

This is an independent, third-party profile of GitHub Secrets API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.