example-data.com
Menu
Browse docs and collections

Overview

attachments / #534

Activity #534

User #32 attached image/png (24211622 bytes)

3/4/2026, 4:06:00 PM

Component variants

Medium
Small

User #32 attached image/png (24211622 bytes) · 3/4/2026, 4:06:00 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 534,
  "userId": 32,
  "targetType": "comment",
  "targetId": 103,
  "url": "https://picsum.photos/seed/attachment-534/400/300",
  "mimeType": "image/png",
  "sizeBytes": 24211622,
  "createdAt": "2026-03-04T16:06:00.249Z"
}