example-data.com
Menu
Browse docs and collections

Overview

attachments / #772

Activity #772

User #137 attached application/pdf (13289555 bytes)

8/7/2025, 8:47:57 PM

Component variants

Medium
Small

User #137 attached application/pdf (13289555 bytes) · 8/7/2025, 8:47:57 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 772,
  "userId": 137,
  "targetType": "recipe",
  "targetId": 26,
  "url": "https://example.com/files/attachment-772.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 13289555,
  "createdAt": "2025-08-07T20:47:57.552Z"
}