Private-first file hosting REST API

Upload once. Resolve anywhere with a deterministic short URL.

Multipart ingestion, Laravel-friendly validation, CDN-ready artefact persistence, concise JSON payloads, optional API keys for mutating operations, and a living reference you can bookmark.

Endpoint prefix
/api
Public delivery
Stable GET /api/file/{code}
Runtime
Laravel 13.9.0

Quick contract

  • 1
    Authenticate writes
    Optional X-API-Key shields POST /upload & deletes.
  • 2
    Post multipart payloads
    Single field · file=@binary
  • 3
    Hand out deterministic URLs
    Share https://your-host/api/file/{short_code} with CDN headers.

Operational defaults (max size & allow-lists) are driven centrally through config/uploads.php · surface details live beside your deployment profile.

Capability matrix

Architected around predictable HTTP semantics.

No bespoke UI layer shipped here—expose the behaviours you need programmatically today and augment with front-ends tomorrow. Every surface honours JSON bodies for deterministic automation.

Active base · https://dochost.online

Multipart ingest

Server-side Laravel validation aligns with MIME + extension posture you configure—no ambiguity for integrators shipping mixed binaries.

Short-code addressing

Alphabetised identifiers shorten distribution paths while preserving collision resistance at the datastore layer.

Inline retrieval

Honour browser expectations with deterministic Content-Type plus cache primitives suitable for CDN fan-out.

Guarded deletes

Mirrors upload policy—purge artefacts and relational records atomically with the same cryptographic guardrails you enable elsewhere.

Orchestration blueprint

Wire your clients in minutes.

Integrate orchestration layers—from CI artefact relays to storefront asset pipelines—against a narrowly scoped vocabulary of verbs & nouns, leaning on Laravel’s ergonomics upstream.

Inspect ready-to-run cURL recipes
  1. 01

    Establish trust once

    Provision X-API-Key parity between consumer & host or leave both mutating verbs open while iterating locally—the policy flips purely through configuration.

  2. 02

    POST your payload

    /api/upload echoes canonical retrieval + delete anchors as JSON alongside metadata you can hydrate downstream catalogs with.

  3. 03

    Distribute deterministic GET links

    Hotlink friendly responses respect inline streaming semantics · optional TTL fields surface 410 Gone when you prune legacy inventory.

  4. 04

    Prune responsibly

    DELETE eradicates artefacts from object storage synchronously · pair with Laravel queues if you orchestrate cascading clean-up pipelines.

Operational clarity

Need the formal contract verbatim?

The reference manual enumerates payloads, statuses, Laravel helper calls, Bash & PowerShell curls, edge cases, and footnotes on locale-sensitive responses. Bookmark it beside your Grafana boards or README for on-call rotations.

Launch API reference · https://cdn.newflow.tech/docs/api