Skip to navigation

Add Template From Url

Use a picture on the web as a background, by its address, as the composer’s box does: named after the file, with two captions (TOP_BOTTOM). Left out of the library unless curate is true (a key’s, or the session of an app admin of Memegen), so anybody but a Viewer of Memegen may add one for the meme they are making. A new one is 201. The same address again is the template already there, 200, promoted into the library if curate asks; if an app admin archived it, a key or an app admin’s session gets it back in the picker, and anybody else is refused with 403 admin_required and it stays archived. A key’s is credited to the key’s maker.

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
urlstringRequired

The picture’s web address, http or https; https:// is assumed when there is no scheme. Any other scheme (javascript:, data:) is 422.

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