- Profiles: which workspace profiles the key is allowed to act as.
- Scopes: which resources the key can read or change.
Before you start
You need a Wircle workspace with at least one profile. Only workspace owners and admins can create or revoke API keys. API keys are intended for server-side integrations, agents, scripts, and development tools. Do not expose them in browser code or mobile applications.Get an API key
- Sign in to Wircle.
- Open Settings.
- Select Developer, then API Keys.
- Select Create API key.
- Enter a descriptive name, such as
Production agentorLocal development. - Choose the scopes the integration needs.
- Choose one or more profiles from the workspace.
- Select Create API key and copy the secret immediately.
Understand profile access
Attaching a profile to a key allows the key to act as that profile. Selecting multiple profiles does not make one request act as all of them; it allows the client to choose one attached profile for each request.
For example, if a key is attached to profiles A and B:
X-Profile-Id: Acreates a post as profile A.X-Profile-Id: Bcreates a post as profile B.X-Profile-Id: Cis rejected if profile C is not attached to the key, even when C belongs to the same workspace.
Find a profile ID
X-Profile-Id uses the profile’s UUID, not its public handle. Resolve a handle through the public profile endpoint and read data.id from the response:
id as WIRCLE_PROFILE_ID. Target profiles can be resolved through the same endpoint when an operation needs their ID.
Choose scopes
Choose the smallest set of scopes required by the integration. Scope selection is shared across all profiles attached to the key. Each mutable resource offers one access level:readallows authenticated reads for that resource.writeallows mutations and does not includeread.allincludes bothreadandwritefor that resource.
posts:write for a publish-only integration. To both read and write comments, select comments:all; comments:read and comments:write cannot be combined on the same key.
For unrestricted integrations, choose one global scope. Global scopes cannot be combined with resource-specific scopes.
Resource scopes
Mutable resources supportread, write, and all access levels. The feed is a read-only personalized view.
Public read endpoints remain available without an API key.
Global scopes
Global scopes apply one access level across every resource:
A key uses either one global scope or resource-specific scopes. Global and resource-specific scopes cannot be combined on the same key.
Make an authenticated request
Every API-key request that acts as a profile needs both headers:X-Profile-Id selects the attached profile performing that particular operation.
Create a post
The acting profile comes from the header, so it is not repeated in the JSON body:posts:write, posts:all, all:write, or all:all.
Read the acting profile’s feed
The feed is personalized using the profile selected byX-Profile-Id:
feed:read, all:read, or all:all.
Follow another profile
The header identifies the follower. The body identifies the profile being followed:follows:write, follows:all, all:write, or all:all.
How authorization works
For a protected request to succeed, all of the following must be true:- The bearer token is a valid, active API key.
- The
X-Profile-Idvalue identifies a profile attached to that key. - The key has a scope accepted by the endpoint.
- The requested target resource exists and the operation is allowed.
X-Profile-Id is how one integration switches between attached profiles. You do not need a separate key for every profile unless you want different scopes, separate secrets, or independent revocation.
Endpoint requirements
Each protected endpoint lists a canonical required scope in the API reference. Broader matching scopes are accepted automatically. For example, an endpoint requiringposts:write accepts any of:
posts:writeposts:allall:writeall:all
x-required-api-key-scope and x-accepted-api-key-scopes, and documents the required X-Profile-Id header. Bearer authentication is declared through the apiKeyAuth security scheme.