# Αναφορά API: Κλειδιά, μυστικά και μητρώα

Κλειδιά, μυστικά και μητρώα: όλες οι λειτουργίες του API v1 με το απαιτούμενο scope, τις παραμέτρους, παραδείγματα σε curl, JavaScript και Python και τις απαντήσεις. Η ταυτοποίηση, τα σφάλματα, η σελιδοποίηση, τα όρια και η αυτοδυναμία περιγράφονται στην [επισκόπηση της αναφοράς API](/docs/api-reference)· δείτε και τα [SDK](/docs/sdks) και τη [γραμμή εντολών](/docs/cli).

> Δοκιμάστε το με το κλειδί σας: δημιουργήστε ένα κλειδί API στην κονσόλα, εκτελέστε `export APIDLY_API_KEY=...` στο τερματικό και επικολλήστε οποιοδήποτε παράδειγμα curl παρακάτω. Οι τιμές των παραδειγμάτων είναι ενδεικτικές. Σε αυτή τη σελίδα δεν υπάρχει πεδίο για εισαγωγή κλειδιού.

Οι περιγραφές των λειτουργιών και των πεδίων προέρχονται από τον ορισμό του API και είναι στα αγγλικά.

| Λειτουργία | Απαιτούμενο scope | Περίληψη |
| --- | --- | --- |
| `GET /ssh-keys` | `read` | Δημόσια κλειδιά SSH του οργανισμού |
| `POST /ssh-keys` | `full` | Προσθήκη δημόσιου κλειδιού SSH |
| `GET /ssh-keys/{id}` | `read` | Ένα δημόσιο κλειδί SSH |
| `PATCH /ssh-keys/{id}` | `full` | Μετονομασία δημόσιου κλειδιού SSH |
| `DELETE /ssh-keys/{id}` | `full` | Αφαίρεση δημόσιου κλειδιού SSH |
| `GET /secrets` | `servers` | Ονόματα μυστικών του οργανισμού (ποτέ οι τιμές) |
| `PUT /secrets` | `full` | Δημιουργία μυστικού ή εναλλαγή της τιμής του |
| `DELETE /secrets` | `full` | Διαγραφή μυστικού (`?name=NAME`) |
| `GET /variable-sets` | `servers` | Saved variable sets (names only, never values) |
| `POST /variable-sets` | `full` | Save a variable set |
| `GET /variable-sets/{id}` | `servers` | One variable set (by id or name; never values) |
| `PATCH /variable-sets/{id}` | `full` | Rename a variable set or change its variables |
| `DELETE /variable-sets/{id}` | `full` | Delete a variable set |
| `GET /api-keys` | `full` | Ενεργά κλειδιά API του οργανισμού (ποτέ τα μυστικά) |
| `POST /api-keys` | `full` | Δημιουργία κλειδιού API |
| `PUT /api-keys/{id}/spending-limit` | `full` | Ορισμός ή κατάργηση του μηνιαίου ορίου δαπανών ενός κλειδιού API |
| `DELETE /api-keys/{id}` | `full` | Ανάκληση κλειδιού API |
| `PATCH /api-keys/{id}` | `full` | Επεξεργασία κλειδιού API |
| `POST /api-keys/{id}/rotate` | `full` | Ανανέωση κλειδιού API (νέο μυστικό, ίδιες ρυθμίσεις) |
| `GET /registries` | `read` | Ιδιωτικά μητρώα εικόνων (ποτέ τα tokens) |
| `POST /registries` | `full` | Προσθήκη σύνδεσης σε μητρώο |
| `DELETE /registries/{id}` | `full` | Αφαίρεση σύνδεσης σε μητρώο |
| `PATCH /registries/{id}` | `full` | Εναλλαγή του ονόματος χρήστη ή του token μιας σύνδεσης σε μητρώο |
| `POST /registries/{id}/check` | `full` | Check a registry login (nothing is pulled) |

## Κλειδιά SSH

### GET /ssh-keys

Δημόσια κλειδιά SSH του οργανισμού

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | όχι |  |
| `cursor` | query | string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

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

**Python (SDK)**

```python
client.ssh_keys.list()
```

