I am very curious. I found both the Constitution of Medina and the cyrus cylinder but are these the first time in human history that man was given rights in something of an official document?
I think the oldest known law code is Hamurrabi's code, in Babylonia. We know it because it was written on rocks and displayed to the whole public in the cities, so that every citizen was aware of their rights.
Some of these rocks still exist, I saw one of them in Louvre Museum. It is very impressive, there are hundreds of laws.