Upload Template
Add a background by sending the picture itself, as multipart/form-data.
createTemplate takes an address, which assumes the caller already has
somewhere to serve the file from. A script pulling pictures out of a
shared drive does not. The image’s dimensions are read from the file,
so they do not need to be supplied.
It joins the library unless sent curate=false, so by default it is
a key’s, which acts with an app admin’s rights, or the session of an
app admin of Memegen; anybody else’s session is 403 admin_required. With
curate=false it is a background for one meme, which anybody but a
Viewer of Memegen (403 viewer_only) may upload, as in the app and
through MCP, and stays out of the picker.
Each upload is a new template; its slug comes from its name,
numbered (-2, -3…) if it clashes.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
true or false. Left out, true: into the library, an
app admin’s or a key’s. false: a background for one meme,
anybody’s but a Viewer’s. Anything else is 422.
Response
Out of the picker. Memes already made from it keep rendering, which
is why a template is archived rather than deleted, but no new meme
can be made from it. Only an app admin of Memegen, or a key, brings one back:
archived: false on PATCH, or adding its picture again with
POST /meme-templates, /meme-templates/from-url or
/meme-templates/import, which restores it. Anybody else who adds
the same picture again is refused (“An admin removed this
template.”) and it stays archived.
The background, an http or https address. Absent on a built-in, which the app draws itself.