# Riferimento API: Account e team

Account e team: ogni operazione dell'API v1 con scope, parametri, esempi in curl, JavaScript e Python e le risposte. Autenticazione, errori, paginazione, limiti di frequenza e idempotenza sono nella [panoramica del riferimento API](/docs/api-reference); vedi anche gli [SDK](/docs/sdks) e la [riga di comando](/docs/cli).

> Provalo con la tua chiave: crea una chiave API nella console, esegui `export APIDLY_API_KEY=...` nel terminale e incolla uno degli esempi curl qui sotto. I valori degli esempi sono indicativi. In questa pagina non c'è alcun campo per inserire una chiave.

Le descrizioni delle operazioni e dei campi provengono dalla definizione dell'API e sono in inglese.

| Operazione | Scope richiesto | Riepilogo |
| --- | --- | --- |
| `GET /me` | `read` | L'organizzazione, la chiave e il portafoglio |
| `GET /team/members` | `read` | Membri dell'organizzazione |
| `GET /team/roles` | `full` | Ruoli predefiniti e personalizzati con i relativi permessi |
| `POST /team/roles` | `full` | Creare un ruolo personalizzato |
| `GET /notification-preferences` | `read` | Interruttori delle notifiche |
| `PUT /notification-preferences` | `full` | Modificare gli interruttori delle notifiche |
| `GET /activity` | `read` | Il registro delle attività dell'organizzazione, dal più recente |
| `GET /team/invitations` | `full` | Inviti in sospeso, dal più recente |
| `POST /team/invitations` | `full` | Invitare una persona via e-mail |
| `DELETE /team/invitations/{id}` | `full` | Revocare un invito in sospeso |
| `PATCH /team/members/{userId}` | `full` | Cambiare il ruolo di un membro |
| `DELETE /team/members/{userId}` | `full` | Rimuovere un membro dall'organizzazione |
| `PUT /team/members/{userId}/spending-limit` | `full` | Impostare o rimuovere il limite di spesa mensile di un membro |
| `PATCH /team/roles/{id}` | `full` | Sostituire nome, descrizione e permessi di un ruolo personalizzato |
| `DELETE /team/roles/{id}` | `full` | Eliminare un ruolo personalizzato |
| `POST /team/invitations/{id}/resend` | `full` | Reinviare un invito |
| `GET /notifications` | `read` | Notifiche in app del membro per conto del quale agisce la chiave |
| `POST /notifications/read` | `servers` | Segnare come lette tutte le notifiche in app |
| `PATCH /organization` | `full` | Rinominare l'organizzazione o cambiarne l'e-mail di fatturazione o il paese |
| `GET /organization/defaults` | `read` | Impostazioni predefinite di avvio dell’organizzazione |
| `PATCH /organization/defaults` | `full` | Modifica le impostazioni predefinite di avvio |
| `GET /me/profile` | `full` | Il profilo del membro della chiave |
| `PATCH /me/profile` | `full` | Modifica nome visualizzato, lingua o fuso orario |
| `GET /activity/export` | `read` | Il registro delle attività come file CSV |
| `GET /openapi.json` | `read` | Questo documento |

## Account

### GET /me

L'organizzazione, la chiave e il portafoglio

A per-server token (`apc_srv_...`, from "Allow this server to stop itself") may call this too; it then gets `{ org, key: { kind: "server" }, server }` without a balance.

**Scope richiesto:** `read`

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/me" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.me()
```

**Strumento da riga di comando:** `apidly init`, `apidly status`, `apidly login`, `apidly whoami`, `apidly doctor` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "org": {
    "id": "example",
    "name": "example",
    "slug": "example",
    "status": "example",
    "requireTwoFactor": false,
    "memberEmailsVisible": false
  },
  "key": {
    "id": "example",
    "name": "example",
    "prefix": "example",
    "scope": "read",
    "expiresAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "creatorRole": "owner",
    "permissions": [
      "example"
    ],
    "permissionList": [
      "example"
    ]
  },
  "balance": {
    "balanceMicros": "1000000",
    "balanceUsd": "1.000000",
    "burnPerHourMicros": "1000000",
    "burnPerHourUsd": "1.000000",
    "runwayHours": 1,
    "state": "ok",
    "graceUntil": "2026-11-21T10:00:00.000Z",
    "monthToDateMicros": "1000000",
    "monthToDateUsd": "1.000000"
  }
}
```

