Personal Setup
Create a personal API token, select a workspace, and verify access with GET /me.
Personal Setup
This guide gets you from zero to a verified Public API call.
1. Create a personal API token
In the Weave app: Settings → API Tokens → Create token.
Or via the authenticated app API (session cookie or existing token with api_tokens:write):
curl -X POST "https://<APP_HOST>/api/v1/api-tokens/create-token" \
-H "Authorization: Bearer wn_YOUR_EXISTING_TOKEN" \
-H "Content-Type: application/json" \
-H "X-Workspace-Id: <WORKSPACE_ID>" \
-d '{
"name": "Local scripts",
"scopes": [
"notes:read",
"notes:write",
"projects:read",
"projects:write",
"ai_chat:read",
"ai_chat:write",
"users:read"
]
}'Response (token shown once):
{
"success": true,
"data": {
"id": "tok_01...",
"name": "Local scripts",
"token": "wn_live_...",
"scopes": ["notes:read", "notes:write", "projects:read", "projects:write", "ai_chat:read", "ai_chat:write", "users:read"],
"expiresAt": null
}
}Store data.token securely. Weave only stores a hash — you cannot retrieve the plaintext later.
See API Tokens for the full scope catalog.
2. Workspace header
Workspace-scoped Public API routes require:
X-Workspace-Id: <WORKSPACE_PUBLIC_ID>Use the workspace public ID from the app URL (/<workspaceId>/…) or from workspace list APIs.
GET /api/public/v1/me does not require a workspace header.
3. Verify with /me
curl "https://<APP_HOST>/api/public/v1/me" \
-H "Authorization: Bearer wn_live_..."Success:
{
"status": "OK",
"message": "Successfully accessed Weave Notes Public API.",
"user": {
"id": "...",
"email": "you@example.com"
},
"apiToken": {
"id": "tok_01...",
"name": "Local scripts"
}
}4. First workspace call
curl "https://<APP_HOST>/api/public/v1/notes?limit=5" \
-H "Authorization: Bearer wn_live_..." \
-H "X-Workspace-Id: <WORKSPACE_ID>"