folkwaysDocs
Platform API

Platform API

Read your workspace, segments, subscription and usage from your own servers, with the response envelope, paging, rate limits and errors.

The Platform API is the management API behind the Console. Your servers can call it with an API key to read your workspace, its segments, its subscription and its usage, for example to feed your own dashboards or alerts. It is read-only for API keys for now. Changes are made in the Console.

The Platform API manages Folkways. To publish and subscribe, use the Realtime API.

Base URL

Output
https://api.folkways.io/api/v1

Request and response bodies are JSON.

Endpoints

MethodPathAPI key accessReturns
GET/organizations/{workspaceId}WorkspaceThe workspace
GET/organizations/{workspaceId}/segmentsWorkspaceIts segments
GET/segments/{segmentId}SegmentOne segment, with its effective limits
GET/organizations/{workspaceId}/usageWorkspaceUsage over a time range
GET/organizations/{workspaceId}/usage/periodWorkspaceThe current period against its allowances
GET/segments/{segmentId}/usageSegmentOne segment's usage
GET/organizations/{workspaceId}/subscriptionWorkspaceThe subscription and its plan
GET/packagesnone: publicThe public packages
GET/plans, /plans/{planId}none: publicPlans and their limits
GET/rate-profilesnone: publicThe rate presets' profiles

The API calls workspaces organizations in paths and fields: they are the same thing.

Example

Shell
curl https://api.folkways.io/api/v1/organizations/$WORKSPACE_ID/usage/period \
  -H "X-API-Key: $FOLKWAYS_API_KEY"

Response envelope

Responses, successes and errors alike, come in one envelope. The exception is a request whose API key is missing, invalid or not allowed: it is refused before the envelope, with an empty body (see Errors).

JSON
{
  "status": "SUCCESS",
  "message": "…",
  "data": { "…": "the payload" },
  "meta": {
    "requestId": "5bbcd5c2-0d71-444b-9dd5-f24d02c22d36",
    "timestamp": "2026-12-01T14:50:32.169Z",
    "version": "v1"
  }
}
FieldMeaning
statusSUCCESS or ERROR
messageA short, human-readable summary
dataThe payload; its shape depends on the endpoint. Lists are a JSON array
metaAlways present: requestId, timestamp, version, and on paged lists totalCount, page and limit
errorsOn errors only: [{ "code", "message", "field", "details" }]

Conventions:

  • IDs are UUIDs.
  • Timestamps are ISO 8601 in UTC with milliseconds, e.g. 2026-12-01T14:50:32.169Z.
  • Null fields are left out, and object keys come in alphabetical order. Treat a missing field as "no value".
  • X-Request-ID: every response carries one, the same as meta.requestId. Send your own to correlate logs; quote it when you contact support.

Rate limits

API keys get 1,000 requests per minute per key, or less if the key sets its own hourly limit. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds). Over the limit you get 429 with RATE_LIMIT_EXCEEDED and a Retry-After header in seconds.

Errors

HTTPerrors[0].codeWhen
400INVALID_ARGUMENTA bad path or query value, e.g. a malformed UUID or a bad time range
400(no body)An API key sent to an endpoint that doesn't name a workspace or segment, such as the public catalogue
401(no body)Missing, unknown, revoked, expired or paused API key
403(no body)The key has no access to the workspace or segment in the path
403FORBIDDEN, ACCESS_DENIEDThe endpoint needs a signed-in Console user
404RESOURCE_NOT_FOUND, ENDPOINT_NOT_FOUNDNo such resource or route
429RATE_LIMIT_EXCEEDEDOver the rate limit; see Retry-After
500INTERNAL_SERVER_ERRORAn unexpected error; message carries an error ID to quote to support

Authentication failures of the API key itself are answered before the envelope, with an empty body.

On this page