  We perform a high precision measurement of the static $q\bar{q}$ potential in
three-dimensional SU($N$) gauge theory with $N=2,3$ and compare the results to
the potential obtained from the effective string theory. In particular, we show
that the exponent of the leading order correction in $1/R$ is 4, as predicted,
and obtain accurate results for the continuum limits of the string tension and
the non-universal boundary coefficient $\bar{b}_2$, including an extensive
analysis of all types of systematic uncertainties. We find that the magnitude
of $\bar{b}_2$ decreases with increasing $N$, leading to the possibility of a
vanishing $\bar{b}_2$ in the large $N$ limit. In the standard form of the
effective string theory possible massive modes and the presence of a rigidity
term are usually not considered, even though they might give a contribution to
the energy levels. To investigate the effect of these terms, we perform a
second analysis, including these contributions. We find that the associated
expression for the potential also provides a good description of the data. The
resulting continuum values for $\bar{b}_2$ are about a factor of 2 smaller than
in the standard analysis, due to contaminations from an additional $1/R^4$
term. However, $\bar{b}_2$ shows a similar decrease in magnitude with
increasing $N$. In the course of this extended analysis we also obtain
continuum results for the masses appearing in the additional terms and we find
that they are around twice as large as the square root of the string tension in
the continuum and compatible between SU(2) and SU(3) gauge theory. In the
follow up papers we will extend our investigations to the large $N$ limit and
excited states of the open flux tube.
