example-data.com
Menu
Browse docs and collections

Overview

attachments / #606

Activity #606

User #139 attached image/jpeg (8588536 bytes)

11/25/2025, 8:47:51 AM

Component variants

Medium
Small

User #139 attached image/jpeg (8588536 bytes) · 11/25/2025, 8:47:51 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 606,
  "userId": 139,
  "targetType": "post",
  "targetId": 484,
  "url": "https://picsum.photos/seed/attachment-606/400/300",
  "mimeType": "image/jpeg",
  "sizeBytes": 8588536,
  "createdAt": "2025-11-25T08:47:51.736Z"
}