REST API endpoints for artifact attestations

Use the REST API to manage artifact attestations.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List attestations by bulk subject digests

POST /users/{username}/attestations/bulk-list

List a collection of artifact attestations associated with any entry in a list of subject digests owned by a user.
The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the attestations:read permission is required.
Please note: in order to offer meaningful security benefits, an attestation's signature and timestamps must be cryptographically verified, and the identity of the attestation signer must be validated. Attestations can be verified using the GitHub CLI attestation verify command. For more information, see our guide on how to use artifact attestations to establish a build's provenance.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/users/USERNAME/attestations/bulk-list \
  -d '{
  "subject_digests": [
    "sha256:abc123",
    "sha512:def456"
  ]
}'

Response schema (Status: 200):

Delete attestations in bulk

POST /users/{username}/attestations/delete-request

Delete artifact attestations in bulk by either subject digests or unique ID.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Delete by subject digests

Request:

curl -L \
  -X POST \
  https://api.github.com/users/USERNAME/attestations/delete-request \
  -d '{
  "subject_digests": [
    "sha256:abc123",
    "sha512:def456"
  ]
}'

Response schema (Status: 200):

Delete by attestation IDs

Request:

curl -L \
  -X POST \
  https://api.github.com/users/USERNAME/attestations/delete-request \
  -d '{
  "attestation_ids": [
    111,
    222
  ]
}'

Response schema (Status: 200):

Delete attestations by subject digest

DELETE /users/{username}/attestations/digest/{subject_digest}

Delete an artifact attestation by subject digest.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example 1: Status Code 200

Request:

curl -L \
  -X DELETE \
  https://api.github.com/users/USERNAME/attestations/digest/SUBJECT_DIGEST

Response schema (Status: 200):

Example 2: Status Code 204

Request:

curl -L \
  -X DELETE \
  https://api.github.com/users/USERNAME/attestations/digest/SUBJECT_DIGEST

Response schema (Status: 204):

Delete attestations by ID

DELETE /users/{username}/attestations/{attestation_id}

Delete an artifact attestation by unique ID that is associated with a repository owned by a user.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example 1: Status Code 200

Request:

curl -L \
  -X DELETE \
  https://api.github.com/users/USERNAME/attestations/ATTESTATION_ID

Response schema (Status: 200):

Example 2: Status Code 204

Request:

curl -L \
  -X DELETE \
  https://api.github.com/users/USERNAME/attestations/ATTESTATION_ID

Response schema (Status: 204):

List attestations

GET /users/{username}/attestations/{subject_digest}

List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.
The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the attestations:read permission is required.
Please note: in order to offer meaningful security benefits, an attestation's signature and timestamps must be cryptographically verified, and the identity of the attestation signer must be validated. Attestations can be verified using the GitHub CLI attestation verify command. For more information, see our guide on how to use artifact attestations to establish a build's provenance.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/users/USERNAME/attestations/SUBJECT_DIGEST

Response schema (Status: 200):