Added a refresh endpoint (which exhibits bugs, filed a ticket with github support), and some more error conditions for create/update