Produkte und Dateien
Upload image
/ v1 / images Uploads an image from your disk for a sales page, course, module, email or landing page: PNG, JPG, GIF or WebP, at most 10 MB.
- Send
file_nameandsize_bytes. The answer has anupload_url. - Send the bytes there with HTTP PUT.
- Call
POST /v1/images/{upload_id}/finishwith theupload_id.
An image that is already at a public URL needs no upload: put the URL into images directly. For files that buyers get, use POST /v1/files.
Autorisierung
-
Authorizationstring Header erforderlichBearer tnt_…· A personal API key (tnt_...). Create it in the Tentary app on the page AI & API. Einführung
Body application/json
-
file_namestring erforderlichName with extension, like "cover.png".
max. Länge
250 -
size_bytesinteger erforderlichThe exact file size.
min.
1max.10485760
Antwort
Felder der Antwort mit Status 200. Fehler haben immer dasselbe Format, siehe Fehler.
-
upload_idstringCall finish_image with it after the PUT.
-
upload_urlstring<uri>Send the bytes here with HTTP PUT, without extra headers.
-
methodstringThe HTTP method for the upload.
Mögliche Werte:
PUT -
expires_in_secondsintegerThe upload_url works this long.
-
next_stepstringWhat to do next (PUT, then finish_image).