example-data.com
Menu
Browse docs and collections

Overview

attachments / #768

Activity #768

User #202 attached image/jpeg (16601676 bytes)

9/19/2025, 5:51:16 PM

Component variants

Medium
Small

User #202 attached image/jpeg (16601676 bytes) · 9/19/2025, 5:51:16 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 768,
  "userId": 202,
  "targetType": "comment",
  "targetId": 727,
  "url": "https://picsum.photos/seed/attachment-768/400/600",
  "mimeType": "image/jpeg",
  "sizeBytes": 16601676,
  "createdAt": "2025-09-19T17:51:16.265Z"
}