I've spent the last hour searching for an official Google Voice API documentation but couldn't find anything but a bunch of API wrappers in (insert your favorite programming language here)
.
Does a documentation for Google Voice's API not exist?
If you're okay with JavaScript you can take a look at their chrome extension, it gives you good idea on how to hack something together. For instance I've found this: http://google.com/voice/request/messages it gives you a list of messages in JSON http://google.com/voice/request/user gives you your contacts and your GV number