# Stacks with representable morphisms to algebraic stacks

If $Y$ is an algebraic stack over a scheme $S$ and $X$ is a stack such that there exists an $S$-morphism $X\to Y$ representable by algebraic spaces, then is $X$ an algebraic stack (in the sense that its diagonal is representable, and that it admits a smooth presentation)?

My guess is that this is quite obvious (by simply pulling-back the smooth presentation and consideration of some Cartesian diagrams involving diagonals). I just wanted to be sure I'm not missing any subtleties.

(If I understand correctly, the "contained in $Sch_{fppf}$" condition just means that we must work with schemes that have some upper bound on their cardinality to avoid set-theoretic difficulties.)