example-data.com
Menu
Browse docs and collections

Overview

attachments / #699

Activity #699

User #120 attached image/webp (13740085 bytes)

5/21/2026, 12:23:12 AM

Component variants

Medium
Small

User #120 attached image/webp (13740085 bytes) · 5/21/2026, 12:23:12 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 699,
  "userId": 120,
  "targetType": "comment",
  "targetId": 1494,
  "url": "https://picsum.photos/seed/attachment-699/400/300",
  "mimeType": "image/webp",
  "sizeBytes": 13740085,
  "createdAt": "2026-05-21T00:23:12.897Z"
}