Jesus' promise to his apostles that he would send them the Holy Spirit to remind them of "everything I have said to you", is a guarantee that what they wrote is "theopneustos" [God-breathed]. No writing after the death of the 12 can be canonical. Only the 12 can attest to the truth of a writing about Christ. When all the eyewitnesses had died, the canon of revelation about Christ ceased.
In A.D. 367 the Thirty-ninth Paschal Letter of Athanasius contained an exact list of the twenty-seven New Testament books we have today. This was the list of books accepted by the churches in the eastern part of the Mediterranean world. Thirty years later, in A.D. 397, the Council of Carthage, representing the churches in the western part of the Mediterranean world, agreed with the eastern churches on the same list. These are the earliest final lists of our canon of Scripture.