A monoid object in a pointed category $\mathcal{C}$ is an object $M$ equipped
with a multiplication morphism $\mu: M\times M\to M$ that is associative and unital, meaning that the diagrams that express those properties commute.  A (two-sided) $M$ "module" also can be formulated in terms of arrows:  we need action map $\alpha_R:X\times M \to X$ and $\alpha_L:M\times X\to X$ that are associative and unital.  The arrows $M \to M\times X\to X$ and $M\to X\times M \to X$ should be equal; let's call it $t:M\to X$.

Now let $t: M\to X$ be the morphism from the monoid $M$ to its two-sided module $X$.  I'd like to find an "extension" $e:M\to N$ of $M$ using $t$.  The properties that I want for the extension are 

 1. $N$ should be a monoid object and $e$ should be a homomorphism
 2. $e$ should factor $M\xrightarrow{t} T\xrightarrow{f}N$
 3. if $h:M\to Q$ is a monoid homomorphism that factors $M\xrightarrow{t}T\xrightarrow{k} Q$ for some morphism $k:T\to Q$, then there is a unique homomorphism $g_k: N\to Q$ such that $k =g_k\circ f$.

I have a plan for how to make this construction.  Set $N(0) = M$ and inductively define $N(k)$ by forming the pushouts of the diagrams
$$
 N(k)
 \longleftarrow
          (N(k)\times_{M} N(0)) 
          \cup 
          (N(k-1) \times_{M} N(1)) 
\longrightarrow
         N(k)\times_{M}   N(1)          
$$
Some notes:

 1. The notation $A \times_M B$ indicates a "tensor product of modules" defined to be the pushout of $A\times B \gets A\times M \times B\to A\times B$, using the action map of $A$ on the left and $B$ on the right.
 2. I am using union as shorthand for a pushout).
 3. Partial multiplications $N(k)\times_M N(\ell) \to N(k+\ell)$ would have to be defined along the construction.

I don't have any serious fears about this construction; but rather than work it all out and write it all down, I'd prefer a good reference. 

**Question:**  *Is there a good reference for monoid extensions in this sort of categorical generality?*