example-data.com
Menu
Browse docs and collections

Overview

attachments / #107

Activity #107

User #54 attached image/webp (11562997 bytes)

2/8/2026, 5:51:01 PM

Component variants

Medium
Small

User #54 attached image/webp (11562997 bytes) · 2/8/2026, 5:51:01 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 107,
  "userId": 54,
  "targetType": "post",
  "targetId": 464,
  "url": "https://picsum.photos/seed/attachment-107/1200/400",
  "mimeType": "image/webp",
  "sizeBytes": 11562997,
  "createdAt": "2026-02-08T17:51:01.129Z"
}