example-data.com
Menu
Browse docs and collections

Overview

attachments / #84

Activity #84

User #168 attached application/pdf (36256234 bytes)

12/26/2025, 6:22:28 PM

Component variants

Medium
Small

User #168 attached application/pdf (36256234 bytes) · 12/26/2025, 6:22:28 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 84,
  "userId": 168,
  "targetType": "post",
  "targetId": 479,
  "url": "https://example.com/files/attachment-84.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 36256234,
  "createdAt": "2025-12-26T18:22:28.766Z"
}