API Documentation

Learn how to consume your WonderIpsum mock API endpoints from any HTTP client.

What is WonderIpsum?

WonderIpsum generates realistic, domain-aware mock data and images for your demos and prototypes. Each resource you create becomes a live REST API endpoint that you can consume from your frontend, Postman, or any HTTP client.

Your API URL

GET https://wonderipsum.com/api/{team-slug}/{project-id}/{resource-slug}

Copy this URL from your resource page. The resource page shows the exact endpoint for each resource.

Image Endpoint

GET https://wonderipsum.com/api/{team-slug}/{project-id}/{resource-slug}/image

Returns a random image from your collection. Use directly in <img src="..."> tags. The browser displays the image, not JSON.

Authentication

No Authentication (Default)

By default, your API endpoint is open to the public. Anyone with the URL can access your mock data.

curl https://wonderipsum.com/api/myteam/01kr.../products

Pro+ Domain Whitelist

Restrict your API to specific domains. Requests from unauthorized origins receive a 403 Forbidden response. Ideal for image endpoints (<img> tags can't send auth headers).

Configure allowed domains on your resource page under API Security.

Origin: https://myapp.com → 200 OK
Origin: https://evil.com → 403 Forbidden

Pro+ Bearer Token

Require a token in the Authorization header. Requests without valid tokens receive a 401 Unauthorized response. Available for schema endpoints only (not images).

curl -H "Authorization: Bearer YOUR_TOKEN" https://wonderipsum.com/api/...

Rate Limits

All API endpoints are rate limited based on your subscription tier. Limits reset at the start of each calendar month.

TierMonthly RequestsOverage
Maker ($12/mo)1,000Upgrade for more
Pro ($39/mo)10,000Upgrade for more
Enterprise ($99/mo)50,000Custom

When you exceed your limit, the API returns 429 Too Many Requests with a retry_after field indicating when the limit resets.

{ "message": "API rate limit exceeded. 1000 requests per month.", "retry_after": 1234567 }

Endpoints

Image Resources

GET /api/{team-slug}/{project-id}/{resource-slug}/image

Returns a random image (binary, image/jpeg). Use in <img src="...">. The browser displays the image directly.

GET /api/{team-slug}/{project-id}/{resource-slug}/images

Returns all images as a JSON array with metadata.

{ "images": [{ "id": 1, "source": "unsplash", "url_large": "...", "photographer": "John Doe", ... }], "count": 50 }

Schema Resources

Schema endpoints return your generated mock data. The HTTP methods available depend on your tier and resource configuration.

GET /api/{team-slug}/{project-id}/{resource-slug}

Returns all generated records as a JSON array.

POST /api/{team-slug}/{project-id}/{resource-slug}Pro+

Returns mock data (simulates creating a resource).

PUT / PATCH /api/{team-slug}/{project-id}/{resource-slug}/{id}Pro+

Returns mock data (simulates updating a specific record by ID).

DELETE /api/{team-slug}/{project-id}/{resource-slug}/{id}Pro+

Returns mock data (simulates deleting a specific record by ID).

Pagination & Sorting

All schema GET endpoints support query parameters for controlling the response.

Pagination

GET /api/.../products?page=2&per_page=20
ParameterDefaultDescription
page1Page number
per_page20Records per page (max 100)

Sorting

GET /api/.../products?sort_by=price&sort_order=desc
ParameterDefaultDescription
sort_byField name to sort by
sort_orderascasc or desc

Code Examples

cURL

# GET all records
curl https://wonderipsum.com/api/myteam/01kr.../products

# GET with bearer token
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://wonderipsum.com/api/myteam/01kr.../products

# Use image in HTML
<img src="https://wonderipsum.com/api/myteam/01kr.../photos/image" />

JavaScript (fetch)

const res = await fetch('https://wonderipsum.com/api/myteam/01kr.../products');
const data = await res.json();
console.log(data); // Array of objects

// With pagination
const res2 = await fetch('https://wonderipsum.com/api/.../products?page=2&per_page=10');

React

function Products() {
  const [data, setData] = useState([]);
  useEffect(() => {
    fetch('https://wonderipsum.com/api/.../products')
      .then(r => r.json())
      .then(setData);
  }, []);
  return <ul>{data.map(item => <li>{item.name}</li>)}</ul>;
}

Python

import requests
r = requests.get('https://wonderipsum.com/api/myteam/01kr.../products')
data = r.json()
for item in data:
    print(item['name'])

Error Codes

StatusMeaningWhen
200OKRequest succeeded
401UnauthorizedMissing or invalid bearer token
403ForbiddenDomain not whitelisted
404Not FoundResource doesn't exist
422UnprocessableInvalid parameters
429Rate LimitedMonthly request quota exceeded

Tier Comparison

FeatureMaker ($12/mo)Pro ($39/mo)Enterprise ($99/mo)
Monthly API requests1,00010,00050,000
Schema: GET
Schema: POST/PUT/DELETE
Bearer token auth
Domain whitelist
Images per resource50500Unlimited
Schema nesting depth2510
Code export