The paper is devoted to study of the inverse problem of the boundary spectral assignment of the Sturm--Liouville with a delay. $$ -y"(x)+q(x)y(\alpha\cdot x)=\lambda y(x),\quad q\in AC[0,\pi],\quad \alpha\in(0,1] \tag{1} $$ with separated boundary conditions: $$ y(0)=y(\pi)=0 \tag{2} $$ $$ y(0)=y'(\pi)=0 \tag{3} $$ It is argued that if the sequence of eigenvalues is given $\lambda^(1)_n$ and $\lambda^(2)_n$ tasks (1-2) and (1-3) respectively, then the delay factor $\alpha\in(0,1)$ and the potential $q\in AC[0,\pi]$ are unambiguous. The potential $q$ is composed by means of trigonometric Fourier coefficients. The method can be easily transferred to the case of $\alpha=1$ i.e. to the classical Sturm-Liouville problem.