SPHEREx, a mission in NASA's Medium Explorer (MIDEX) program that was selected for a competitive Phase A in August 2017, is an all-sky survey satellite designed to address all three science goals in NASA's astrophysics division, with a single instrument, a wide-field spectral imager. We will probe the physics of inflation by measuring non-Gaussianity by studying large-scale structure, surveying a large cosmological volume at low redshifts, complementing high-z surveys optimized to constrain dark energy. The origin of water and biogenic molecules will be investigated in all phases of planetary system formation - from molecular clouds to young stellar systems with protoplanetary disks - by measuring ice absorption spectra. We will chart the origin and history of galaxy formation through a deep survey mapping large-scale spatial power in two deep fields located near the ecliptic poles. Following in the tradition of all-sky missions such as IRAS, COBE and WISE, SPHEREx will be the first all-sky near-infrared spectral survey. SPHEREx will create spectra (0.75 – 4.2 um at R = 40, and 4.2 – 5 um at R = 135) with high sensitivity using a cooled telescope with a wide field-of-view for large mapping speed. During its two-year mission, SPHEREx will produce four complete all-sky maps that will serve as a rich archive for the astronomy community. With over a billion detected galaxies, hundreds of millions of high-quality stellar and galactic spectra, and over a million ice absorption spectra, the archive will enable diverse scientific investigations including studies of young stellar systems, brown dwarfs, high-redshift quasars, galaxy clusters, the interstellar medium, asteroids and comets.