example-data.com
Menu
Browse docs and collections

Overview

attachments / #678

Activity #678

User #193 attached image/webp (29398137 bytes)

1/31/2026, 11:10:27 PM

Component variants

Medium
Small

User #193 attached image/webp (29398137 bytes) · 1/31/2026, 11:10:27 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 678,
  "userId": 193,
  "targetType": "comment",
  "targetId": 771,
  "url": "https://picsum.photos/seed/attachment-678/1200/800",
  "mimeType": "image/webp",
  "sizeBytes": 29398137,
  "createdAt": "2026-01-31T23:10:27.893Z"
}