example-data.com
Menu
Browse docs and collections

Overview

attachments / #23

Activity #23

User #91 attached image/png (3986816 bytes)

2/17/2026, 8:50:35 AM

Component variants

Medium
Small

User #91 attached image/png (3986816 bytes) · 2/17/2026, 8:50:35 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 23,
  "userId": 91,
  "targetType": "product",
  "targetId": 42,
  "url": "https://picsum.photos/seed/attachment-23/1200/800",
  "mimeType": "image/png",
  "sizeBytes": 3986816,
  "createdAt": "2026-02-17T08:50:35.687Z"
}