Add JSON API for paste creation