Stati di errore: `401`, `403`, `429`.

### GET /team/members

Membri dell'organizzazione

**Scope richiesto:** `read`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no |  |

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/team/members?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.team.list_members()
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "members": [
    {
      "userId": "id_example",
      "name": "example",
      "email": "dev@example.com",
      "role": "owner",
      "roleId": "id_example",
      "roleName": "example",
      "permissions": [
        "example"
      ],
      "joinedAt": "2026-11-21T10:00:00.000Z",
      "spendingLimit": {
        "monthlyLimitMicros": "1000000",
        "monthlyLimitUsd": "1.000000",
        "monthToDateMicros": "1000000",
        "monthToDateUsd": "1.000000"
      }
    }
  ],
  "nextCursor": "example"
}
```

Stati di errore: `401`, `403`, `429`.

### GET /team/roles

Ruoli predefiniti e personalizzati con i relativi permessi

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/team/roles" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.team.list_roles()
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "roles": [
    {
      "id": "example",
      "name": "example",
      "description": "example",
      "builtin": false,
      "permissions": [
        "example"
      ],
      "memberCount": 1
    }
  ]
}
```

Stati di errore: `401`, `403`, `429`.

### POST /team/roles

Creare un ruolo personalizzato

At most 10 per organization. The key's creator must be the owner, and cannot grant permissions they lack.

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `name` | string | sì |  |
| `description` | string | no |  |
| `permissions` | array di `servers.view` \| `servers.deploy` \| `servers.manage` \| `servers.destroy` \| `servers.exec` \| `templates.manage` \| `endpoints.manage` \| `endpoints.invoke` \| `storage.manage` \| `ssh_keys.manage` \| `secrets.manage` \| `api_keys.manage` \| `webhooks.manage` \| `automation.manage` \| `billing.view` \| `billing.topup` \| `billing.manage` \| `team.manage` \| `settings.manage` \| `activity.view` | sì |  |

**Richiesta di esempio (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/team/roles" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","permissions":["servers.view"]}'
```

**Python (SDK)**

```python
client.team.create_role(name="example", permissions=["servers.view"])
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (201)

```json
{
  "role": {
    "id": "example",
    "name": "example",
    "description": "example",
    "builtin": false,
    "permissions": [
      "example"
    ],
    "memberCount": 1
  }
}
```

Stati di errore: `400`, `401`, `403`, `409`, `429`.

### GET /notification-preferences

Interruttori delle notifiche

Email and in-app switches and the running-server reminder belong to the member the key acts as; the webhook switch belongs to the organization.

**Scope richiesto:** `read`

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/notification-preferences" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.notifications.get();
```

**Python (SDK)**

```python
client.notifications.get()
```

**Strumento da riga di comando:** `apidly notifications` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "categories": [
    {
      "id": "example",
      "forcedMail": false,
      "email": {
        "value": false
      },
      "inApp": {
        "value": false
      },
      "webhook": {
        "value": false
      },
      "webhookEvents": [
        "example"
      ]
    }
  ],
  "runningReminderHours": 1,
  "weeklySummary": false,
  "canEditWebhooks": false
}
```

Stati di errore: `401`, `403`, `429`.

### PUT /notification-preferences

Modificare gli interruttori delle notifiche

`org` rows (webhook) need webhook management; categories you leave out are unchanged.

**Scope richiesto:** `full`

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `weeklySummary` | boolean | no |  |
| `runningReminderHours` | integer o null | no |  |
| `user` | object | no |  |
| `org` | object | no |  |

**Richiesta di esempio (curl)**

```bash
curl -X PUT "https://apidly.com/api/v1/notification-preferences" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"weeklySummary":false,"runningReminderHours":1,"user":{}}'
```

**JavaScript (SDK)**

```js
await apidly.notifications.set({
  weeklySummary: false,
  runningReminderHours: 1,
  user: {}
});
```

**Python (SDK)**

