Appearance
API tokens and AI assistants
Administrators can connect scripts and AI assistants to SynApp using a personal integration token. Use your own application's address, not the public marketing website, when configuring a client.
Create a token
- Open Settings → API access → Create token.
- Give it a name that identifies the client, such as
Reporting assistant. - Start with
read. Add only the permissions needed for the work below. - Choose an expiry date, or leave it blank to use your installation's default lifetime (90 days by default). Tokens always expire; the default maximum lifetime is 365 days.
- Copy the secret when shown and store it in your client's credential settings. It is shown only once.
A current token starts with synapp_. Tokens from the old synapp_pat_ system no longer work after the unified-authentication upgrade; create new tokens and update those clients.
Choose permissions
| Permission | Allows |
|---|---|
read | View chats, users, tags, rules, tasks and invitations |
manage | Change profiles, chats, memberships, tags and invitations |
messages | Send broadcasts and data-collection messages |
automation | Change rules and run supported maintenance tasks |
diagnostics | Read audit records and manage error logs |
Permissions do not imply one another: a client that reads and edits needs both read and manage. automation can change memberships indirectly through rules even without manage. Application settings, administrator privileges, login identities and token management remain browser-only. The token owner must remain an active administrator.
Replace, revoke and delete
Replace rotates one of your own tokens and shows a new secret. Update the client configuration yourself; the old token is revoked. To change permissions, create a token with the new selection and revoke the old one. Revoke stops further access, with up to 60 seconds for the change to reach all application servers. Already-authorized operations may finish. Expiry and changes to the owner's access also affect the token.
Revoked and expired tokens stay visible. A revoked record can be deleted individually, or use Clear revoked; active records must first be revoked. Deleting records does not delete audit history. Regular administrators manage their own tokens. The super administrator can inspect and revoke all owners' tokens; only the owner can replace a token.
Connect an AI assistant
Use an MCP client that supports Streamable HTTP and a fixed bearer-token header:
- Server URL:
https://your-synapp.example/mcp - Header name:
Authorization - Header value:
Bearer synapp_...(replace with your secret)
The assistant can list and filter records, work with memberships and tags, manage rules and tasks, and send messages according to its token permissions. Start with synapp_info to check the connected bot and instance. OAuth-only connectors are not supported by this release. Follow your client's instructions for entering a server URL and bearer header; keep the secret in its credential configuration rather than a shared conversation.
Claude Code
Register the server with the HTTP transport, replacing the example address and token:
bash
claude mcp add --transport http synapp https://your-synapp.example/mcp --header "Authorization: Bearer synapp_..."Clients using a local stdio bridge
For clients configured through mcpServers, a local mcp-remote bridge can connect to the HTTP server. This requires Node.js and npm on the client computer. Add this entry to your client's MCP configuration:
json
{
"mcpServers": {
"synapp": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-synapp.example/mcp", "--header", "Authorization:${SYNAPP_AUTH}"],
"env": { "SYNAPP_AUTH": "Bearer synapp_..." }
}
}
}Replace the example address and token. Protect this configuration as a credential file and do not commit it. The bridge is a third-party client dependency; follow your organization's installation policy.
Check a connection
With MCP Inspector (npx @modelcontextprotocol/inspector), choose Streamable HTTP, enter your server URL and add the Authorization header. Connect and call synapp_info.
Ask the assistant to find members, preview a rule's affected chats or prepare a broadcast. Review the target list before approving changes. send_message_to_yourself tests a broadcast with the token owner first. Use the AI-assisted walkthrough for an example.
API access
The REST API is at /api on your application. Its interactive reference is at /api/docs, and its OpenAPI document at /api/openapi. Send the same Authorization: Bearer … header from integration clients. Lists are paginated; bulk results identify individual failures even when the HTTP request succeeds. For scripts, response shapes and compatibility rules, use the developer API contract.
The per-token request limit is configured in Settings → API access (600 requests per minute by default). A client exceeding it receives 429 Too Many Requests with a retry delay.
Check results before retrying
Recorded administrative changes appear in Audit log under the token owner. The journal does not log every lookup and does not undo actions. Background task acceptance is not task completion; open the task to check its current outcome. Bulk operations can succeed for some recipients and fail for others.
A timeout or disconnected assistant does not cancel a send. Check recipients and task/audit information before retrying, since retrying can send duplicates. An accepted request alone is not proof that every recipient received a message.