example-data.com
Menu
Browse docs and collections

Overview

attachments / #726

Activity #726

User #175 attached image/jpeg (29426347 bytes)

3/20/2026, 2:09:12 PM

Component variants

Medium
Small

User #175 attached image/jpeg (29426347 bytes) · 3/20/2026, 2:09:12 PM

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/attachments/726"
);
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/726"
);
const attachment = (await res.json()) as Attachment;

Python example

import requests

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

Response

{
  "id": 726,
  "userId": 175,
  "targetType": "comment",
  "targetId": 636,
  "url": "https://picsum.photos/seed/attachment-726/600/400",
  "mimeType": "image/jpeg",
  "sizeBytes": 29426347,
  "createdAt": "2026-03-20T14:09:12.056Z"
}