The integral you are dealing is a so called Fourier transform - an important type of integral transform. The transform is defined, as in the link, for functions $g\in L^1(\mathbb R^n)$, hence the assumption for $f \in L^1(\mathbb R^n)$.
The interchange of derivative and integral can be justified - at least in the simple $1$-dimensional case - with the Leibniz rule, which can also be extended to the $\mathbb R^d$ case. Another reference would be Real Analysis - Modern Techniques and Their Applications by Gerald B. Folland who states it (don't recall the exact wording):
Let $(X,M, \mu)$ be a measure space and $f ∶ X \times [a, b] \mapsto \mathbb C, (−\infty < a < b < \infty)$, and
$f (\cdot,t) ∶ X \mapsto \mathbb C$ is integrable for all $t\in [a, b]$. Set further $$F(t) = \int_X
f (x,t) d\mu(x).
$$
If we now assume that $\frac{\partial f}{\partial t}$
- exists
- and $\exists g\in L^1(\mu)$ such that $\forall t,x:\big\lvert\frac{\partial f}{\partial t}(x,t)\big\rvert\leq g(x)$
then $F$ is differentiable and we can interchange the order of integration and differentiation and write
$$
F^{'}(t)=\int_X\frac{\partial f}{\partial t}(x,t)d\mu(x)$$
In your case you need also $\frac{\partial f}{\partial t}\in L^1$ to justify the existence of the Fourier transform.
EDIT: to clarify why the conditions are satisfied in the 1-dimensional case, you can generalize this with a little effort to higher dimensions and differentials
We have for $f(x)\in L^1$
$$
g(t,x)=\exp(-2\pi i xt)f(x) \text{ with } \partial_t g(t,x)=(-2\pi i)\exp(-2\pi i xt)xf(x)
$$
we get
$$
\lvert \partial_t g(t,x) \rvert=\lvert (-2\pi i)\exp(-2\pi i xt)xf(x) \rvert= 2\pi \lvert xf(x) \rvert
$$
Since we assumed that $xf(x)\in L^1$ we know that the derivative is bounded by a $L^1$ function and therefore we can interchange the order of integration and differentiation.