What’s the difference between “updated_at” and the “Last-Modified” header?

Hi, I was wondering what the difference is between the “updated_at” field that is returned in the JSON response body and the “Last-Modified” response header. I noticed that when getting specific pull requests (using GET /repos/:owner/:repo/pulls/:pull_number), the “updated_at” field and “Last-Modified” header don’t always line up. I can’t figure out what has been modified, even after pull requests have been merged. Does the modification. have to do with something else?


The updated_at field is a field on a specific record in the database. But the responses from our REST API often contain the information from multiple normalized database records, so the Last-Modified header is the last time that any item in the response was modified.

For example, taking a look at the example response for the get a single pull request API there are multiple updated_at fields:

  • On the top-level record
  • On milestone
  • On head.repo
  • On base.repo

But Last-Modified would be the last time the whole response was updated.

I hope that helps!