```python
client.notifications.set(body={
    "weeklySummary": False,
    "runningReminderHours": 1,
    "user": {},
})
```

**Strumento da riga di comando:** `apidly notifications` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "categories": [
    {
      "id": "example",
      "forcedMail": false,
      "email": {
        "value": false
      },
      "inApp": {
        "value": false
      },
      "webhook": {
        "value": false
      },
      "webhookEvents": [
        "example"
      ]
    }
  ],
  "runningReminderHours": 1,
  "weeklySummary": false,
  "canEditWebhooks": false
}
```

Stati di errore: `400`, `401`, `403`, `429`.

### GET /activity

Il registro delle attività dell'organizzazione, dal più recente

Addresses are masked to the /24 unless the key's creator is the owner.

**Scope richiesto:** `read` · **Permesso:** `activity.view`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `actor` | query | string | no | Exactly one actor id: a member user id or an API key id. |
| `category` | query | `signIn` \| `team` \| `keys` \| `servers` \| `billing` \| `settings` | no |  |
| `cursor` | query | string | no |  |
| `from` | query | string | no | YYYY-MM-DD, UTC. |
| `to` | query | string | no | YYYY-MM-DD, UTC, inclusive. |
| `limit` | query | integer | no |  |

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/activity?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.activity.list({ limit: 20 });
```

**Python (SDK)**

```python
client.activity.list()
```

**Strumento da riga di comando:** `apidly activity` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "activity": [
    {
      "id": "example",
      "at": "2026-11-21T10:00:00.000Z",
      "category": "signIn",
      "action": "example",
      "actor": {
        "kind": "example",
        "label": "example"
      },
      "ip": "example",
      "params": {
        "key": null
      }
    }
  ],
  "nextCursor": "example"
}
```

Stati di errore: `401`, `403`, `429`.

### GET /team/invitations

Inviti in sospeso, dal più recente

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no |  |

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/team/invitations?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.team.list_invitations()
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "invitations": [
    {
      "id": "example",
      "email": "dev@example.com",
      "role": "owner",
      "roleKey": "example",
      "roleName": "example",
      "customRoleId": "id_example",
      "customRoleName": "example",
      "invitedByName": "example",
      "invitedByEmail": "dev@example.com",
      "expiresAt": "2026-11-21T10:00:00.000Z",
      "createdAt": "2026-11-21T10:00:00.000Z",
      "expired": false,
      "mailSent": false
    }
  ],
  "nextCursor": "example"
}
```

Stati di errore: `401`, `403`, `429`.

### POST /team/invitations

Invitare una persona via e-mail

`role` is `admin`, `member` (default) or a custom role id from `GET /team/roles`. The key's creator cannot grant permissions they lack (403 `role_escalation`). The invitation mail is sent and the link is valid for 7 days.

**Scope richiesto:** `full` · **Permesso:** `team.manage` · **Ripetibile in sicurezza con:** `Idempotency-Key`

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `email` | string | sì |  |
| `role` | string | no |  |

