- Docs
- NSIN CLOUD
API keys and permissions
Make an API key for a script, CI or an AI agent, and choose exactly what it may do. How to keep an agent away from your database.
On this page
An API key lets a script, a CI job or an AI agent such as Cursor or Claude Code use NSIN CLOUD as you, over the REST API (https://api.nsincloud.ir/v1) and the MCP server (https://api.nsincloud.ir/mcp). Each key has its own list of permissions: you choose what it may do.
Make a key
- In the panel, open Settings → API keys (also in the sidebar and the account menu).
- Click New API key and give it a name, for example
cursororgithub-actions. - Pick a preset, then turn single switches on or off if you need to.
- Pick when it expires: 30 days, 90 days, 1 year or never.
- Click Create key and copy the key. It starts with
sk_. It is shown only once.
Send it as X-Api-Key: sk_… or Authorization: Bearer sk_….
Presets
| Preset | What the key may do |
|---|---|
| Full access | Everything a key can do. Only for a script you fully trust. |
| Deploy | See everything, deploy and change apps, set environment variables, use git and GitOps. No database passwords, no terminals, no secret values, no backups or files. Good for CI and AI agents. |
| No database access | Everything except database passwords, terminals, secret values and database data. |
| Read only | Look, never change anything. |
All permissions
The ones marked sensitive reach your data or a shell. They are off in every preset except Full access.
| Switch | Lets the key |
|---|---|
read | See projects, apps, databases, buckets, logs, metrics, billing and activity |
apps.deploy | Deploy, restart, stop, start and roll back apps |
apps.manage | Create, change and delete apps (settings, size, disks, domains, ports) |
apps.terminal (sensitive) | Run commands and open a terminal in apps |
env.write | Add and change environment variables |
env.secrets (sensitive) | See secret values of environment variables |
db.manage | Create, resize and delete databases |
db.credentials (sensitive) | See database passwords and connection addresses, open database ports |
db.terminal (sensitive) | Open a terminal and run commands in databases |
db.data (sensitive) | Back up, restore, copy and download database data |
storage.manage | Create and change buckets |
storage.files (sensitive) | Open, upload, copy and delete files in buckets |
storage.keys (sensitive) | Create and delete Storage access keys |
git | Use git connections, deploy keys and webhooks |
gitops | Link and sync infra repos, create and update compose stacks |
members (sensitive) | Create projects, invite people, change roles, transfer projects |
billing | Make top-up links and invoices, set spending limits |
support | Write support tickets |
No key can make or change API keys, change your account, connect NSIN or use the panel assistant. Those need you, signed in to the panel.
Keep an AI agent away from your database
Give the agent a key with the Deploy preset. It can deploy, restart and change your apps, but it cannot:
- see database passwords or connection addresses,
- run commands or open a terminal in an app or a database,
- see the values of secret environment variables (they show as empty),
- back up, restore, copy or download a database,
- open, upload or delete files in your buckets.
Over MCP the agent does not even see those tools. If it tries the API anyway, it gets 403 with "code": "key_permission" and a sentence saying which switch is missing, so it can tell you.
Change or revoke a key
- Edit permissions changes the switches of a live key. Taking access away works at once. Giving a key more access asks you to sign in again if your last sign-in is older than 15 minutes.
- Revoke stops the key at once. Anything that uses it gets
401.
Old keys keep working as before: a full-access key stays full, a read-only key stays read-only.
For agents: what may this key do?
GET /v1/me answers with key_permissions and key_cannot for a key with permissions. Over MCP, get_me and nsincloud_overview end with the same list in words.