Skip to main content
POST
/
api
/
v1
/
attachments
Upload a media attachment
curl --request POST \
  --url https://public-api.etoro.com/api/v1/attachments \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-request-id: <x-request-id>' \
  --header 'x-user-key: <x-user-key>' \
  --form file='@example-file'
{
  "url": "https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg",
  "title": "Tesla Q4 Earnings Chart",
  "host": "cdn.etoro.com",
  "description": "Tesla quarterly earnings breakdown",
  "mediaType": "Image",
  "media": {
    "image": {
      "width": 1200,
      "height": 630,
      "url": "https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg"
    },
    "video": {
      "videoSourceId": "dQw4w9WgXcQ",
      "videoSource": "YouTube",
      "image": {
        "width": 1280,
        "height": 720,
        "url": "https://img.youtube.com/vi/dQw4w9WgXcQ/hqdefault.jpg"
      }
    }
  }
}

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"388629d6-720d-42df-afc4-1674c04c2c7a"

x-api-key
string<password>
required

API key for authentication.

Example:

"lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"

x-user-key
string<password>
required

User-specific authentication key.

Example:

"eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_"

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