Skip to main content
POST
Upload a media attachment

Authorizations

x-api-key
string
header
default:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
required

API key of the application. Only valid together with the x-user-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it. The pair is granted the same permissions the operation's OAuth scopes describe.

Demo credential for trying the API from these docs: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

x-user-key
string
header
default:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
required

User-specific authentication key. Only valid together with the x-api-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it.

Demo credential for trying the API from these docs: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"6dee9b7e-a2e9-46e6-9373-2ede15b36705"

Query Parameters

client_request_id
string<uuid>
required

Client-generated correlation ID (UUID). Required for request tracing and idempotency.

Body

multipart/form-data
file
file
required

Required. The image file to upload. Supported formats: JPEG and PNG. Maximum size: 8 MB (8,388,608 bytes), enforced server-side.

Response

Attachment uploaded successfully

Media or link attachment

url
string

Full URL of the attachment

Example:

"https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg"

title
string

Title of the attachment

Example:

"Tesla Q4 Earnings Chart"

host
string

Host domain of the attachment

Example:

"cdn.etoro.com"

description
string

Short description of the attachment

Example:

"Tesla quarterly earnings breakdown"

mediaType
enum<string>

Type of media

Available options:
None,
Link,
Image,
Video
Example:

"Image"

media
object

Media content details