example-data.com
Menu
Browse docs and collections

Overview

attachments / #157

Activity #157

User #144 attached image/webp (6932864 bytes)

2/2/2026, 2:33:08 PM

Component variants

Medium
Small

User #144 attached image/webp (6932864 bytes) · 2/2/2026, 2:33:08 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 157,
  "userId": 144,
  "targetType": "recipe",
  "targetId": 39,
  "url": "https://picsum.photos/seed/attachment-157/600/400",
  "mimeType": "image/webp",
  "sizeBytes": 6932864,
  "createdAt": "2026-02-02T14:33:08.216Z"
}