# Profiles

Save a set of VM settings as a profile and create VMs from it, knowing later edits reach only new VMs.

Source: https://slashinfra.com/docs/platform/profiles
Last modified: 2026-11-30T16:36:19.000Z

A profile is a saved set of VM settings: environment variables, inbox, domain filter, secret injections, sleep, readiness and concurrency. A VM copies the profile when it is created, and a later change or delete does not touch the VMs that already exist.

## Create a profile

A profile holds settings but no VM name, size, region, snapshot or secret value. Its name has 1 to 32 lowercase letters, digits and hyphens, starts with a letter, and is unique in its project.

### Dashboard

- Open [Workload profiles](https://app.slashinfra.com/svms/profiles). 
- Select Create profile. 
- Enter `agents` in Name. 
- Turn on Outbound access filter. 
- Enter `api.example.com` in Allowed hosts, and select Add. 
- Select Add variable under Environment variables, and enter `DEBUG` in Name and `1` in Value. 
- Select Add variable again, and enter `GREETING` in Name and `hello` in Value. 
- Select Create profile.

### CLI

```bash
si org profile create agents --env DEBUG=1 --env GREETING=hello --egress-filter --allow-domain api.example.com
```

Output

```text
agents
```

### curl

```bash
curl -sS -X POST "https://api.slashinfra.com/profiles" \
-H "Authorization: Bearer $SI_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"agents","env":{"DEBUG":"1","GREETING":"hello"},"egress":{"filtering":true,"allowed_domains":["api.example.com"]},"sleep":{"mode":"timer","after_s":1800},"readiness":{"port":5432,"timeout_s":30},"concurrency":32}'
```

Output

```text
{"id":"prof_6f1c0f0e8a","project":"proj_6f1c0f0e8a","name":"agents","env":{"DEBUG":"1","GREETING":"hello"},"inbox":{"enabled":false,"allowed_senders":null},"egress":{"filtering":true,"allowed_domains":["api.example.com"]},"secret_injections":[],"sleep":{"mode":"timer","after_s":1800},"readiness":{"port":5432,"timeout_s":30},"concurrency":32,"created_ms":1795955977351,"updated_ms":1795955977351}
```

### Python

```python
import os, requests

res = requests.post(
"https://api.slashinfra.com/profiles",
headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},
json={
"name": "agents",
"env": {"DEBUG": "1", "GREETING": "hello"},
"egress": {"filtering": True, "allowed_domains": ["api.example.com"]},
"sleep": {"mode": "timer", "after_s": 1800},
"readiness": {"port": 5432, "timeout_s": 30},
"concurrency": 32,
},
)
res.raise_for_status()
print(res.json()["id"])
```

Output

```text
prof_6f1c0f0e8a
```

### TypeScript

```ts
const res = await fetch('https://api.slashinfra.com/profiles', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SI_API_KEY!}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'agents',
env: { DEBUG: '1', GREETING: 'hello' },
egress: { filtering: true, allowed_domains: ['api.example.com'] },
sleep: { mode: 'timer', after_s: 1800 },
readiness: { port: 5432, timeout_s: 30 },
concurrency: 32,
}),
})
if (!res.ok) throw new Error(await res.text())
const profile = (await res.json()) as { id: string }
console.log(profile.id)
```

Output

```text
prof_6f1c0f0e8a
```

The API alone sets `sleep`, `readiness` and `concurrency`. The dashboard and CLI set the name, environment variables, inbox and outbound access, and the dashboard also adds secret rules.

## Create a VM from a profile

A create names the profile with `profile_id` (`--profile`), either its id or its name in the VM’s project. The profile fills every block the create leaves out; a given block replaces the profile’s block whole, so an omitted subfield in it takes its default, and a given `readiness` or `concurrency` wins over the profile’s value. `name`, `memory_mib`, `region` and `snapshot` are not profile fields.

### Dashboard

- Open [SVMs](https://app.slashinfra.com/svms). 
- Select Create SVM. 
- Enter `agent-1` in Name. 
- Choose `agents` in Profile. 
- Choose Auto in Sleep. 
- Select Create SVM.

### CLI

```bash
si create --name agent-1 --profile agents --env DEBUG=2
```

Output

```text
6f1c0f0e8a
```

```bash
si exec agent-1 -- sh -c 'printf "%s|%s\n" "$DEBUG" "${GREETING-unset}"'
```

Output

```text
2|unset
```

### curl

```bash
curl -sS -X POST "https://api.slashinfra.com/svms" \
-H "Authorization: Bearer $SI_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"agent-1","profile_id":"agents","env":{"DEBUG":"2"}}'
```

Output

```text
{"id":"6f1c0f0e8a","project":"proj_6f1c0f0e8a","url":"https://6f1c0f0e8a.slashinfra.dev/bin/bash","region":"eu-gra","expires_at":null,"generation":1,"labels":{}}
```

### Python

```python
import os, requests

res = requests.post(
"https://api.slashinfra.com/svms",
headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},
json={"name": "agent-1", "profile_id": "agents", "env": {"DEBUG": "2"}},
)
res.raise_for_status()
print(res.json()["id"])
```

Output

```text
6f1c0f0e8a
```

### TypeScript

```ts
const res = await fetch('https://api.slashinfra.com/svms', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SI_API_KEY!}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'agent-1',
profile_id: 'agents',
env: { DEBUG: '2' },
}),
})
if (!res.ok) throw new Error(await res.text())
const vm = (await res.json()) as { id: string }
console.log(vm.id)
```

Output

```text
6f1c0f0e8a
```

A create that gives `env` replaces all environment variables: with `{"DEBUG":"2"}`, `DEBUG` is `2`, and `GREETING` is not copied. Leave `env` out to copy the profile’s environment variables. A `sleep`, `readiness` or `concurrency` value the profile sets still applies unless the create names it. The dashboard’s Sleep field is always sent, so Auto overrides a profile’s policy; choose the profile’s policy to keep it.

## List profiles

List returns every profile of one project, by name, and the API returns `[]` when the project has none. The CLI table counts environment variables and prints the sender rule, filter and domains in words.

### Dashboard

- Open [Workload profiles](https://app.slashinfra.com/svms/profiles). The table lists every profile of the active project, with its settings, update time and actions.

### CLI

```bash
si org profile ls
```

Output

```text
id               name    env  inbox  senders  filter  domains          updated
prof_6f1c0f0e8a  agents  2    off    any      on      api.example.com  2026-11-29 12:37:47Z
```

### curl

```bash
curl -sS "https://api.slashinfra.com/profiles" \
-H "Authorization: Bearer $SI_API_KEY"
```

Output

```text
[{"id":"prof_6f1c0f0e8a","project":"proj_6f1c0f0e8a","name":"agents","env":{"DEBUG":"1","GREETING":"hello"},"inbox":{"enabled":false,"allowed_senders":null},"egress":{"filtering":true,"allowed_domains":["api.example.com"]},"secret_injections":[],"sleep":{"mode":"timer","after_s":1800},"readiness":{"port":5432,"timeout_s":30},"concurrency":32,"created_ms":1795955977351,"updated_ms":1795955977351}]
```

### Python

```python
import os, requests

res = requests.get(
"https://api.slashinfra.com/profiles",
headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},
)
res.raise_for_status()
for profile in res.json():
print(profile["id"], profile["name"])
```

Output

```text
prof_6f1c0f0e8a agents
```

### TypeScript

```ts
const res = await fetch('https://api.slashinfra.com/profiles', {
headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}` },
})
if (!res.ok) throw new Error(await res.text())
const profiles = (await res.json()) as { id: string; name: string }[]
for (const profile of profiles) console.log(profile.id, profile.name)
```

Output

```text
prof_6f1c0f0e8a agents
```

## Get a profile

Get returns one profile by name or id. A name resolves in the request’s project, an id resolves in every project of the organization, and a ref that names no profile answers 404 `profile_not_found`. The CLI prints the name, environment variables, inbox, sender rule, filter, domains and update time; the API returns every field, including `sleep`, `readiness`, `concurrency` and `secret_injections`.

### CLI

```bash
si org profile show agents
```

Output

```text
id:          prof_6f1c0f0e8a
name:        agents
env:         DEBUG=1, GREETING=hello
inbox:       off
senders:     any
filtering:   on
domains:     api.example.com
updated:     2026-11-29 12:37:47Z
```

### curl

```bash
curl -sS "https://api.slashinfra.com/profiles/agents" \
-H "Authorization: Bearer $SI_API_KEY"
```

Output

```text
{"id":"prof_6f1c0f0e8a","project":"proj_6f1c0f0e8a","name":"agents","env":{"DEBUG":"1","GREETING":"hello"},"inbox":{"enabled":false,"allowed_senders":null},"egress":{"filtering":true,"allowed_domains":["api.example.com"]},"secret_injections":[],"sleep":{"mode":"timer","after_s":1800},"readiness":{"port":5432,"timeout_s":30},"concurrency":32,"created_ms":1795955977351,"updated_ms":1795955977351}
```

### Python

```python
import os, requests

