Skip to content

misleading webhook payload schema docs #43314

Closed as duplicate
Closed as duplicate

Description

@bensgilbert

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/webhooks/webhook-events-and-payloads

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

When receiving a push event in a GitHub app, you'll receive an object with top level installation property:
"installation":{"id":...,"node_id":...}

When receiving an installation/installation_repositories event you'll receive an object with top level installation property:
"installation":{"id":...,"client_id":...,"account":...,"repository_selection":...,"access_tokens_url":...,"repositories_url":...,"html_url":...,"app_id":...,"app_slug":...,"target_id":...,"target_type":...,"permissions":...,"events":...,"created_at":...,"updated_at":...,"single_file_name":null,"has_multiple_single_files":...,"single_file_paths":...,"suspended_by":...,"suspended_at":...}

Both are documented with the description: "Installation" and the generic type "object". The only property in common is "id" (side node, I'm surprised that "node_id" isn't common, probably an implementation thing not sending it 🤔)

I'd much appreciate it if some of the properties were given a little more description, for example the entire schema of the installation object and the circumstances/conditions where some properties might not be sent. The same can be said for the following properties in the docs:
"enterprise": object
"organization": object
"repository": object
"sender": object
Which are all generically typed as "object"

I haven't found anywhere that describes the shape of these objects and the inconsistency can make an app break without warning.
edit: I found the github api schema which is useful and in my opinion, should be linked by the docs in more places (in the webhook-events-and-payloads article for example). Alternatively, a brief note in that article should mention that one typing of Installation is not the same as another and to make no assumptions.

Additional information

No response

Activity

  1. added
    contentThis issue or pull request belongs to the Docs Content team
    on Mar 11, 2026
  2. added
    triageDo not begin working on this issue until triaged by the team
    on Mar 11, 2026
  3. added
    webhooksContent related to webhooks
    and removed
    triageDo not begin working on this issue until triaged by the team
    on Mar 12, 2026
  4. Sharra-writes commented on Mar 12, 2026

    @Sharra-writes
    Contributor

    @bensgilbert I'll have to look into this to find out how much bandwidth we have to tackle it.

  5. github-actions commented on Apr 13, 2026

    @github-actions
    Contributor

    A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.

  6. added
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Apr 13, 2026
  7. bensgilbert commented on Apr 13, 2026

    @bensgilbert
    Author

    not stale (hopefully)!

  8. removed
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Apr 15, 2026
  9. rnagulapalle commented on Apr 15, 2026

    @rnagulapalle

    i think this is real docs problem, not just wording thing

    from what i can see in webhook docs, fields like installation, repository, sender, organization are documented one time as generic object, and then event pages mostly show only extra fields for that event.

    problem is for webhook consumer this is bit risky. same field name does not always mean same shape in all events. if dev builds typed handler or validator from docs, it can work for one event and break in another one later.

    so maybe missing part is not full duplicate schema everywhere, but at least some event-level note like:

    this object is partial here
    this object shape is different in this event family
    do not assume same structure across all webhook payloads
    i think this will help lot for people building app/webhook parsers from docs, specially typed ones

  10. bensgilbert commented on Apr 16, 2026

    @bensgilbert
    Author

    if dev builds typed handler or validator from docs, it can work for one event and break in another one later.

    that's exactly what happened to me :)
    I was creating python pydantic models for deserialization of event payloads and assumed the structure of the same field was consistent across events, resulting in my program breaking and a lot of confusion

  11. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.

  12. added
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Jul 20, 2026
  13. bensgilbert commented on Jul 30, 2026

    @bensgilbert
    Author

    not stale, @Sharra-writes any progress?

  14. added
    needs SMEThis proposal needs review from a subject matter expert
    and removed
    InactiveWill be closed automatically by a stall check if no activity is detected.
    on Aug 7, 2026
  15. github-actions commented on Aug 7, 2026

    @github-actions
    Contributor

    Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀

  16. github-actions commented on Sep 7, 2026

    @github-actions
    Contributor

    This is a gentle reminder for the Technical Content team that this issue is waiting for technical review by a subject matter expert (SME).

  17. subatoi commented on Sep 10, 2026

    @subatoi
    Contributor

    Hi @bensgilbert, I'm very sorry for the delay in replying to you here, and getting this to the right place.

    You already noted https://github.com/github/rest-api-description. The right thing to do here is actually to raise an issue against that repo, if you haven't already, because the content you've noted here is pulled directly from that schema.

    Unfortunately we're unable to progress this issue via this repo, and I'll need to close this, but I'll try to clarify our contributing guidelines as I think they could be clearer.

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

    Waiting on SME reviewThe request for a technical review by a subject matter expert has stalled.contentThis issue or pull request belongs to the Docs Content teamneeds SMEThis proposal needs review from a subject matter expertwebhooksContent related to webhooks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions