The answer is 1867.
A federation of colonies in British North America - New Brunswick, Nova Scotia, Quebec, and Ontario - joined together to become the Dominion of Canada on July 1, 1867.
On WorldAtlas.com