Skip to navigation

Import Meme Format

Bring a result from GET /meme-formats into the workspace as a template, with its credit, as the composer does. The result is checked again as memegen.link’s own answer was (an https picture, 1 to 3 captions), so one altered on the way back that no longer makes a usable background is 422. Left out of the library unless curate is true (a key’s, or the session of an app admin of Memegen). A new one is 201; the same format again is the template already there, 200, and one an app admin archived comes back only for a key or an app admin’s session (403 admin_required for anybody else’s).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
idstringRequired
titlestringRequired
urlstringRequired
linesintegerRequired
sourceUrlstringOptional
curatebooleanOptional

true adds it to the library everyone picks from, which only a key or the session of an app admin of Memegen may do (403 admin_required otherwise). Left out or false, it is a background for one meme, which anybody but a Viewer of Memegen may add, and stays out of the picker.

Response

This endpoint returns an object.
idstring
organizationIdstring
namestring
slugstring
layoutenum
Where the captions sit on a template.
Allowed values:
curatedboolean
Part of the library the workspace curates, rather than a background somebody found while composing one meme. Only curated templates appear in the picker.
archivedboolean

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.

sortOrderinteger
createdAtdatetime
updatedAtdatetime
builtinKeystringOptional
Set on the templates that ship with the app.
imageUrlstringOptional

The background, an http or https address. Absent on a built-in, which the app draws itself.

widthintegerOptional
The background's real pixel size, so the canvas can match the picture instead of cropping it into a fixed box.
heightintegerOptional
attributionstringOptional
Where a searched template came from. The background is served from there rather than copied, so the credit stays with the row.
sourceUrlstringOptional
Where the credit links to, an http or https address.

Errors

402
Subscription Required Error
403
Forbidden Error
422
Validation Error
429
Too Many Requests Error