API reference
7 operations. Each is a POST to /api/v1/ followed by its name, a method of the same name in the SDK, a command in the CLI and a tool in the MCP server.
Get the organization
Readorg.currentReturns the organization the API key belongs to: its id, name and subscription status. Use it to check which organization a key acts for.
curl -X POST https://your-app.example.com/api/v1/org.current \
-H "Authorization: Bearer $SEAWATTS_API_KEY"Rename the organization
Writeorg.updateNameRenames the organization. The name is 3 to 50 lowercase letters, numbers or hyphens and must not be taken by another organization.
- name
- Required: string, 3 to 50
curl -X POST https://your-app.example.com/api/v1/org.updateName \
-H "Authorization: Bearer $SEAWATTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"value"}'List members
ReadorgMembers.allLists the people in the organization with their role and profile.
curl -X POST https://your-app.example.com/api/v1/orgMembers.all \
-H "Authorization: Bearer $SEAWATTS_API_KEY"Get the acting person
Readuser.currentReturns the person who created the API key: the account every call with this key acts as.
curl -X POST https://your-app.example.com/api/v1/user.current \
-H "Authorization: Bearer $SEAWATTS_API_KEY"Get subscription status
Readbilling.getSubscriptionStatusReturns whether the organization has a subscription and its state (active, trialing, past due or canceled).
curl -X POST https://your-app.example.com/api/v1/billing.getSubscriptionStatus \
-H "Authorization: Bearer $SEAWATTS_API_KEY"List recent API usage
ReadapiKeyUsage.recentLists the most recent API usage records for the organization, newest first, optionally for one API key. Returns 50 unless `limit` says otherwise (100 at most).
- apiKeyId
- Optional: string
- limit
- Optional: number, 1 to 100, default 50
- type
- Optional: "mcp-server"
curl -X POST https://your-app.example.com/api/v1/apiKeyUsage.recent \
-H "Authorization: Bearer $SEAWATTS_API_KEY"Count API usage
ReadapiKeyUsage.statsCounts API usage by type over the last `days` days (30 unless given), optionally for one API key.
- apiKeyId
- Optional: string
- days
- Optional: number, 1 to 365, default 30
- type
- Optional: "mcp-server"
curl -X POST https://your-app.example.com/api/v1/apiKeyUsage.stats \
-H "Authorization: Bearer $SEAWATTS_API_KEY"