example-data.com
Menu
Browse docs and collections

Overview

attachments / #800

Activity #800

User #78 attached image/webp (22694781 bytes)

10/1/2025, 3:53:00 PM

Component variants

Medium
Small

User #78 attached image/webp (22694781 bytes) · 10/1/2025, 3:53:00 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 800,
  "userId": 78,
  "targetType": "post",
  "targetId": 463,
  "url": "https://picsum.photos/seed/attachment-800/600/800",
  "mimeType": "image/webp",
  "sizeBytes": 22694781,
  "createdAt": "2025-10-01T15:53:00.444Z"
}