**Εργαλείο γραμμής εντολών:** `apidly init`, `apidly doctor`, `apidly ssh-keys`, `apidly export`, `apidly plan`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "keys": [
    {
      "id": "example",
      "name": "example",
      "fingerprint": "example",
      "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample you@example.com",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "nextCursor": "example"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `429`.

### POST /ssh-keys

Προσθήκη δημόσιου κλειδιού SSH

**Απαιτούμενο scope:** `full`

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | ναι |  |
| `publicKey` | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/ssh-keys" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","publicKey":"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample you@example.com"}'
```

**JavaScript (SDK)**

```js
await apidly.sshKeys.create({
  name: "example",
  publicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample you@example.com"
});
```

**Python (SDK)**

```python
client.ssh_keys.create(name="example", public_key="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample you@example.com")
```

**Εργαλείο γραμμής εντολών:** `apidly init`, `apidly ssh-keys`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "key": {
    "id": "example",
    "name": "example",
    "fingerprint": "example",
    "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample you@example.com",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `409`, `429`.

### GET /ssh-keys/{id}

Ένα δημόσιο κλειδί SSH

The same fields as an item of `GET /ssh-keys`. 404 `not_found` for an id that is not a key of your organization.

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.sshKeys.get("ssh_example");
```

**Python (SDK)**

```python
client.ssh_keys.get("ssh_example")
```

**Εργαλείο γραμμής εντολών:** `apidly ssh-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "key": {
    "id": "example",
    "name": "example",
    "fingerprint": "example",
    "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample you@example.com",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### PATCH /ssh-keys/{id}

Μετονομασία δημόσιου κλειδιού SSH

Only the name changes; servers that already carry the key are untouched. Members can rename only their own keys.

**Απαιτούμενο scope:** `full`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/ssh-keys/ssh_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.sshKeys.rename("ssh_example", "example");
```

**Python (SDK)**

```python
client.ssh_keys.rename("ssh_example", name="example")
```

**Εργαλείο γραμμής εντολών:** `apidly ssh-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "key": {
    "id": "example",
    "name": "example",
    "fingerprint": "example",
    "publicKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample you@example.com",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### DELETE /ssh-keys/{id}

Αφαίρεση δημόσιου κλειδιού SSH

**Απαιτούμενο scope:** `full`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/ssh-keys/ssh_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.sshKeys.delete("ssh_example");
```

**Python (SDK)**

```python
client.ssh_keys.delete("ssh_example")
```

**Εργαλείο γραμμής εντολών:** `apidly ssh-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

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

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

## Μυστικά

### GET /secrets

Ονόματα μυστικών του οργανισμού (ποτέ οι τιμές)

Reference a secret from a template or a server request as an environment value `secret:NAME`; it is resolved when the server starts. The key's creator needs `secrets.manage`, `servers.deploy` or `templates.manage` (the permissions that use secret names), and as none of them is within the `read` scope the key needs scope `servers` (a `read` key gets 403 `insufficient_scope`); a key whose creator holds none of them gets 403 `forbidden`.

**Απαιτούμενο scope:** `servers`

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.secrets.list();
```

**Python (SDK)**

```python
client.secrets.list()
```

**Εργαλείο γραμμής εντολών:** `apidly secrets`, `apidly plan`, `apidly apply` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "secrets": [
    {
      "name": "example",
      "last4": "example",
      "updatedAt": "2026-11-21T10:00:00.000Z"
    }
  ]
}
```

Καταστάσεις σφάλματος: `401`, `403`, `429`.

### PUT /secrets

Δημιουργία μυστικού ή εναλλαγή της τιμής του

The value is write-only. Names are capital letters, digits and underscores, starting with a letter (up to 64).

**Απαιτούμενο scope:** `full` · **Ρόλος δημιουργού:** `admin`

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | ναι |  |
| `value` | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X PUT "https://apidly.com/api/v1/secrets" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","value":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.secrets.set("example", "example");
```

**Python (SDK)**

```python
client.secrets.set(name="example", value="example")
```

**Εργαλείο γραμμής εντολών:** `apidly secrets` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "name": "example",
  "created": false
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `409`, `429`.

### DELETE /secrets

Διαγραφή μυστικού (`?name=NAME`)

Refused with 409 `secret_in_use` while a template or a server request still references it.

