Public REST API
REST Conventions
Public API base path, JSON envelopes, pagination, errors, rate limits, and required headers.
REST Conventions & Response Envelopes
Base URL
Personal / script access uses the Public API:
https://<APP_HOST>/api/public/v1Do not confuse this with the session-authenticated app API under /api/v1. Public routes currently mount:
/me/notes/projects/agent-house/users/search
Required headers
Authorization: Bearer wn_live_YOUR_TOKEN
Content-Type: application/json
X-Workspace-Id: <WORKSPACE_ID>X-Workspace-Id is required for workspace-scoped routes. It is not required for GET /me.
Response envelope
Success
{
"success": true,
"data": {
"id": "note_01J9X8Y7Z6",
"title": "Sprint notes"
},
"message": "Resource fetched successfully",
"meta": {
"timestamp": "2026-11-08T19:00:01.450Z",
"requestId": "req_01J9X8..."
}
}Error
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "The field 'title' is required.",
"details": [
{ "field": "title", "issue": "Required" }
]
},
"meta": {
"timestamp": "2026-11-08T19:00:01.450Z",
"requestId": "req_01J9X8..."
}
}Error codes
| Code | HTTP | Meaning |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid token |
FORBIDDEN | 403 | Missing scope or workspace membership |
NOT_FOUND | 404 | Resource not found in workspace |
CONFLICT | 409 | Unique constraint / conflict |
VALIDATION_ERROR | 422 | Body failed schema validation |
RATE_LIMITED | 429 | Rate quota exceeded |
INTERNAL_ERROR | 500 | Unexpected server error |
Pagination
List endpoints accept cursor / limit style queries:
curl "https://<APP_HOST>/api/public/v1/notes?limit=25&cursor=note_01J9X8Y7" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>"Common query params: limit, cursor, offset, page, search, sort / sort_by, sort_order.
Rate limits
When limited, expect 429 and headers such as:
Retry-After: 30
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0Soft deletes
Many resources support soft-delete via deleted: true on update payloads (or dedicated delete routes that soft-delete). Restore is typically deleted: false or a restore endpoint where documented.