Implement doc/link_id, doc/link_id/smscode API