**Απαιτούμενο scope:** `full` · **Ρόλος δημιουργού:** `admin`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `name` | query | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/secrets?name=example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.secrets.delete("example");
```

**Python (SDK)**

```python
client.secrets.delete(name="example")
```

**Εργαλείο γραμμής εντολών:** `apidly secrets` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "deleted": false
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `409`, `429`.

### GET /variable-sets

Saved variable sets (names only, never values)

A variable set is a named set of environment variables (secret values included) that a server request attaches in one go with `variableSetIds`. Values are encrypted and never returned; this lists the names of the sets and of their variables. Same access as `GET /secrets`. 404 `feature_unavailable` while variable sets are off.

**Απαιτούμενο scope:** `servers`

**Παράδειγμα αιτήματος (curl)**

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

**Python (SDK)**

```python
client.variable_sets.list()
```

**Εργαλείο γραμμής εντολών:** `apidly variable-sets` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "variableSets": [
    {
      "id": "example",
      "name": "example",
      "variableNames": [
        "example"
      ],
      "createdAt": "2026-11-21T10:00:00.000Z",
      "updatedAt": "2026-11-21T10:00:00.000Z"
    }
  ]
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### POST /variable-sets

Save a variable set

`name`: 1 to 48 letters, digits, `.`, `_` or `-`. `variables`: 1 to 50 names and values (the same rules as server variables). Values are write-only. At most 50 sets per organization (409 `limit_reached`); a name in use answers 409 `name_taken`.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `secrets.manage`

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | ναι |  |
| `variables` | object | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/variable-sets" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","variables":{}}'
```

**Python (SDK)**

```python
client.variable_sets.create(name="example", variables={})
```

