example-data.com
Menu
Browse docs and collections

Overview

attachments / #629

Activity #629

User #56 attached image/png (6829495 bytes)

5/17/2026, 5:23:35 AM

Component variants

Medium
Small

User #56 attached image/png (6829495 bytes) · 5/17/2026, 5:23:35 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 629,
  "userId": 56,
  "targetType": "comment",
  "targetId": 596,
  "url": "https://picsum.photos/seed/attachment-629/600/300",
  "mimeType": "image/png",
  "sizeBytes": 6829495,
  "createdAt": "2026-05-17T05:23:35.810Z"
}