pass api request into temp doc creation