Deplo
Recipes

Ship a JSON Mock API in 30 Seconds

Deploy a JSON file as a live REST endpoint using deplo.sh — perfect for frontend prototyping and agent-to-agent data sharing.

Need a live API endpoint for prototyping, testing, or sharing data between agents? Deploy any JSON as a read-only REST API with a single command.

The idea

Your JSON data  →  deplo deploy  →  GET https://your-api.deplo.sh  →  returns your JSON

No server to run. No Express app. No Lambda function. Just data → URL.

Option 1: CLI

# From a file
deplo deploy data.json --project mock-users --type json_api --ttl 7d
# ✔ Deployed to https://mock-users.deplo.sh

# From stdin (pipe from any command)
echo '{"status":"healthy","uptime":99.9}' | deplo deploy - \
  --project health-check --type json_api --ttl 24h
# ✔ Deployed to https://health-check.deplo.sh

# From a script or API response
curl -s https://api.example.com/data | deplo deploy - \
  --project cached-data --type json_api --ttl 1h

Then access it:

curl https://mock-users.deplo.sh
# → {"users": [{"name": "Alice", ...}, ...]}

Option 2: TypeScript SDK

import { DeploClient } from '@deplo/typescript-sdk';

const client = new DeploClient({ apiKey: process.env.DEPLO_KEY! });

const data = {
  users: [
    { id: 1, name: 'Alice', email: '[email protected]', role: 'admin' },
    { id: 2, name: 'Bob', email: '[email protected]', role: 'viewer' },
    { id: 3, name: 'Charlie', email: '[email protected]', role: 'editor' },
  ],
};

const { url } = await client.deploy({
  project: 'mock-users',
  type: 'json_api',
  files: [{ path: 'index.json', content: JSON.stringify(data), encoding: 'utf8' }],
  ttl: '7d',
});

console.log(`API live at: ${url}`);
// → API live at: https://mock-users.deplo.sh

Option 3: Claude / Cursor (MCP)

Just ask your AI:

Take this CSV data and deploy it as a JSON API:

name,email,role Alice,[email protected],admin Bob,[email protected],viewer

Claude/Cursor will parse the CSV, convert to JSON, and deploy it automatically.

Use cases

Use caseExample
Frontend prototypingDeploy mock API data so your React app can fetch from a real URL
Agent data sharingAgent A produces enriched data → deploys as JSON API → Agent B consumes it
Webhook testingDeploy a static JSON response for webhook development
CI/CD artifactsPublish test results or build metadata as a queryable endpoint
Demo dataShip a live API for product demos without spinning up a backend

Ephemeral APIs with TTL

Set a TTL to auto-expire the endpoint:

# Expires in 1 hour
deplo deploy data.json --project temp-data --type json_api --ttl 1h

# Expires in 7 days
deplo deploy data.json --project weekly-data --type json_api --ttl 7d

# Never expires
deplo deploy data.json --project permanent-api --type json_api --ttl forever

Update the data

Redeploying to the same project updates the data at the same URL:

# Version 1
echo '{"version":1}' | deplo deploy - --project my-api --type json_api

# Version 2 — same URL, new data
echo '{"version":2}' | deplo deploy - --project my-api --type json_api

Previous versions are kept and can be rolled back.

What's next?

On this page