example-data.com
Menu
Browse docs and collections

Overview

attachments / #25

Activity #25

User #220 attached application/pdf (11575476 bytes)

7/7/2025, 6:36:22 AM

Component variants

Medium
Small

User #220 attached application/pdf (11575476 bytes) · 7/7/2025, 6:36:22 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 25,
  "userId": 220,
  "targetType": "recipe",
  "targetId": 19,
  "url": "https://example.com/files/attachment-25.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 11575476,
  "createdAt": "2025-07-07T06:36:22.763Z"
}