example-data.com
Menu
Browse docs and collections

Overview

attachments / #401

Activity #401

User #214 attached image/png (18652763 bytes)

7/8/2025, 10:47:09 AM

Component variants

Medium
Small

User #214 attached image/png (18652763 bytes) · 7/8/2025, 10:47:09 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 401,
  "userId": 214,
  "targetType": "recipe",
  "targetId": 130,
  "url": "https://picsum.photos/seed/attachment-401/1200/800",
  "mimeType": "image/png",
  "sizeBytes": 18652763,
  "createdAt": "2025-07-08T10:47:09.063Z"
}