**Richiesta di esempio (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/team/invitations" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"email":"dev@example.com"}'
```

**Python (SDK)**

```python
client.team.invite(email="dev@example.com")
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (201)

```json
{
  "invitation": {
    "id": "example",
    "email": "dev@example.com",
    "role": "owner",
    "roleKey": "example",
    "roleName": "example",
    "customRoleId": "id_example",
    "customRoleName": "example",
    "invitedByName": "example",
    "invitedByEmail": "dev@example.com",
    "expiresAt": "2026-11-21T10:00:00.000Z",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "expired": false,
    "mailSent": false
  }
}
```

Stati di errore: `400`, `401`, `403`, `409`, `422`, `429`.

### DELETE /team/invitations/{id}

Revocare un invito in sospeso

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `id` | path | string | sì |  |

**Richiesta di esempio (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/team/invitations/team_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.team.revoke_invitation("team_example")
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "deleted": false,
  "id": "example"
}
```

Stati di errore: `401`, `403`, `404`, `429`.

### PATCH /team/members/{userId}

Cambiare il ruolo di un membro

Same rules as the console: no escalation beyond the key creator's own permissions (403 `role_escalation`), the last owner keeps the role (403 `last_owner`).

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `userId` | path | string | sì |  |

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `role` | string | sì |  |

**Richiesta di esempio (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/team/members/team_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"role":"example"}'
```

**Python (SDK)**

```python
client.team.update_member("team_example", role="example")
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "userId": "id_example",
  "role": "owner",
  "roleKey": "example",
  "roleName": "example"
}
```

Stati di errore: `400`, `401`, `403`, `404`, `429`.

### DELETE /team/members/{userId}

Rimuovere un membro dall'organizzazione

A key cannot remove the member who created it (403 `forbidden`); leave from the console.

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `userId` | path | string | sì |  |

**Richiesta di esempio (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/team/members/team_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.team.remove_member("team_example")
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "deleted": false,
  "userId": "id_example"
}
```

Stati di errore: `401`, `403`, `404`, `429`.

### PUT /team/members/{userId}/spending-limit

Impostare o rimuovere il limite di spesa mensile di un membro

`monthlyLimitCents` in US cents; `null` removes the limit. A member's month-to-date usage is the usage this UTC month of the servers they launched, from the console or with any key. At the limit, their new launches (servers, copies, launch again) and the starts of their stopped servers answer 403 `member_limit_reached` until the limit is raised or the month ends; servers already running are not stopped, and workers that a serverless endpoint or server group starts by itself are not refused. Needs `team.manage` and `billing.manage`. Only an owner may change their own limit (403 `forbidden`). 404 `not_found` for someone who is not a member; 404 `feature_unavailable` while spending limits are not available.

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `userId` | path | string | sì |  |

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `monthlyLimitCents` | integer o null | sì |  |

**Richiesta di esempio (curl)**

```bash
curl -X PUT "https://apidly.com/api/v1/team/members/team_example/spending-limit" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"monthlyLimitCents":1}'
```

**Python (SDK)**

```python
client.team.set_member_spending_limit("team_example", monthly_limit_cents=1)
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "userId": "id_example",
  "spendingLimit": {
    "monthlyLimitMicros": "1000000",
    "monthlyLimitUsd": "1.000000",
    "monthToDateMicros": "1000000",
    "monthToDateUsd": "1.000000"
  }
}
```

Stati di errore: `400`, `401`, `403`, `404`, `429`.

### PATCH /team/roles/{id}

Sostituire nome, descrizione e permessi di un ruolo personalizzato

Every member who holds the role follows the new permissions on their next request. Owner only.

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `id` | path | string | sì |  |

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `name` | string | sì |  |
| `description` | string | no |  |
| `permissions` | array di `servers.view` \| `servers.deploy` \| `servers.manage` \| `servers.destroy` \| `servers.exec` \| `templates.manage` \| `endpoints.manage` \| `endpoints.invoke` \| `storage.manage` \| `ssh_keys.manage` \| `secrets.manage` \| `api_keys.manage` \| `webhooks.manage` \| `automation.manage` \| `billing.view` \| `billing.topup` \| `billing.manage` \| `team.manage` \| `settings.manage` \| `activity.view` | sì |  |

**Richiesta di esempio (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/team/roles/team_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","permissions":["servers.view"]}'
```

**Python (SDK)**

```python
client.team.update_role("team_example", name="example", permissions=["servers.view"])
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "role": {
    "id": "example",
    "name": "example",
    "description": "example",
    "builtin": false,
    "permissions": [
      "example"
    ],
    "memberCount": 1
  }
}
```

Stati di errore: `400`, `401`, `403`, `404`, `429`.

### DELETE /team/roles/{id}

Eliminare un ruolo personalizzato

409 `role_in_use` while members or invitations hold it. Owner only.

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `id` | path | string | sì |  |

**Richiesta di esempio (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/team/roles/team_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.team.delete_role("team_example")
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "ok": false
}
```

Stati di errore: `401`, `403`, `404`, `409`, `429`.

### POST /team/invitations/{id}/resend

Reinviare un invito

A fresh link valid for 7 days; the old link stops working.

**Scope richiesto:** `full` · **Permesso:** `team.manage`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `id` | path | string | sì |  |

**Richiesta di esempio (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/team/invitations/team_example/resend" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.team.resend_invitation("team_example")
```

