curl the API