example-data.com
Menu
Browse docs and collections

Overview

attachments / #655

Activity #655

User #107 attached image/webp (44469607 bytes)

1/19/2026, 12:16:00 AM

Component variants

Medium
Small

User #107 attached image/webp (44469607 bytes) · 1/19/2026, 12:16:00 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 655,
  "userId": 107,
  "targetType": "comment",
  "targetId": 650,
  "url": "https://picsum.photos/seed/attachment-655/800/400",
  "mimeType": "image/webp",
  "sizeBytes": 44469607,
  "createdAt": "2026-01-19T00:16:00.936Z"
}