**Strumento da riga di comando:** `apidly team` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "id": "example",
  "expiresAt": "2026-11-21T10:00:00.000Z",
  "mailSent": false
}
```

Stati di errore: `401`, `403`, `404`, `429`.

### GET /notifications

Notifiche in app del membro per conto del quale agisce la chiave

Newest first, with the unread count.

**Scope richiesto:** `read`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  |

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/notifications?limit=20" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.notifications.inbox({ limit: 20 });
```

**Python (SDK)**

```python
client.notifications.inbox()
```

**Strumento da riga di comando:** `apidly notifications` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "items": [
    {
      "id": "example",
      "category": "example",
      "title": "example",
      "path": "example",
      "readAt": "2026-11-21T10:00:00.000Z",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "unread": 1
}
```

Stati di errore: `400`, `401`, `403`, `429`.

### POST /notifications/read

Segnare come lette tutte le notifiche in app

**Scope richiesto:** `servers`

**Richiesta di esempio (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/notifications/read" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.notifications.markRead();
```

**Python (SDK)**

```python
client.notifications.mark_read()
```

**Strumento da riga di comando:** `apidly notifications` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "ok": false
}
```

Stati di errore: `401`, `403`, `429`.

### PATCH /organization

Rinominare l'organizzazione o cambiarne l'e-mail di fatturazione o il paese

Send only the fields to change. `country` is a two-letter code; `billingEmail` and `country` take null to clear.

**Scope richiesto:** `full` · **Permesso:** `settings.manage`

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `name` | string | no |  |
| `billingEmail` | string o null | no |  |
| `country` | string o null | no |  |

**Richiesta di esempio (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/organization" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","billingEmail":"dev@example.com","country":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.organization.update({
  name: "example",
  billingEmail: "dev@example.com",
  country: "example"
});
```

**Python (SDK)**

```python
client.organization.update()
```

**Strumento da riga di comando:** `apidly org` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "organization": {
    "id": "example",
    "name": "example",
    "billingEmail": "dev@example.com",
    "country": "example"
  }
}
```

Stati di errore: `400`, `401`, `403`, `429`.

### GET /organization/defaults

Impostazioni predefinite di avvio dell’organizzazione

What every launch starts with when the request leaves it out: `sshKeyIds` (installed by `POST /servers` without `sshKeyIds`, preselected in the console), `autoStopHours` (when 1 or more, added by `POST /servers` without `automation`, and prefilled in the console; `0` and `null` add no automatic stop to an API launch. The 2-hour stop on an account's first server is a console form default only: while this is null, Quick start and the deploy wizard switch it on in the form and set it on the new server after the launch; `POST /servers` itself never adds it) and `region` (a soft preference: Quick start and `GET /quickstart` suggest a plan offered there when one fits; it never limits where a server runs). Any key may read them.

**Scope richiesto:** `read`

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/organization/defaults" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.organization.defaults();
```

**Python (SDK)**

```python
client.organization.defaults()
```

**Strumento da riga di comando:** `apidly org` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "defaults": {
    "sshKeyIds": [
      "example"
    ],
    "autoStopHours": 1,
    "region": "na"
  }
}
```

Stati di errore: `401`, `403`, `429`.

### PATCH /organization/defaults

Modifica le impostazioni predefinite di avvio

Send only the fields to change; `null` resets one to not chosen. 400 `invalid_ssh_key` for a key that is not in this organization.

**Scope richiesto:** `full` · **Permesso:** `settings.manage`

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `sshKeyIds` | array di string o null | no | SSH keys preselected on every launch (ids from `GET /ssh-keys`), used by `POST /servers` when the request has no `sshKeyIds`. `[]` = none; `null` = not chosen. |
| `autoStopHours` | integer o null | no | Automatic stop for new servers after this many hours of running (1 to 720), applied when a launch sends no `automation`. `0` = no automatic stop; `null` = not chosen: an API launch then gets no automatic stop (the console's Quick start and deploy wizard still switch on a 2-hour stop in the form for an account's first server and set it after the launch). |
| `region` | `na` \| `eu` \| `ap` \| `other` o null | no | Preferred region (`na`, `eu`, `ap`, `other`). Soft: only orders plan suggestions, never limits where a server runs. `null` = no preference. |

**Richiesta di esempio (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/organization/defaults" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sshKeyIds":["example"],"autoStopHours":0,"region":"na"}'
```

