Let us place ourselves in a category $\mathcal C$ with finite coproducts $X\amalg Y$, even cocomplete if necessary. It is well known that the morphism set $\mathcal C(X,Y)$ carries an abelian group structure natural in $Y$ if and only if there are maps
$$\mu\colon X\longrightarrow X\amalg X, \qquad \iota\colon X\longrightarrow X, \qquad \theta\colon X\longrightarrow \varnothing,$$
which satisfy properties dual to the multiplication, the inversion, and the inclusion of the neutral element in a group (here $\varnothing$ is the initial object). These properties are stated in terms of diagrams, which must commute, see below. Such objects are called cogroup objects.
In a certain category, I've found certain cogroup objects $X$, which are in addition cocommutative, and equipped with maps
$$\alpha^*\colon X\longrightarrow X,\qquad\alpha\in k,$$
indexed by the elements of a commutative ring $k$. I suspect they produce a $k$-module structure in $\mathcal C(X,Y)$ natural in $Y$. Are the necessary commutative diagrams written down in a reference? Where have such objects appeared before? That should be equivalent to giving a contravariant functor from f.g. free $k$-modules to $\mathcal C$.
Now, the diagrams for a cogroup object (I don't know why I write them since anyone which has read up to here surely knows them by heart):
$$\begin{array}{ccc} X&\stackrel{\mu}\longrightarrow &X\amalg X\\ {\scriptstyle\mu}\downarrow&&\downarrow \scriptstyle 1\amalg \mu\\ X\amalg X&\stackrel{\mu\amalg 1}\longrightarrow&X\amalg X\amalg X \end{array}$$
$$\begin{array}{ccc} X&\stackrel{\mu}\longrightarrow&X\amalg X\\ {\scriptstyle\theta}\downarrow&&\downarrow\scriptstyle (1,\iota)\\ \varnothing&\longrightarrow&X \end{array}\qquad\quad\begin{array}{ccc} X&\stackrel{\mu}\longrightarrow&X\amalg X\\ {\scriptstyle\theta}\downarrow&&\downarrow\scriptstyle (\iota,1)\\ \varnothing&\longrightarrow&X \end{array}$$
$$\begin{array}{ccc} X&\stackrel{\mu}\longrightarrow&X\amalg X\\ {\scriptstyle 1}\downarrow&&\downarrow\scriptstyle 1\amalg \theta\\ X&=&X\amalg\varnothing \end{array}\qquad\qquad\qquad\begin{array}{ccc} X&\stackrel{\mu}\longrightarrow&X\amalg X\\ {\scriptstyle 1}\downarrow&&\downarrow\scriptstyle \theta\amalg 1\\ X&=&\varnothing\amalg X \end{array}$$