example-data.com
Menu
Browse docs and collections

Overview

attachments / #771

Activity #771

User #183 attached application/pdf (42634112 bytes)

9/6/2025, 6:24:11 PM

Component variants

Medium
Small

User #183 attached application/pdf (42634112 bytes) · 9/6/2025, 6:24:11 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 771,
  "userId": 183,
  "targetType": "restaurant",
  "targetId": 2,
  "url": "https://example.com/files/attachment-771.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 42634112,
  "createdAt": "2025-09-06T18:24:11.538Z"
}