Upload a screenshot to a position.
const url = 'https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/images';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"dataBase64":"example","format":"png"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tradr.cloud/api/positions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/images \ --header 'Content-Type: application/json' \ --data '{ "dataBase64": "example", "format": "png" }'Authed. Stores one screenshot (PNG, JPEG or WebP) on a position the user owns. dataBase64 is the base64-encoded image bytes; container metadata (EXIF/XMP) is stripped server-side before storage with no re-encode. A position holds at most 10 screenshots. When object storage is configured the bytes are written to the bucket and only a pointer is persisted; a self-hosted instance keeps the bytes inline. The object-storage key is never returned. Existing-data management is never tier-gated.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Base64-encoded image bytes, at most 4,500,000 encoded bytes.
Responses
Section titled “ Responses ”The stored screenshot record.
object
Example
{ "format": "png"}Validation error, an image over the size cap (IMAGE_TOO_LARGE), or bytes that do not match the declared format (IMAGE_FORMAT_MISMATCH).
Position not found (or not owned by the user).
The position already holds the maximum of 10 screenshots (POSITION_IMAGE_LIMIT).
Request body exceeds the upload limit (PAYLOAD_TOO_LARGE).
Object storage temporarily unreachable (OBJECT_UNREACHABLE).