Introduce a document API