res = requests.get(
"https://api.slashinfra.com/profiles/agents",
headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},
)
res.raise_for_status()
profile = res.json()
print(profile["env"], profile["sleep"])
```

Output

```text
{'DEBUG': '1', 'GREETING': 'hello'} {'mode': 'timer', 'after_s': 1800}
```

### TypeScript

```ts
const res = await fetch('https://api.slashinfra.com/profiles/agents', {
headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}` },
})
if (!res.ok) throw new Error(await res.text())
const profile = (await res.json()) as {
env: Record<string, string>
sleep: { mode: string }
}
console.log(JSON.stringify(profile.env), JSON.stringify(profile.sleep))
```

Output

```text
{"DEBUG":"1","GREETING":"hello"} {"mode":"timer","after_s":1800}
```

## Change a profile

Change replaces the name or a whole block; an omitted block keeps its value, and a given block replaces it whole. The id stays, and VMs created before the change keep the settings they copied.

### Dashboard

- Open [Workload profiles](https://app.slashinfra.com/svms/profiles). 
- Select the edit icon (Edit profile agents) on its row. 
- Change Name to `coding-agents`. 
- Change the value of `DEBUG` to `0`, and select the trash icon next to `GREETING`. 
- Select Save changes.

### CLI

```bash
si org profile update agents --name coding-agents --env DEBUG=0
```

Output

```text
coding-agents
```

The VM created earlier keeps the environment variables it copied:

```bash
si exec agent-1 -- sh -c 'printf "%s|%s\n" "$DEBUG" "${GREETING-unset}"'
```

Output

```text
2|unset
```

### curl

```bash
curl -sS -X PUT "https://api.slashinfra.com/profiles/agents" \
-H "Authorization: Bearer $SI_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"coding-agents","env":{"DEBUG":"0"},"sleep":{"mode":"on"},"readiness":null,"concurrency":64}'
```

Output

```text
{"id":"prof_6f1c0f0e8a","project":"proj_6f1c0f0e8a","name":"coding-agents","env":{"DEBUG":"0"},"inbox":{"enabled":false,"allowed_senders":null},"egress":{"filtering":true,"allowed_domains":["api.example.com"]},"secret_injections":[],"sleep":{"mode":"on"},"readiness":null,"concurrency":64,"created_ms":1795955977351,"updated_ms":1795955993378}
```

### Python

```python
import os, requests

res = requests.put(
"https://api.slashinfra.com/profiles/agents",
headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},
json={
"name": "coding-agents",
"env": {"DEBUG": "0"},
"sleep": {"mode": "on"},
"readiness": None,
"concurrency": 64,
},
)
res.raise_for_status()
profile = res.json()
print(profile["name"], profile["sleep"])
```

Output

```text
coding-agents {'mode': 'on'}
```

### TypeScript

```ts
const res = await fetch('https://api.slashinfra.com/profiles/agents', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SI_API_KEY!}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'coding-agents',
env: { DEBUG: '0' },
sleep: { mode: 'on' },
readiness: null,
concurrency: 64,
}),
})
if (!res.ok) throw new Error(await res.text())
const profile = (await res.json()) as { name: string; sleep: { mode: string } }
console.log(profile.name, JSON.stringify(profile.sleep))
```

Output

```text
coding-agents {"mode":"on"}
```

## Delete a profile

Delete removes the profile and frees its name; every VM that copied it keeps its settings. The dashboard waits five seconds for Undo, and the API deletes at once.

### Dashboard

- Open [Workload profiles](https://app.slashinfra.com/svms/profiles). 
- Select More actions on the `coding-agents` row. 
- Select Delete. The row stays for five seconds; select Undo to keep the profile.

### CLI

```bash
si org profile rm coding-agents
```

Output

```text
deleted profile coding-agents
```

The VM created earlier still has `DEBUG=2`:

```bash
si exec agent-1 -- sh -c 'printf "%s|%s\n" "$DEBUG" "${GREETING-unset}"'
```

Output

```text
2|unset
```

### curl

```bash
curl -sS -i -X DELETE "https://api.slashinfra.com/profiles/coding-agents" \
-H "Authorization: Bearer $SI_API_KEY"
```

Output

```text
HTTP/2 204
...
```

### Python

```python
import os, requests

res = requests.delete(
"https://api.slashinfra.com/profiles/coding-agents",
headers={"Authorization": f"Bearer {os.environ['SI_API_KEY']}"},
)
res.raise_for_status()
print(res.status_code)
```

Output

```text
204
```

### TypeScript

```ts
const res = await fetch('https://api.slashinfra.com/profiles/coding-agents', {
method: 'DELETE',
headers: { Authorization: `Bearer ${process.env.SI_API_KEY!}` },
})
if (!res.ok) throw new Error(await res.text())
console.log(res.status)
```

Output

```text
204
```

The VM still exists after the profile is gone. Delete it on the [VMs](https://slashinfra.com/docs/platform/vms) page when you are done.

## Options

| Field | Type | Default | Allowed values | What it changes |
| --- | --- | --- | --- | --- |   
| `name` (positional on create, `--name` on change) | string | Required on create; kept on change | 1 to 32 lowercase letters, digits or hyphens, starting with a letter; unique in the project | The profile name. A change can rename the profile. | 
| `project` (`--project`) | string | `default` | A project name, or its `proj_` id | The project that holds a new profile. Create only. | 
| `env` (`--env`) | object | `{}` | At most 128 variables and 32 KiB; names match `^[A-Za-z_][A-Za-z0-9_]*$`; `SVM_*`, `SI_*`, proxy variables, `HOME`, `USER` and `LOGNAME` are refused | The environment variables of new VMs. A change replaces the whole map. | 
| `inbox` (`--email`, `--allow-sender`) | object | `{"enabled":false,"allowed_senders":null}` | `enabled` is a boolean; `allowed_senders` is `null` for any sender, `[]` for none, or exact SMTP envelope addresses | The email inbox of new VMs. `--allow-sender` implies `--email`. | 
| `egress` (`--egress-filter`, `--allow-domain`) | object | `{"filtering":false,"allowed_domains":[]}` | `filtering` is a boolean; each domain is an exact hostname or `*.domain`, at most 253 characters | The outbound filter of new VMs. | 
| `secret_injections` | array | `[]` | One exact host per rule; exactly one of `header` and `placeholder`; a `sec_` id or `connection:` and a `conn_` id; `value_prefix` holds no CR, LF or NUL; `value_format` is `raw` or `basic_x_access_token` | The HTTPS secret rules of new VMs; `value_prefix` is empty and `value_format` is `raw` by default. See [Secrets](https://slashinfra.com/docs/platform/secrets). | 
| `sleep` | object or null | `null` | `{"mode":"auto"}`, `{"mode":"timer","after_s":1800}` with 30 to 86400, or `{"mode":"on"}` | The sleep policy of new VMs. `null` starts them on `auto`. | 
| `readiness` | object or null | `null` | `port` 1 to 65535; optional `path` starts with `/` and has at most 2048 bytes; `timeout_s` 1 to 120 | The readiness probe of new VMs. `null` clears it on change. | 
| `concurrency` | integer | 64 | 1 to 1024, and not above the plan’s `max_concurrency` | The most requests a new VM runs at once. | 
| `ref` (path) | string | Required | A profile name in the `project` query, or its `prof_` id | The profile that get, change and delete act on. |

The `si org profile` commands have no flag for `secret_injections`, `sleep`, `readiness` or `concurrency`, and they cannot set `allowed_senders` to `[]`; `--allow-sender` replaces the list only with the addresses you give. `--project` and the `project` query choose the project for every profile command; the body field sets it only on create.

## Errors

| Code | When | Fix |
| --- | --- | --- |   
| [`invalid_name`](https://slashinfra.com/docs/reference/errors#invalid_name) | Create or change sends a name outside 1 to 32 lowercase letters, digits or hyphens, or a name that starts with a digit or could be an id. | Start with a letter, use lowercase letters, digits and hyphens, and choose another name if it looks like an id. | 
| [`name_taken`](https://slashinfra.com/docs/reference/errors#name_taken) | Create or change uses a name another profile of the project has. | Choose another name. | 
| [`invalid_env`](https://slashinfra.com/docs/reference/errors#invalid_env) | A variable name breaks the rule or uses a reserved name. | Use letters, digits and underscores, not starting with a digit; avoid `SVM_*`, `SI_*`, proxy variables, `HOME`, `USER` and `LOGNAME`. | 
| [`env_too_large`](https://slashinfra.com/docs/reference/errors#env_too_large) | The profile has more than 128 environment variables or more than 32 KiB. | Remove variables, or move large values to files. | 
| [`invalid_sender`](https://slashinfra.com/docs/reference/errors#invalid_sender) | `allowed_senders` holds an address that is not a full email address. | Use exact SMTP envelope addresses, with no domain wildcards. | 
| [`invalid_domain`](https://slashinfra.com/docs/reference/errors#invalid_domain) | An allowed domain is not an exact hostname or `*.domain`. | Check the spelling; a wildcard is only the `*.` prefix. | 
| [`invalid_injection`](https://slashinfra.com/docs/reference/errors#invalid_injection) | A secret rule has no single exact host, gives both or neither of `header` and `placeholder`, uses a protected header, or has a bad placeholder or reference. | Give one exact host and exactly one of `header` and `placeholder`. See [Secrets](https://slashinfra.com/docs/platform/secrets). | 
| [`invalid_sleep`](https://slashinfra.com/docs/reference/errors#invalid_sleep) | The mode is not `auto`, `timer` or `on`, a timer lacks `after_s`, or `after_s` is outside 30 to 86400. | Send one of the three shapes in Options. | 
| [`invalid_readiness`](https://slashinfra.com/docs/reference/errors#invalid_readiness) | The port is outside 1 to 65535, the timeout outside 1 to 120, or the path is not absolute. | Keep the port and timeout in range, and start the path with `/`. | 
| [`invalid_concurrency`](https://slashinfra.com/docs/reference/errors#invalid_concurrency) | The concurrency is outside 1 to 1024 or above the plan’s `max_concurrency`. | Lower it to the plan’s `max_concurrency` or less. | 
| [`unknown_secret`](https://slashinfra.com/docs/reference/errors#unknown_secret) | An injection names a secret id that no secret of the organization has. | List the secrets of the project and use an existing id. | 
| [`secret_not_found`](https://slashinfra.com/docs/reference/errors#secret_not_found) | An injection names a secret of another project. | Use a secret of the profile’s project. | 
| [`unknown_connection`](https://slashinfra.com/docs/reference/errors#unknown_connection) | An injection names a connection that does not exist. | List the connections and use an existing id. | 
| [`profile_not_found`](https://slashinfra.com/docs/reference/errors#profile_not_found) | The ref names no profile the request can see, or a VM create names a profile of another project. | Check the name and the project; a profile must be in the VM’s project. | 
| [`project_not_found`](https://slashinfra.com/docs/reference/errors#project_not_found) | The project query or body names no project of your organization, or one outside the key’s scope. | Check the name or id, and the key’s project scope. |

Errors that any request can return are in the [error catalog](https://slashinfra.com/docs/reference/errors).

## Permissions

| Operation | Who can | Key action |
| --- | --- | --- |   
| Create a profile | Any member | `profile:write` | 
| Create a VM from a profile | Any member | `svm:write` | 
| List profiles | Any member | `profile:read` | 
| Get a profile | Any member | `profile:read` | 
| Change a profile | Any member | `profile:write` | 
| Delete a profile | Any member | `profile:delete` |

## Limits

- A profile name has 1 to 32 lowercase letters, digits or hyphens and starts with a letter. A name that could be an id (10 letters and digits) is refused. 
- A profile holds at most 128 environment variables and 32 KiB together. 
- A sleep timer is 30 to 86400 seconds after the last external activity. 
- A readiness timeout is 1 to 120 seconds, and its port is 1 to 65535. 
- Concurrency is 1 to 1024 and never above the plan’s `max_concurrency`; 64 when neither the profile nor the create names one. 
- An allowed domain is at most 253 characters, and an injection header at most 128. 
- A profile belongs to one project. A VM create that names a profile of another project answers 404 `profile_not_found`.

The full list is in [Limits](https://slashinfra.com/docs/reference/limits).

## Next

- [VMs](https://slashinfra.com/docs/platform/vms): the fields a profile copies and the ones only a create sets. 
- [Secrets](https://slashinfra.com/docs/platform/secrets): how a secret rule names its host, header and secret. 
- [Control API profiles](https://slashinfra.com/docs/api-reference/control/profiles): every operation, field and status code.
