example-data.com
Menu
Browse docs and collections

Overview

attachments / #555

Activity #555

User #185 attached application/pdf (13427316 bytes)

11/6/2025, 12:17:43 PM

Component variants

Medium
Small

User #185 attached application/pdf (13427316 bytes) · 11/6/2025, 12:17:43 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 555,
  "userId": 185,
  "targetType": "post",
  "targetId": 219,
  "url": "https://example.com/files/attachment-555.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 13427316,
  "createdAt": "2025-11-06T12:17:43.458Z"
}