Products and files
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.
Authorization
-
Authorizationstring header requiredBearer tnt_…· A personal API key (tnt_...). Create it in the Tentary app on the page AI & API. Introduction
Body application/json
-
file_namestring requiredName with extension, like "cover.png".
max length
250 -
size_bytesinteger requiredThe exact file size.
min
1max10485760
Response
Fields of the answer with status 200. Errors always have the same format, see Errors.
-
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.
Allowed values:
PUT -
expires_in_secondsintegerThe upload_url works this long.
-
next_stepstringWhat to do next (PUT, then finish_image).