---
title: "Upload a media attachment"
method: POST
path: "/api/v1/attachments"
tags: ["Social Feeds"]
---

# Upload a media attachment

`POST /api/v1/attachments`

**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.

## Query parameters

- `client_request_id` string, uuid, required

## Headers

- `x-request-id` string, uuid, required
- `x-api-key` string, password, required
- `x-user-key` string, password, required

## Response `200`

Attachment uploaded successfully

- Attachment — Media or link attachment
  - `url` string — Full URL of the attachment
  - `title` string — Title of the attachment
  - `host` string — Host domain of the attachment
  - `description` string — Short description of the attachment
  - `mediaType` 'None' | 'Link' | 'Image' | 'Video' — Type of media
  - `media` object — Media content details
    - `image` object — Image dimensions and URL
      - `width` integer — Width in pixels
      - `height` integer — Height in pixels
      - `url` string — Image URL
    - `video` object — Video source details
      - `videoSourceId` string — External video ID
      - `videoSource` 'None' | 'YouTube' | 'Vimeo' — Video provider
      - `image` object — Video thumbnail
        - `width` integer — Thumbnail width in pixels
        - `height` integer — Thumbnail height in pixels
        - `url` string — Thumbnail URL

## Other responses

- `400` — Bad request — missing file or URL
- `401` — Authentication required
- `422` — Unsupported file type or file exceeds 8 MB limit
- `429` — Too Many Requests — the shared rate limit (60 requests / 60s) was exceeded.

---

[API](https://skmtc.net/etoro/apis/etoro-api.md) · [All operations](https://skmtc.net/etoro/apis/etoro-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/etoro/etoro-api/revisions/69c1fb266c35/schema)
