$J$ invariant of elliptic over a number field

Suppose $E$ and $E’$ are elliptic curves over a number field $K$ which are Galois conjugate over $\mathbb Q$. So $\operatorname{End}_C(E)$ and $\operatorname{End}_C(E’)$ are isomorphic. Suppose $\operatorname{End}_C(E)$ is the ring of integers of a quadratic imaginary field with class number $1$. How can I show that $j(E)$ lies in $\mathbb Q$.

This is one of the basic facts about complex multiplication: there is a simply transitive action of the ideal class group $Cl(K)$ of $K$ on the set $E(\mathcal O_K)$ of isomorphism classes of elliptic curves with complex multiplication by $\mathcal O_K$ (this is defined as follows: if $E=\mathbb C/\Lambda$ has CM by $\mathcal O_K$ and $\mathfrak a\in Cl(K)$, then $\mathfrak a E\colon = \mathbb C/\mathfrak a^{-1}\Lambda$). Therefore, in particular, $|Cl(K)|=|E(\mathcal O_K)|$. When $K$ has class number one, this implies that all elliptic curve with complex multiplication by $\mathcal O_K$ are isomorphic. Since for every $\sigma\in \text{Gal}(\overline{\mathbb Q}/\mathbb Q)$ the curves $E$ and ${}^{\sigma}E$ have the same endomorphism ring, if $|Cl(K)|=1$ we have that $j(E)=j({}^{\sigma}E)={}^{\sigma}j(E)$, which means that $j(E)\in \mathbb Q$.