**JavaScript (SDK)**

```js
await apidly.organization.setDefaults({
  sshKeyIds: [
    "example"
  ],
  autoStopHours: 0,
  region: "na"
});
```

**Python (SDK)**

```python
client.organization.set_defaults()
```

**Strumento da riga di comando:** `apidly org` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "defaults": {
    "sshKeyIds": [
      "example"
    ],
    "autoStopHours": 1,
    "region": "na"
  }
}
```

Stati di errore: `400`, `401`, `403`, `429`.

### GET /me/profile

Il profilo del membro della chiave

Display name, language and time zone of the member who created the key. The e-mail address, password, two-factor and passkeys are never readable or changeable with an API key: change them in the console, signed in. Notification switches: `GET /notification-preferences`.

**Scope richiesto:** `full`

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/me/profile" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.profile.get();
```

**Python (SDK)**

```python
client.profile.get()
```

**Strumento da riga di comando:** `apidly profile` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "profile": {
    "name": "example",
    "locale": "example",
    "timeZone": "example"
  }
}
```

Stati di errore: `401`, `403`, `429`.

### PATCH /me/profile

Modifica nome visualizzato, lingua o fuso orario

Send only the fields to change. `locale` is one of the site's languages; `timeZone` an IANA name such as `Europe/Berlin` (null = UTC). Nothing else of the account can change through an API key.

**Scope richiesto:** `full`

**Corpo della richiesta**

| Nome | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- |
| `name` | string | no | Display name, 1 to 80 characters. |
| `locale` | `en` \| `nl` \| `it` \| `es` \| `id` \| `fr` \| `pt-BR` \| `ru` \| `uk` \| `nb` \| `ro` \| `fi` \| `sv` \| `da` \| `cs` \| `hu` \| `tr` \| `ar` \| `vi` \| `th` \| `ko` \| `ja` \| `pl` \| `el` \| `de` | no | Language of mail sent without a request (for example `de`, `pt-BR`). |
| `timeZone` | string o null | no | IANA time zone (for example `Europe/Berlin`) for dates in mail; `null` = UTC. The console shows times in the browser's zone. |

**Richiesta di esempio (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/me/profile" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","locale":"en","timeZone":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.profile.update({
  name: "example",
  locale: "en",
  timeZone: "example"
});
```

**Python (SDK)**

```python
client.profile.update()
```

**Strumento da riga di comando:** `apidly profile` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "profile": {
    "name": "example",
    "locale": "example",
    "timeZone": "example"
  }
}
```

Stati di errore: `400`, `401`, `403`, `429`.

### GET /activity/export

Il registro delle attività come file CSV

Returns `text/csv` with the same filters as `GET /activity` (`limit` is ignored), at most 5,000 rows. Ten exports an hour per key and twenty an hour per organization, across all its keys.

**Scope richiesto:** `read` · **Permesso:** `activity.view`

**Parametri**

| Nome | In | Tipo | Obbligatorio | Descrizione |
| --- | --- | --- | --- | --- |
| `actor` | query | string | no |  |
| `category` | query | `signIn` \| `team` \| `keys` \| `servers` \| `billing` \| `settings` | no |  |
| `from` | query | string | no |  |
| `to` | query | string | no |  |

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/activity/export" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.activity.export();
```

**Python (SDK)**

```python
client.activity.export()
```

**Strumento da riga di comando:** `apidly export` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

`text/csv`

Stati di errore: `400`, `401`, `403`, `429`.

## Descrizione dell'API

### GET /openapi.json

Questo documento

Public: no API key needed.

**Scope richiesto:** `read`

**Richiesta di esempio (curl)**

```bash
curl "https://apidly.com/api/v1/openapi.json" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.openapi()
```

**Strumento da riga di comando:** `apidly openapi` ([Riferimento CLI](/docs/cli))

**Risposta di esempio** (200)

```json
{
  "key": null
}
```

Stati di errore: `401`, `403`, `429`.
