Skip to content

Add Image From URL

Tool name: upload-email-editor-image-from-url

Adds one image that exists at a public URL to a KlickTipp account's image library -- the files the email editor's file manager shows -- and returns its public URL, ready for an image block in update-email-editor-image-block (field src). The server fetches the URL itself; it has to be reachable from the internet, without login, and may not point at a private host. Accepts JPEG, PNG, GIF and WebP up to 5 MB. Nothing is overwritten: a taken name is numbered, and the result says under which name the file was stored. This is the way a stock photo from search-email-editor-stock-images enters the library: pass its sourceUrl and fileName. Adds to the account the access token belongs to, or to one of its subaccounts when an account ID is given. A file on the user's own disk goes through the form open-email-editor-image-upload opens.

Input schema

fileNamestring, [ 1 .. 250 ] charactersrequired

Name for the file, extension optional; sanitised, extension set from the bytes, a taken name is numbered, never overwritten -- see storedAs

sourceUrlstring, [ 12 .. 2000 ] charactersrequired

Public http(s) URL the server fetches the image from; reachable from the internet, no login, no private host

foldernull or string, <= 250 characters

Folder of the library to store it in, as list-email-editor-image-folders lists it; omit for the library's root

Default:null
accountIdnull or integer, >= 1

User ID of the account; omit for the account the access token works in

Default:null
Input example
{ "fileName": "string", "sourceUrl": "stringstring", "folder": null, "accountId": null }

Output schema

accountIdintegerrequired
uploadedbooleanrequired
storedAsstring or nullrequired
imageobject or nullrequired
foldersArray of stringsrequired
htmlstringrequired
Output example
{ "accountId": 0, "uploaded": true, "storedAs": "string", "image": { "url": "string", "path": "string", "fileName": "string", "mimeType": "string", "sizeBytes": 0, "uploadedAt": "string", "width": 0, "height": 0 }, "folders": [ "string" ], "html": "string" }