Service accounts and tokens
Create scoped, expiring tokens for CI and agents, sign in from the CLI and MCP clients, and end sessions.
Service accounts
A service account is for a CI job or an agent that queries Synaxis without a person. Its token has scopes, an expiry of at most a year, and an explicit list of repositories you grant; it reads exactly those.
To create a service account
- Open Users and roles and go to New service account.
- Enter a Name, and check its scopes:
query(search and read tools),events(the event stream) orwrite. - Set Token lasts (days), from 1 to 365 (90 by default).
- Choose the Repositories it may read.
- Select Create. Under Token for name, copy the token: "Copy it now: it is shown only once."
The token starts synaxis_sa_. The client sends it as Authorization: Bearer <token>. Synaxis keeps only its hash.
From the CLI, the token is printed alone on standard output, so a script can capture it:
synaxis service-accounts create ci-search --scopes query --grant repo:contoso/billing --grant repo:contoso/web --expires 90d
To rotate or revoke a token
Under Service accounts, each account shows its Scopes and when it Expires:
- New token issues a new token and shows it once (
synaxis service-accounts rotate ci-search). - Revoke ends the account's token at once (
synaxis service-accounts revoke ci-search); the row shows Revoked.
Note: Writing to GitHub or Azure DevOps (pull requests, comments, work items) always runs as a person, with their own delegated token, so the upstream history shows who did it, and only after that person confirmed the exact change: Synaxis answers the first call with the change and a confirmation that works once, for ten minutes.
People's tokens
After single sign-on, Synaxis issues its own tokens to CodeWrightAI, the CLI and MCP clients: access tokens that last 15 minutes, and refresh tokens that last 30 days, rotate at every use and are revoked with their whole family if a used one comes back. Each person sees theirs in Me under Sessions and tokens, with the Client, Scopes, Started, Last used and Expires, and can End any of them.
Sign in from the CLI
synaxis login --server https://synaxis.example.com # opens the browser
synaxis login --server https://synaxis.example.com --device # prints a code to enter in any browser
synaxis status
synaxis logout
The server and tokens are kept in profile.json in your configuration folder (%APPDATA%\synaxis on Windows,
~/.config/synaxis elsewhere, or the folder SYNAXIS_CONFIG names), readable by you alone. For a script, --token
uses a token for one run, read from SYNAXIS_TOKEN or standard input, never from the command line. See
The synaxis CLI.
MCP clients
Standard MCP clients connect to <public URL>/mcp. They find how to sign in from the server's OAuth metadata
(/.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server) and sign the person in with the
authorization code flow and PKCE. Dynamic client registration is off: list each client you allow under Auth:Clients
with its client id and exact redirect URIs. CodeWrightAI and the CLI need no entry.
Rate limits
Queries and tool calls are limited per person and per service account: 120 per minute with bursts of 30 by default
(Api:QueriesPerMinute, Api:QueryBurst). Administration and console calls have their own limit: 600 per minute
by default (Api:AdminPerMinute). Every token of one person or service account counts against the same limit. What
answers without a token (sign-in, the OAuth and device-flow endpoints, discovery and the status) is limited per client
address: 300 per minute with bursts of 60 (Api:PublicPerMinute, Api:PublicBurst). Webhook deliveries (/hooks)
have their own limit per client address: 1,200 per minute with bursts of 200 (Api:WebhooksPerMinute,
Api:WebhookBurst). A limited call answers HTTP 429 with Retry-After (the seconds until a call is allowed again),
and its detail says which limit it reached ("query calls", "administration calls", "sign-in and status calls" or
"webhook deliveries").
Behind a reverse proxy or a load balancer, name it in Api:TrustedProxies (its addresses or networks, such as
SYNAXIS_Api__TrustedProxies__0=10.0.0.0/8): Synaxis then takes the client's address from the proxy's
X-Forwarded-For, so people behind the proxy are not limited, or audited, as one address. It never trusts the header
from anyone else.