Skip to content

REST Pages docs say "can be used without authentication", but GET /repos/{owner}/{repo}/pages and the builds endpoints return 404 without a token #46969

Not planned

Description

@Denzil10

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/pages/pages

What part(s) of the article would you like to see updated?

Three endpoints on this page say:

This endpoint can be used without authentication or the aforementioned permissions if only public resources are requested.

Without a token, all three return 404 Not Found for the public repositories with live Pages sites I tried (below). With my gh CLI token, which has no access to these repositories beyond what is public, they return the data. A 404 reads as "this repository has no Pages site", so someone following the docs gets the wrong answer instead of an auth error.

Reproduced 2026-11-17 (curl 8.7.1, no Authorization header, with and without X-GitHub-Api-Version: 2022-11-28 / 2026-03-10):

$ curl -s -o /dev/null -w '%{http_code}\n' https://api.github.com/repos/octocat/octocat.github.io/pages
404
$ curl -s -o /dev/null -w '%{http_code}\n' https://api.github.com/repos/octocat/octocat.github.io/pages/builds
404
$ curl -s -o /dev/null -w '%{http_code}\n' https://api.github.com/repos/octocat/octocat.github.io/pages/builds/latest
404
$ curl -s -o /dev/null -w '%{http_code}\n' https://api.github.com/repos/octocat/octocat.github.io
200
$ gh api repos/octocat/octocat.github.io/pages --jq .status    # authenticated, not the repo owner
built

GET /repos/{owner}/{repo}/pages gives the same tokenless 404 and authenticated built for pages-themes/cayman, pages-themes/minimal and github/choosealicense.com. The 404 body points back to this page ("documentation_url": "https://docs.github.com/rest/pages/pages#get-a-apiname-pages-site"). Rate limit was not the cause (x-ratelimit-remaining: 45).

Suggested change: drop the "can be used without authentication" line from these three endpoints, or replace it with "Requires authentication, even for public repositories. Unauthenticated requests return 404."

Additional information

AI disclosure: an AI agent (Claude Code, Claude Opus 5.5) found this mismatch, reproduced it and drafted this issue. The commands above were run on my machine on 2026-11-17 and the outputs are copied verbatim.

Activity

  1. added
    triageDo not begin working on this issue until triaged by the team
    on Nov 16, 2026
  2. subatoi commented on Nov 16, 2026

    @subatoi
    Contributor

    @Denzil10 Thanks for raising an issue

    Since the content you've highlighted is solely determined by the API specification, please raise this issue against https://github.com/github/rest-api-description, as that's the right place for such content

    I'm going to go ahead and close this out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageDo not begin working on this issue until triaged by the team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions