Epidemic spreading is well understood when a disease propagates around a contact graph. In a stochastic susceptible-infected-susceptible setting, spectral conditions characterise whether the disease vanishes. However, modelling human interactions using a graph is a simplification which only considers pairwise relationships. This does not fully represent the more realistic case where people meet in groups. Hyperedges can be used to record such group interactions, yielding more faithful and flexible models, allowing for the rate of infection of a node to vary as a nonlinear function of the number of infectious neighbors. We discuss different types of contagion models in this hypergraph setting, and derive spectral conditions that characterize whether the disease vanishes. We study both the exact individual-level stochastic model and a deterministic mean field ODE approximation. Numerical simulations are provided to illustrate the analysis. We also interpret our results and show how the hypergraph model allows us to distinguish between contributions to infectiousness that (a) are inherent in the nature of the pathogen and (b) arise from behavioural choices (such as social distancing, increased hygiene and use of masks). This raises the possibility of more accurately quantifying the effect of interventions that are designed to contain the spread of a virus.