How to pass aa JS variable to PHP?


I am fetching data from an API using JS. How can I use this data with PHP. More specifically, assign this data to a $ _SESSION variable in PHP so that I can use it in other pages(templates files)?