**Εργαλείο γραμμής εντολών:** `apidly variable-sets` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "variableSet": {
    "id": "example",
    "name": "example",
    "variableNames": [
      "example"
    ],
    "createdAt": "2026-11-21T10:00:00.000Z",
    "updatedAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### GET /variable-sets/{id}

One variable set (by id or name; never values)

**Απαιτούμενο scope:** `servers`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

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

**Python (SDK)**

```python
client.variable_sets.get("variableset_example")
```

**Εργαλείο γραμμής εντολών:** `apidly variable-sets` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "variableSet": {
    "id": "example",
    "name": "example",
    "variableNames": [
      "example"
    ],
    "createdAt": "2026-11-21T10:00:00.000Z",
    "updatedAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### PATCH /variable-sets/{id}

Rename a variable set or change its variables

`variables` are merged in: a value replaces the stored one, `null` removes the variable. A set keeps at least one variable. Requests already made keep the values they were given.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `secrets.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | όχι |  |
| `variables` | object | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/variable-sets/variableset_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","variables":{}}'
```

**Python (SDK)**

```python
client.variable_sets.update("variableset_example")
```

**Εργαλείο γραμμής εντολών:** `apidly variable-sets` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "variableSet": {
    "id": "example",
    "name": "example",
    "variableNames": [
      "example"
    ],
    "createdAt": "2026-11-21T10:00:00.000Z",
    "updatedAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### DELETE /variable-sets/{id}

Delete a variable set

Requests already made keep the values they were given.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `secrets.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X DELETE "https://apidly.com/api/v1/variable-sets/variableset_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**Python (SDK)**

```python
client.variable_sets.delete("variableset_example")
```

**Εργαλείο γραμμής εντολών:** `apidly variable-sets` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "deleted": false
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

## Κλειδιά API

### GET /api-keys

Ενεργά κλειδιά API του οργανισμού (ποτέ τα μυστικά)

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `api_keys.manage`

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.apiKeys.list();
```

**Python (SDK)**

```python
client.api_keys.list()
```

**Εργαλείο γραμμής εντολών:** `apidly api-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "keys": [
    {
      "id": "example",
      "name": "example",
      "prefix": "example",
      "scope": "read",
      "expiresAt": "2026-11-21T10:00:00.000Z",
      "allowedCidrs": [
        "example"
      ],
      "permissions": [
        "example"
      ],
      "endpointId": "id_example",
      "lastUsedAt": "2026-11-21T10:00:00.000Z",
      "lastUsedNetwork": "example",
      "callCount": 1,
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ]
}
```

Καταστάσεις σφάλματος: `401`, `403`, `429`.

### POST /api-keys

Δημιουργία κλειδιού API

Needs a `full` key. The new key acts as the same member and can never do more than that member may. `allowedCidrs` limits the addresses the key accepts calls from; a call from elsewhere answers 401. `endpointId` binds the key to one serverless endpoint of the organization: it can then only call that endpoint's proxy, OpenAI-style and jobs routes (404 for any other endpoint, 403 on every other route).

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `api_keys.manage`

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | ναι |  |
| `scope` | `read` \| `servers` \| `full` | όχι |  |
| `permissions` | πίνακας από `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` | όχι |  |
| `expiresAt` | string ή null | όχι |  |
| `endpointId` | string ή null | όχι |  |
| `monthlyLimitCents` | integer ή null | όχι |  |
| `allowedCidrs` | πίνακας από string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/api-keys" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.apiKeys.create({
  name: "example"
});
```

**Python (SDK)**

```python
client.api_keys.create(name="example")
```

**Εργαλείο γραμμής εντολών:** `apidly api-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "key": {
    "id": "example",
    "name": "example",
    "prefix": "example",
    "scope": "read",
    "expiresAt": "2026-11-21T10:00:00.000Z",
    "allowedCidrs": [
      "example"
    ],
    "permissions": [
      "example"
    ],
    "endpointId": "id_example",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "key": "example"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `409`, `429`.

### PUT /api-keys/{id}/spending-limit

Ορισμός ή κατάργηση του μηνιαίου ορίου δαπανών ενός κλειδιού API

`monthlyLimitCents` in US cents; `null` removes the limit. The key's month-to-date usage is the usage this UTC month of the servers and endpoints launched with it. At the limit, new launches and starts with that key answer 403 `key_limit_reached` until the limit is raised or the month ends; servers already running are not stopped. The owner gets one email per key per month. A key that has a limit of its own cannot change limits (403 `forbidden`).

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `api_keys.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `monthlyLimitCents` | integer ή null | ναι |  |

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.apiKeys.setSpendingLimit("apikey_example", 1);
```

**Python (SDK)**

```python
client.api_keys.set_spending_limit("apikey_example", monthly_limit_cents=1)
```

**Εργαλείο γραμμής εντολών:** `apidly api-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "key": {
    "id": "example",
    "monthlyLimitMicros": "1000000",
    "monthlyLimitUsd": "1.000000",
    "monthToDateMicros": "1000000",
    "monthToDateUsd": "1.000000"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### DELETE /api-keys/{id}

Ανάκληση κλειδιού API

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `api_keys.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.apiKeys.revoke("apikey_example");
```

**Python (SDK)**

```python
client.api_keys.revoke("apikey_example")
```

**Εργαλείο γραμμής εντολών:** `apidly api-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

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

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### PATCH /api-keys/{id}

Επεξεργασία κλειδιού API

Send at least one field. `name` changes freely. `scope`, `permissions` and `expiresAt` can only narrow: a lower scope, a subset of the key's own list (any list when it has none), an earlier end (any end when it has none); anything wider answers 403 `key_change_widens`. `allowedCidrs` replaces the IP allowlist (an empty list removes it); a list that lets the key be called from more addresses needs a calling key that can already do everything the edited key can, inside its own IP allowlist and expiry (403 `forbidden` otherwise). The secret, id and endpoint binding never change.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `api_keys.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `name` | string | όχι |  |
| `scope` | `read` \| `servers` \| `full` | όχι |  |
| `permissions` | πίνακας από `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` | όχι |  |
| `expiresAt` | string | όχι |  |
| `allowedCidrs` | πίνακας από string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.apiKeys.update("apikey_example", {
  name: "example",
  scope: "read",
  permissions: [
    "servers.view"
  ]
});
```

**Python (SDK)**

```python
client.api_keys.update("apikey_example")
```

**Εργαλείο γραμμής εντολών:** `apidly api-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "key": {
    "id": "example",
    "name": "example",
    "prefix": "example",
    "scope": "read",
    "expiresAt": "2026-11-21T10:00:00.000Z",
    "allowedCidrs": [
      "example"
    ],
    "permissions": [
      "example"
    ],
    "endpointId": "id_example",
    "lastUsedAt": "2026-11-21T10:00:00.000Z",
    "lastUsedNetwork": "example",
    "callCount": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `429`.

### POST /api-keys/{id}/rotate

Ανανέωση κλειδιού API (νέο μυστικό, ίδιες ρυθμίσεις)

Creates a new key with the same name, scope, permissions, IP allowlist, expiry, endpoint binding and creator, and returns its secret once. The new key has a new `id`. `graceMinutes` 0 (the default) revokes the old secret at once; 1 to 1440 keeps it working for that many minutes (never past its own expiry) so your programs can switch over, and both keys count against the key limit until then (409 `limit_reached`). Refused with 403 `forbidden` unless the calling key can already do everything the rotated key can, inside its own IP allowlist and expiry; 409 `invalid_state` for an expired key.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `api_keys.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `graceMinutes` | integer | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/api-keys/apikey_example/rotate" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"graceMinutes":0}'
```

**JavaScript (SDK)**

```js
await apidly.apiKeys.rotate("apikey_example");
```

**Python (SDK)**

```python
client.api_keys.rotate("apikey_example")
```

**Εργαλείο γραμμής εντολών:** `apidly api-keys` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "key": {
    "id": "example",
    "name": "example",
    "prefix": "example",
    "scope": "read",
    "expiresAt": "2026-11-21T10:00:00.000Z",
    "allowedCidrs": [
      "example"
    ],
    "permissions": [
      "example"
    ],
    "endpointId": "id_example",
    "createdAt": "2026-11-21T10:00:00.000Z",
    "key": "example"
  },
  "previous": {
    "id": "example",
    "prefix": "example",
    "endsAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

## Μητρώα

### GET /registries

Ιδιωτικά μητρώα εικόνων (ποτέ τα tokens)

**Απαιτούμενο scope:** `read`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | όχι |  |
| `cursor` | query | string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.registries.list();
```

**Python (SDK)**

```python
client.registries.list()
```

**Εργαλείο γραμμής εντολών:** `apidly registries` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "registries": [
    {
      "id": "example",
      "host": "example",
      "username": "example",
      "last4": "example",
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "nextCursor": "example"
}
```

Καταστάσεις σφάλματος: `401`, `403`, `429`.

### POST /registries

Προσθήκη σύνδεσης σε μητρώο

The token is write-only.

**Απαιτούμενο scope:** `full` · **Ρόλος δημιουργού:** `admin`

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `host` | string | ναι |  |
| `username` | string | ναι |  |
| `token` | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/registries" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"host":"example","username":"example","token":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.registries.create({
  host: "example",
  username: "example",
  token: "example"
});
```

**Python (SDK)**

```python
client.registries.create(host="example", username="example", token="example")
```

**Εργαλείο γραμμής εντολών:** `apidly registries` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (201)

```json
{
  "registry": {
    "id": "example",
    "host": "example",
    "username": "example",
    "last4": "example",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `409`, `429`.

### DELETE /registries/{id}

Αφαίρεση σύνδεσης σε μητρώο

**Απαιτούμενο scope:** `full` · **Ρόλος δημιουργού:** `admin`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.registries.delete("registrie_example");
```

**Python (SDK)**

```python
client.registries.delete("registrie_example")
```

**Εργαλείο γραμμής εντολών:** `apidly registries` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "deleted": false
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.

### PATCH /registries/{id}

Εναλλαγή του ονόματος χρήστη ή του token μιας σύνδεσης σε μητρώο

The host does not change; add a new login for another host.

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `templates.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Σώμα αιτήματος**

| Όνομα | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- |
| `username` | string | όχι |  |
| `token` | string | όχι |  |

**Παράδειγμα αιτήματος (curl)**

```bash
curl -X PATCH "https://apidly.com/api/v1/registries/registrie_example" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"example","token":"example"}'
```

**JavaScript (SDK)**

```js
await apidly.registries.update("registrie_example", {
  username: "example",
  token: "example"
});
```

**Python (SDK)**

```python
client.registries.update("registrie_example")
```

**Εργαλείο γραμμής εντολών:** `apidly registries` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "registry": {
    "id": "example",
    "host": "example",
    "username": "example",
    "last4": "example",
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Καταστάσεις σφάλματος: `400`, `401`, `403`, `404`, `409`, `429`.

### POST /registries/{id}/check

Check a registry login (nothing is pulled)

Runs the registry's own sign-in handshake against the registry host only (`GET /v2/`, then the login it asks for); no image is pulled and nothing is launched. `result`: `accepted`, `refused` (the registry said 401 or 403 to this username and token), or `unchecked` with `reason`: `auth_elsewhere` (the registry sends sign-in to another host, which is not contacted), `open` (the registry answers without a login), `no_registry_api` (no registry API at that host), `blocked_host` (the host resolves to a private or local address), `unreachable` (no answer within 5 seconds), `unexpected` (any other answer). At most 10 checks a minute per organization (429).

**Απαιτούμενο scope:** `full` · **Δικαίωμα:** `templates.manage`

**Παράμετροι**

| Όνομα | Σε | Τύπος | Υποχρεωτικό | Περιγραφή |
| --- | --- | --- | --- | --- |
| `id` | path | string | ναι |  |

**Παράδειγμα αιτήματος (curl)**

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

**JavaScript (SDK)**

```js
await apidly.registries.check("registrie_example");
```

**Python (SDK)**

```python
client.registries.check("registrie_example")
```

**Εργαλείο γραμμής εντολών:** `apidly registries` ([Αναφορά CLI](/docs/cli))

**Παράδειγμα απάντησης** (200)

```json
{
  "check": {
    "host": "example",
    "result": "accepted",
    "reason": "auth_elsewhere"
  }
}
```

Καταστάσεις σφάλματος: `401`, `403`, `404`, `429`.
