example-data.com
Menu
Browse docs and collections

Overview

attachments / #334

Activity #334

User #61 attached application/pdf (20057657 bytes)

11/28/2025, 11:46:03 AM

Component variants

Medium
Small

User #61 attached application/pdf (20057657 bytes) · 11/28/2025, 11:46:03 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 334,
  "userId": 61,
  "targetType": "restaurant",
  "targetId": 84,
  "url": "https://example.com/files/attachment-334.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 20057657,
  "createdAt": "2025-11-28T11:46:03.027Z"
}