v1

latestOpenAPI 3.0.12026-07-26171200932.8 KB
Social Feeds

Upload a media attachment

Rate limit: 60 requests per 60 seconds. This is the default shared quota — it is shared with every other endpoint that has no dedicated limit, so requests across those endpoints all draw from the same budget.


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.

post/api/v1/attachments

Query parameters

client_request_idstring uuid required

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

Headers

x-request-idstring uuid required
Example:7972fd3d-6383-42b8-9e96-4a57a7c82d37

A unique request identifier.

x-api-keystring password required
Example:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

API key for authentication.

x-user-keystring password required
Example:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

User-specific authentication key.

Response

Attachment uploaded successfully

urlstring

Full URL of the attachment

titlestring

Title of the attachment

hoststring

Host domain of the attachment

descriptionstring

Short description of the attachment

mediaType'None' | 'Link' | 'Image' | 'Video'

Type of media

Example response

{
  "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"
      }
    }
  }
}