Build on ouicu
API
Your shares, sites, their visitors and the month's data over HTTP, with an API key.
Authentication
Send an API key in the Authorization header:
curl https://ouicu.com/api/usage \ -H "Authorization: Bearer $OUICU_API_KEY"Make a key under Account, API keys; it is shown once. Keys you make there last until you revoke them. The key ouicu login saves works too, and lapses after 90 days unused. A key can do anything your account can, so keep it out of code and logs.
Answers and errors
Every answer is JSON. When ouicu refuses, the answer has an error in plain words, and the HTTP status says what kind:
{ "error": "That API key does not work. Run `ouicu login`." }| Status | Meaning |
|---|---|
| 401 | No key, or one that doesn't work. |
| 403 | The account's email address isn't confirmed, or the account is suspended. |
| 404 | No such share or site on your account. |
| 429 | More than 300 requests in a minute. Wait a moment. |
Endpoints
| Endpoint | What it does |
|---|---|
GET /api/shares | Your shares. |
POST /api/shares/{id}/stop | Stops a share. |
GET /api/shares/{id}/requests | A share's latest requests. |
GET /api/sites | Your uploaded sites. |
DELETE /api/sites/{id} | Deletes a site. |
GET /api/sites/{id}/requests | A site's latest requests. |
GET /api/usage | The month's data so far. |
GET /api/cli/whoami | Who a key belongs to. |
To upload a site from code, use the SDK's deploy() or ouicu deploy.
GET /api/shares
Live shares first, then the latest ended ones. Add ?limit= for up to 100; the default is 30.
curl https://ouicu.com/api/shares -H "Authorization: Bearer $OUICU_API_KEY"{ "shares": [ { "id": "0b8f6c4e-2d1a-4c3b-9e7f-5a6d8c9b1e20", "name": "studiolund", "url": "https://studiolund.ouicu.app", "live": true, "client": "studio-mac, macOS", "startedAt": "2026-10-04T09:12:44.000Z", "endedAt": null, "ended": null, "password": true, "people": false, "requests": 412, "bytes": 18837504 } ]}| Field | What it holds |
|---|---|
id | The share's id, for the calls below. |
name, url | Its name and link. |
live | Whether it is running now. |
client | The computer it runs on. |
startedAt, endedAt | When it started and ended (ISO 8601). |
ended | How it ended, like "closed" or "stopped from the dashboard", or null while live. |
password | Whether visitors need a password. |
people | Whether only invited people may open it. |
requests, bytes | What visitors took from it. |
POST /api/shares/{id}/stop
Stops a share. The ouicu share running it exits and says why, and the share's last version is taken down.
curl -X POST https://ouicu.com/api/shares/0b8f6c4e-2d1a-4c3b-9e7f-5a6d8c9b1e20/stop \ -H "Authorization: Bearer $OUICU_API_KEY"{ "ok": true, "message": "Stopped 1 share." }GET /api/shares/{id}/requests
The latest 50 requests to a share, newest first. ouicu keeps them in memory only, so they go when it restarts. available is false when they couldn't be read just now.
curl https://ouicu.com/api/shares/0b8f6c4e-2d1a-4c3b-9e7f-5a6d8c9b1e20/requests \ -H "Authorization: Bearer $OUICU_API_KEY"{ "available": true, "visitors": 2, "requests": [ { "at": "2026-10-04T09:20:03.118Z", "method": "GET", "path": "/pricing", "status": 200, "ms": 41, "bytes": 18211, "country": "DK", "device": "phone", "visitor": 2, "ouicu": null } ]}| Field | What it holds |
|---|---|
at | When it was answered (ISO 8601). |
method, path | What was asked for. |
status, ms, bytes | The answer's status, how long it took, and its size. |
country | Two letters, like DK, or null. |
device | phone, tablet, computer, bot or unknown. |
visitor | A number for each visitor: 1 for the first seen. |
ouicu | Which of ouicu's own pages answered, like notice, password or paused, or null when your site did. |
GET /api/sites
Your uploaded sites, the latest upload first.
curl https://ouicu.com/api/sites -H "Authorization: Bearer $OUICU_API_KEY"{ "sites": [ { "id": "6a1d7f30-8b2c-4e95-a0f4-3c9e1b7d2a58", "name": "calm-otter-4821", "url": "https://calm-otter-4821.ouicu.app", "files": 24, "size": 1258291, "uploadedAt": "2026-10-04T08:02:10.000Z", "expiresAt": "2026-10-11T08:02:10.000Z", "password": false, "people": false, "requests": 96, "bytes": 3407872 } ]}| Field | What it holds |
|---|---|
id | The site's id, for the calls below. |
name, url | Its name and link. |
files, size | How many files it holds, and their size in bytes. |
uploadedAt | When the latest upload finished. |
expiresAt | When it goes, on Free, or null. |
password, people | Whether a password or an invite list holds. |
requests, bytes | What visitors took from it. |
DELETE /api/sites/{id}
Deletes a site and its files. Its link stops working.
curl -X DELETE https://ouicu.com/api/sites/6a1d7f30-8b2c-4e95-a0f4-3c9e1b7d2a58 \ -H "Authorization: Bearer $OUICU_API_KEY"{ "ok": true }GET /api/sites/{id}/requests
The latest requests to a site, in the same shape as a share's.
curl https://ouicu.com/api/sites/6a1d7f30-8b2c-4e95-a0f4-3c9e1b7d2a58/requests \ -H "Authorization: Bearer $OUICU_API_KEY"GET /api/usage
The month's data so far, against your plan's allowance.
curl https://ouicu.com/api/usage -H "Authorization: Bearer $OUICU_API_KEY"{ "plan": "hobby", "month": "2026-10", "bytes": 734003200, "requests": 15230, "allowanceBytes": 26843545600, "resetsAt": "2026-11-01T00:00:00.000Z", "over": false}| Field | What it holds |
|---|---|
plan | free, hobby or pro. |
month | The month, in UTC. |
bytes, requests | What visitors took so far this month. |
allowanceBytes | The plan's data a month, in bytes. |
resetsAt | When the next month starts. |
over | Whether the allowance is used up, so previews are paused. |
GET /api/cli/whoami
Who a key belongs to: handy to check a key works.
curl https://ouicu.com/api/cli/whoami -H "Authorization: Bearer $OUICU_API_KEY"{ "email": "[email protected]", "name": "Anna", "plan": { "key": "hobby", "name": "Hobby", "source": "subscription" }, "key": { "name": "CI", "prefix": "ocu_x7Kq2mPa" }}