example-data.com
Menu
Browse docs and collections

Overview

attachments / #660

Activity #660

User #147 attached image/jpeg (48633320 bytes)

12/15/2025, 11:01:46 AM

Component variants

Medium
Small

User #147 attached image/jpeg (48633320 bytes) · 12/15/2025, 11:01:46 AM

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/attachments/660" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/attachments/660"
);
const attachment = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/attachments.d.ts https://example-data.com/types/attachments.d.ts
import type { Attachment } from "./types/attachments";

const res = await fetch(
  "https://example-data.com/api/v1/attachments/660"
);
const attachment = (await res.json()) as Attachment;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/attachments/660"
)
attachment = res.json()

Response

{
  "id": 660,
  "userId": 147,
  "targetType": "post",
  "targetId": 302,
  "url": "https://picsum.photos/seed/attachment-660/600/300",
  "mimeType": "image/jpeg",
  "sizeBytes": 48633320,
  "createdAt": "2025-12-15T11:01:46.399Z"
}