Let $G$ be an acyclic directed mixed graph representing a semi-Markovian causal model over observed variables $V$. For disjoint $X,Y \subset V$, the ID algorithm returns an expression in the observational law $\mathbb P(V)$ for $\mathbb P(Y \mid do(X=x))$ if and only if the causal effect is identifiable in the nonparametric model associated with $G$.