eToro Attachments API
The Attachments API from eToro — 1 operation(s) for attachments.
The Attachments API from eToro — 1 operation(s) for attachments.
openapi: 3.0.1
info:
title: Deprecated eToro Public API operations Agent Portfolios Attachments API
version: v1.158.0
description: Snapshot of API operations that existed in the previous docs OpenAPI file and are no longer present in the current upstream Swagger.
tags:
- name: Attachments
paths:
/api/v1/attachments:
post:
tags:
- Attachments
summary: Upload a media attachment
description: 'Two-step media upload: clients first upload a file here to receive an Attachment object, then pass its url in a POST /feeds/post or POST /reactions/.../comment payload. Accepts multipart/form-data with a binary file field. Supported formats: JPEG and PNG. Maximum file size: 8 MB (8,388,608 bytes). The returned url is a plain CDN URL scoped to the uploading user.'
parameters:
- name: x-request-id
in: header
required: true
schema:
type: string
format: uuid
example: 388629d6-720d-42df-afc4-1674c04c2c7a
description: A unique request identifier.
- name: x-api-key
in: header
required: true
schema:
type: string
format: password
example: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
description: API key for authentication.
- name: x-user-key
in: header
required: true
schema:
type: string
format: password
example: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
description: User-specific authentication key.
- name: client_request_id
in: query
required: true
description: Client-generated correlation ID (UUID). Required for request tracing and idempotency.
schema:
type: string
format: uuid
example: dcbf75de-be53-47fe-bfd0-61365e74f9d4
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
properties:
file:
type: string
format: binary
description: 'Required. The image file to upload. Supported formats: JPEG and PNG. Maximum size: 8 MB (8,388,608 bytes), enforced server-side.'
encoding:
file:
contentType: image/jpeg, image/png
responses:
'200':
description: Attachment uploaded successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
'400':
description: Bad request — missing file or URL
'401':
description: Authentication required
'422':
description: Unsupported file type or file exceeds 8 MB limit
operationId: uploadAMediaAttachment
components:
schemas:
Attachment:
type: object
description: Media or link attachment
properties:
url:
type: string
description: Full URL of the attachment
example: https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg
title:
type: string
description: Title of the attachment
example: Tesla Q4 Earnings Chart
host:
type: string
description: Host domain of the attachment
example: cdn.etoro.com
description:
type: string
description: Short description of the attachment
example: Tesla quarterly earnings breakdown
mediaType:
type: string
enum:
- None
- Link
- Image
- Video
description: Type of media
example: Image
media:
type: object
description: Media content details
properties:
image:
type: object
description: Image dimensions and URL
properties:
width:
type: integer
description: Width in pixels
example: 1200
height:
type: integer
description: Height in pixels
example: 630
url:
type: string
description: Image URL
example: https://cdn.etoro.com/rich-media/images/johndoe/abc-2025-01-15.jpg
video:
type: object
description: Video source details
properties:
videoSourceId:
type: string
description: External video ID
example: dQw4w9WgXcQ
videoSource:
type: string
enum:
- None
- YouTube
- Vimeo
description: Video provider
example: YouTube
image:
type: object
description: Video thumbnail
properties:
width:
type: integer
description: Thumbnail width in pixels
example: 1280
height:
type: integer
description: Thumbnail height in pixels
example: 720
url:
type: string
description: Thumbnail URL
example: https://img.youtube.com/vi/dQw4w9WgXcQ/hqdefault.jpg