example-data.com
Menu
Browse docs and collections

Overview

attachments / #691

Activity #691

User #201 attached image/png (26870804 bytes)

12/5/2025, 2:36:00 AM

Component variants

Medium
Small

User #201 attached image/png (26870804 bytes) · 12/5/2025, 2:36:00 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 691,
  "userId": 201,
  "targetType": "post",
  "targetId": 118,
  "url": "https://picsum.photos/seed/attachment-691/800/300",
  "mimeType": "image/png",
  "sizeBytes": 26870804,
  "createdAt": "2025-12-05T02:36:00.140Z"
}