Recently, it has been reported that the cells of the immune system, as well as Dictyostelium amoebae, can swim in a bulk fluid by changing their shape repeatedly. We refer to this motion as amoeboid swimming. Here, we explore how the propulsion and the deformation of the cell emerge as an interplay between the active forces that the cell employs to activate the shape changes and the passive, viscoelastic response of the cell membrane, the cytoskeleton, and the surrounding environment. We introduce a model in which the cell is represented by an elastic capsule enclosing a viscous liquid. The motion of the cell is activated by time-dependent forces distributed along its surface. The model is solved numerically using the boundary integral formulation. The cell can swim in a fluid medium using cyclic deformations or strokes. We measure the swimming velocity of the cell as a function of the force amplitude, the stroke frequency, and the viscoelastic properties of the cell and the medium. We show that an increase in the shear modulus leads both to a regular slowdown of the swimming, which is more pronounced for more deflated swimmers, and to a tendency toward cell buckling. For a given stroke frequency, the swimming velocity shows a quadratic dependence on force amplitude for small forces, as expected, but saturates for large forces. We propose a scaling relationship for the dependence of swimming velocity on the relevant parameters that qualitatively reproduces the numerical results and allows us to define regimes in which the cell motility is dominated by elastic response or by the effective cortex viscosity. This leads to an estimate of the effective cortex viscosity of 10 Pa ⋅ s for which the two effects are comparable, which is close to that provided by several experiments.