Add API example to docs