# API başvurusu: Şablonlar

Şablonlar: API v1'in tüm işlemleri; gerekli scope, parametreler, curl, JavaScript ve Python örnekleri ve yanıtlarla. Kimlik doğrulama, hatalar, sayfalama, sınırlar ve idempotentlik [API başvurusuna genel bakış](/docs/api-reference) sayfasındadır; ayrıca [SDK'lara](/docs/sdks) ve [komut satırına](/docs/cli) bakın.

> Anahtarınızla deneyin: konsolda bir API anahtarı oluşturun, terminalde `export APIDLY_API_KEY=...` komutunu çalıştırın ve aşağıdaki curl örneklerinden birini yapıştırın. Örnek değerler örnek amaçlıdır. Bu sayfada anahtar girilecek bir alan yoktur.

İşlem ve alan açıklamaları API tanımından gelir ve İngilizcedir.

| İşlem | Gereken scope | Özet |
| --- | --- | --- |
| `GET /templates` | `read` | Herkese açık şablonlar ve kuruluşunuzun şablonları |
| `POST /templates` | `full` | Kuruluş şablonu oluştur |
| `GET /templates/{id}` | `read` | Tek bir şablon |
| `PATCH /templates/{id}` | `full` | Kuruluşunuzun bir şablonunu güncelle |
| `DELETE /templates/{id}` | `full` | Bir şablonu sil veya sunucular hâlâ ona başvuruyorsa gizle |
| `POST /templates/{id}/share` | `full` | Kuruluşunuzun bir şablonu için paylaşım bağlantısı oluştur |
| `DELETE /templates/{id}/share` | `full` | Bir şablonun paylaşım bağlantılarını iptal et |
| `GET /templates/{id}/share` | `full` | Bir şablonun paylaşım bağlantıları |
| `POST /templates/{id}/duplicate` | `full` | Kuruluşunuzun bir şablonunu kopyala |
| `GET /templates/{id}/revisions` | `read` | Bir şablonun düzeltme geçmişi, en yeni önce |
| `POST /templates/{id}/revisions/{rev}/restore` | `full` | Eski bir düzeltmeyi yeni düzeltme olarak geri yükle |
| `GET /templates/{id}/export` | `full` | Bir şablonu taşınabilir dosyaya aktar |
| `POST /templates/import` | `full` | Dışa aktarılmış bir dosyadan şablon oluştur |
| `POST /template-shares/{token}/import` | `full` | Paylaşılan bir şablonu kuruluşunuza kopyala |
| `POST /template-shares/{token}/report` | `servers` | Paylaşılan bir şablonu ekibimize bildir (kuruluş başına saatte en fazla 10) |

### GET /templates

Herkese açık şablonlar ve kuruluşunuzun şablonları

Optional filters: `q` (up to 60 characters, case-insensitive, found in the name, slug, summary, image or category), `category`, `source` (`builtin` for the public catalogue, `own` for your organization's templates) and `vramGb` (only templates whose `minVramGb` is at most this, so they run on a GPU with that much memory). Repeat the same filters on every page so the `cursor` stays valid.

**Gereken scope:** `read`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | hayır |  |
| `cursor` | query | string | hayır |  |
| `q` | query | string | hayır |  |
| `category` | query | `base` \| `llm` \| `image` \| `notebook` \| `training` \| `custom` | hayır |  |
| `source` | query | `builtin` \| `own` | hayır |  |
| `vramGb` | query | integer | hayır |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

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

**Python (SDK)**

```python
client.templates.list()
```

**Komut satırı aracı:** `apidly templates`, `apidly export`, `apidly plan`, `apidly apply` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

```json
{
  "templates": [
    {
      "id": "example",
      "slug": "example",
      "name": "example",
      "summary": "example",
      "category": "example",
      "image": "docker.io/library/ubuntu",
      "tag": "example",
      "launchMode": "ssh",
      "env": {
        "key": "example"
      },
      "ports": [
        {
          "port": null,
          "protocol": null,
          "label": null
        }
      ],
      "startScript": "example",
      "onStart": "example",
      "args": "example",
      "description": "example",
      "secretEnvKeys": [
        "example"
      ],
      "registryId": "id_example",
      "appPort": 1,
      "defaultDiskGb": 1,
      "minVramGb": 1,
      "recommendedVramGb": 1,
      "constraints": {
        "key": null
      },
      "latestCudaTag": false,
      "inference": {
        "api": "http",
        "healthPath": "example",
        "port": 1
      },
      "custom": false,
      "firstBootMinutes": 1,
      "revision": 1,
      "sort": 1,
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ],
  "nextCursor": "example"
}
```

Hata durumları: `401`, `403`, `429`.

### POST /templates

Kuruluş şablonu oluştur

**Gereken scope:** `full` · **Oluşturanın rolü:** `admin` · **Şununla güvenle tekrarlanabilir:** `Idempotency-Key`

**İstek gövdesi**

| Ad | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- |
| `name` | string | evet |  |
| `summary` | string | hayır |  |
| `description` | string | hayır |  |
| `image` | string | evet |  |
| `tag` | string | hayır |  |
| `launchMode` | `ssh` \| `jupyter` \| `app` | evet |  |
| `env` | object | hayır |  |
| `secretEnv` | object | hayır |  |
| `ports` | object dizisi | hayır |  |
| `startScript` | string | hayır | Shell script run on the server after each start (up to 64 KB). Replaces the deprecated `onStart`. |
| `onStart` | string | hayır | Deprecated name of `startScript`, read until 2027-05-31. Send `startScript`. |
| `args` | string | hayır |  |
| `appPort` | integer veya null | hayır |  |
| `defaultDiskGb` | integer | hayır |  |
| `minVramGb` | integer | hayır |  |
| `constraints` | object | hayır |  |
| `recommendedVramGb` | integer veya null | hayır |  |
| `inference` | object veya null | hayır |  |
| `registryId` | string veya null | hayır |  |
| `latestCudaTag` | boolean | hayır |  |
| `inheritSecretsFrom` | string | hayır |  |

**Örnek istek (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/templates" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"example","image":"docker.io/library/ubuntu","launchMode":"ssh"}'
```

**JavaScript (SDK)**

```js
await apidly.templates.create({
  name: "example",
  image: "docker.io/library/ubuntu",
  launchMode: "ssh"
});
```

**Python (SDK)**

```python
client.templates.create(body={
    "name": "example",
    "image": "docker.io/library/ubuntu",
    "launchMode": "ssh",
})
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (201)

```json
{
  "template": {
    "id": "example",
    "slug": "example",
    "name": "example",
    "summary": "example",
    "category": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "description": "example",
    "secretEnvKeys": [
      "example"
    ],
    "registryId": "id_example",
    "appPort": 1,
    "defaultDiskGb": 1,
    "minVramGb": 1,
    "recommendedVramGb": 1,
    "constraints": {
      "key": null
    },
    "latestCudaTag": false,
    "inference": {
      "api": "http",
      "healthPath": "example",
      "port": 1
    },
    "custom": false,
    "firstBootMinutes": 1,
    "revision": 1,
    "sort": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Hata durumları: `400`, `401`, `403`, `409`, `429`.

### GET /templates/{id}

Tek bir şablon

`id` is a template id or the slug the catalogue lists (`pytorch`). Built-in templates are shown read-only (`custom: false`).

**Gereken scope:** `read`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.get("tpl_example");
```

**Python (SDK)**

```python
client.templates.get("tpl_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

```json
{
  "template": {
    "id": "example",
    "slug": "example",
    "name": "example",
    "summary": "example",
    "category": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "description": "example",
    "secretEnvKeys": [
      "example"
    ],
    "registryId": "id_example",
    "appPort": 1,
    "defaultDiskGb": 1,
    "minVramGb": 1,
    "recommendedVramGb": 1,
    "constraints": {
      "key": null
    },
    "latestCudaTag": false,
    "inference": {
      "api": "http",
      "healthPath": "example",
      "port": 1
    },
    "custom": false,
    "firstBootMinutes": 1,
    "revision": 1,
    "sort": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Hata durumları: `401`, `403`, `404`, `429`.

### PATCH /templates/{id}

Kuruluşunuzun bir şablonunu güncelle

**Gereken scope:** `full` · **Oluşturanın rolü:** `admin`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**İstek gövdesi**

| Ad | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- |
| `name` | string | hayır |  |
| `summary` | string | hayır |  |
| `description` | string | hayır |  |
| `image` | string | hayır |  |
| `tag` | string | hayır |  |
| `launchMode` | `ssh` \| `jupyter` \| `app` | hayır |  |
| `env` | object | hayır |  |
| `secretEnv` | object | hayır |  |
| `ports` | object dizisi | hayır |  |
| `startScript` | string | hayır | Shell script run on the server after each start (up to 64 KB). Replaces the deprecated `onStart`. |
| `onStart` | string | hayır | Deprecated name of `startScript`, read until 2027-05-31. Send `startScript`. |
| `args` | string | hayır |  |
| `appPort` | integer veya null | hayır |  |
| `defaultDiskGb` | integer | hayır |  |
| `minVramGb` | integer | hayır |  |
| `constraints` | object | hayır |  |
| `recommendedVramGb` | integer veya null | hayır |  |
| `inference` | object veya null | hayır |  |
| `registryId` | string veya null | hayır |  |
| `latestCudaTag` | boolean | hayır |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.update("tpl_example", {
  name: "example",
  summary: "example",
  description: "example"
});
```

**Python (SDK)**

```python
client.templates.update("tpl_example", body={
    "name": "example",
    "summary": "example",
    "description": "example",
})
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

```json
{
  "template": {
    "id": "example",
    "slug": "example",
    "name": "example",
    "summary": "example",
    "category": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "description": "example",
    "secretEnvKeys": [
      "example"
    ],
    "registryId": "id_example",
    "appPort": 1,
    "defaultDiskGb": 1,
    "minVramGb": 1,
    "recommendedVramGb": 1,
    "constraints": {
      "key": null
    },
    "latestCudaTag": false,
    "inference": {
      "api": "http",
      "healthPath": "example",
      "port": 1
    },
    "custom": false,
    "firstBootMinutes": 1,
    "revision": 1,
    "sort": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Hata durumları: `400`, `401`, `403`, `404`, `429`.

### DELETE /templates/{id}

Bir şablonu sil veya sunucular hâlâ ona başvuruyorsa gizle

**Gereken scope:** `full` · **Oluşturanın rolü:** `admin`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.delete("tpl_example");
```

**Python (SDK)**

```python
client.templates.delete("tpl_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

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

Hata durumları: `401`, `403`, `404`, `429`.

### POST /templates/{id}/share

Kuruluşunuzun bir şablonu için paylaşım bağlantısı oluştur

Anyone with the link sees the template's name, description, image, ports, minimum GPU memory and the NAMES of its plain environment variables, and can copy it into their own organization. Secret values, registry logins and (unless `includeStartScript` is true) the start script are never shared.

**Gereken scope:** `full` · **İzin:** `templates.manage`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**İstek gövdesi**

| Ad | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- |
| `displayName` | string veya null | hayır |  |
| `includeStartScript` | boolean | hayır |  |
| `expiresInDays` | integer veya null | hayır |  |

**Örnek istek (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/templates/tpl_example/share" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"displayName":"example","includeStartScript":false,"expiresInDays":null}'
```

**JavaScript (SDK)**

```js
await apidly.templates.share("tpl_example");
```

**Python (SDK)**

```python
client.templates.share("tpl_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (201)

```json
{
  "share": {
    "id": "example",
    "templateId": "id_example",
    "token": "example",
    "displayName": "example",
    "includeStartScript": false,
    "expiresAt": "2026-11-21T10:00:00.000Z",
    "status": "active",
    "viewCount": 1,
    "importCount": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Hata durumları: `400`, `401`, `403`, `404`, `409`, `429`.

### DELETE /templates/{id}/share

Bir şablonun paylaşım bağlantılarını iptal et

Revokes one link with `?shareId=`, or every active link of the template when omitted.

**Gereken scope:** `full` · **İzin:** `templates.manage`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.unshare("tpl_example");
```

**Python (SDK)**

```python
client.templates.unshare("tpl_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

```json
{
  "revoked": 1
}
```

Hata durumları: `401`, `403`, `404`, `429`.

### GET /templates/{id}/share

Bir şablonun paylaşım bağlantıları

**Gereken scope:** `full` · **İzin:** `templates.manage`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.listShares("tpl_example");
```

**Python (SDK)**

```python
client.templates.list_shares("tpl_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

```json
{
  "shares": [
    {
      "id": "example",
      "templateId": "id_example",
      "token": "example",
      "displayName": "example",
      "includeStartScript": false,
      "expiresAt": "2026-11-21T10:00:00.000Z",
      "status": "active",
      "viewCount": 1,
      "importCount": 1,
      "createdAt": "2026-11-21T10:00:00.000Z"
    }
  ]
}
```

Hata durumları: `401`, `403`, `404`, `429`.

### POST /templates/{id}/duplicate

Kuruluşunuzun bir şablonunu kopyala

**Gereken scope:** `full` · **İzin:** `templates.manage`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.duplicate("tpl_example");
```

**Python (SDK)**

```python
client.templates.duplicate("tpl_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (201)

```json
{
  "template": {
    "id": "example",
    "slug": "example",
    "name": "example",
    "summary": "example",
    "category": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "description": "example",
    "secretEnvKeys": [
      "example"
    ],
    "registryId": "id_example",
    "appPort": 1,
    "defaultDiskGb": 1,
    "minVramGb": 1,
    "recommendedVramGb": 1,
    "constraints": {
      "key": null
    },
    "latestCudaTag": false,
    "inference": {
      "api": "http",
      "healthPath": "example",
      "port": 1
    },
    "custom": false,
    "firstBootMinutes": 1,
    "revision": 1,
    "sort": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Hata durumları: `401`, `403`, `404`, `409`, `429`.

### GET /templates/{id}/revisions

Bir şablonun düzeltme geçmişi, en yeni önce

Secret values are never included.

**Gereken scope:** `read`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.listRevisions("tpl_example");
```

**Python (SDK)**

```python
client.templates.list_revisions("tpl_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

```json
{
  "revisions": [
    {
      "rev": 1,
      "kind": "example",
      "restoredFrom": 1,
      "createdAt": "2026-11-21T10:00:00.000Z",
      "createdByName": "example",
      "current": false,
      "servers": 1,
      "snapshot": {
        "key": null
      }
    }
  ]
}
```

Hata durumları: `401`, `403`, `404`, `429`.

### POST /templates/{id}/revisions/{rev}/restore

Eski bir düzeltmeyi yeni düzeltme olarak geri yükle

History is never rewritten: the restored copy becomes the newest revision.

**Gereken scope:** `full` · **İzin:** `templates.manage`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |
| `rev` | path | string | evet |  |

**Örnek istek (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/templates/tpl_example/revisions/1/restore" \
  -H "Authorization: Bearer $APIDLY_API_KEY"
```

**JavaScript (SDK)**

```js
await apidly.templates.restoreRevision("tpl_example", "1");
```

**Python (SDK)**

```python
client.templates.restore_revision("tpl_example", "1")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

```json
{
  "template": {
    "id": "example",
    "slug": "example",
    "name": "example",
    "summary": "example",
    "category": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "description": "example",
    "secretEnvKeys": [
      "example"
    ],
    "registryId": "id_example",
    "appPort": 1,
    "defaultDiskGb": 1,
    "minVramGb": 1,
    "recommendedVramGb": 1,
    "constraints": {
      "key": null
    },
    "latestCudaTag": false,
    "inference": {
      "api": "http",
      "healthPath": "example",
      "port": 1
    },
    "custom": false,
    "firstBootMinutes": 1,
    "revision": 1,
    "sort": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  },
  "revision": 1
}
```

Hata durumları: `401`, `403`, `404`, `429`.

### GET /templates/{id}/export

Bir şablonu taşınabilir dosyaya aktar

The file the console downloads. Secret variables appear as names in `secretEnvNames`, never with values; the registry login is never included. Send its text to `POST /templates/import` to copy it into an organization. Only your organization's own templates can be exported: a built-in template answers 409 `invalid_state` (read it with `GET /templates/{id}`).

**Gereken scope:** `full` · **İzin:** `templates.manage`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `id` | path | string | evet |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.export("tpl_example");
```

**Python (SDK)**

```python
client.templates.export("tpl_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (200)

```json
{
  "format": "apidly-template",
  "version": 1,
  "template": {
    "name": "example",
    "summary": "example",
    "description": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "secretEnvNames": [
      "example"
    ],
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "appPort": 1,
    "inference": {
      "key": null
    },
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "defaultDiskGb": 1,
    "minVramGb": 1
  }
}
```

Hata durumları: `401`, `403`, `404`, `409`, `429`.

### POST /templates/import

Dışa aktarılmış bir dosyadan şablon oluştur

`json` is the text of a file from `GET /templates/{id}/export` (or the console's Export). Secret variables arrive blank and the registry unset. 400 `invalid_file` when it is not such a file.

**Gereken scope:** `full` · **İzin:** `templates.manage` · **Şununla güvenle tekrarlanabilir:** `Idempotency-Key`

**İstek gövdesi**

| Ad | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- |
| `json` | string | evet |  |

**Örnek istek (curl)**

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

**JavaScript (SDK)**

```js
await apidly.templates.import("example");
```

**Python (SDK)**

```python
client.templates.import_file(file="example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (201)

```json
{
  "template": {
    "id": "example",
    "slug": "example",
    "name": "example",
    "summary": "example",
    "category": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "description": "example",
    "secretEnvKeys": [
      "example"
    ],
    "registryId": "id_example",
    "appPort": 1,
    "defaultDiskGb": 1,
    "minVramGb": 1,
    "recommendedVramGb": 1,
    "constraints": {
      "key": null
    },
    "latestCudaTag": false,
    "inference": {
      "api": "http",
      "healthPath": "example",
      "port": 1
    },
    "custom": false,
    "firstBootMinutes": 1,
    "revision": 1,
    "sort": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Hata durumları: `400`, `401`, `403`, `409`, `429`.

### POST /template-shares/{token}/import

Paylaşılan bir şablonu kuruluşunuza kopyala

`token` is the 32-character token of a share link (`/t/{token}`). 404 when the link is revoked, expired or unknown.

**Gereken scope:** `full` · **İzin:** `templates.manage` · **Şununla güvenle tekrarlanabilir:** `Idempotency-Key`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `token` | path | string | evet |  |

**Örnek istek (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/template-shares/templateshare_example/import" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

**JavaScript (SDK)**

```js
await apidly.templates.importShared("templateshare_example");
```

**Python (SDK)**

```python
client.templates.import_shared("templateshare_example")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (201)

```json
{
  "template": {
    "id": "example",
    "slug": "example",
    "name": "example",
    "summary": "example",
    "category": "example",
    "image": "docker.io/library/ubuntu",
    "tag": "example",
    "launchMode": "ssh",
    "env": {
      "key": "example"
    },
    "ports": [
      {
        "port": 1,
        "protocol": "tcp",
        "label": "example"
      }
    ],
    "startScript": "example",
    "onStart": "example",
    "args": "example",
    "description": "example",
    "secretEnvKeys": [
      "example"
    ],
    "registryId": "id_example",
    "appPort": 1,
    "defaultDiskGb": 1,
    "minVramGb": 1,
    "recommendedVramGb": 1,
    "constraints": {
      "key": null
    },
    "latestCudaTag": false,
    "inference": {
      "api": "http",
      "healthPath": "example",
      "port": 1
    },
    "custom": false,
    "firstBootMinutes": 1,
    "revision": 1,
    "sort": 1,
    "createdAt": "2026-11-21T10:00:00.000Z"
  }
}
```

Hata durumları: `401`, `403`, `404`, `409`, `429`.

### POST /template-shares/{token}/report

Paylaşılan bir şablonu ekibimize bildir (kuruluş başına saatte en fazla 10)

Opens a support ticket for staff with the reason (`malware`, `illegal`, `secrets`, `other`) and your details. Five reports an hour per key and ten an hour per organization, across all its keys.

**Gereken scope:** `servers` · **Şununla güvenle tekrarlanabilir:** `Idempotency-Key`

**Parametreler**

| Ad | Yeri | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- | --- |
| `token` | path | string | evet |  |

**İstek gövdesi**

| Ad | Tür | Zorunlu | Açıklama |
| --- | --- | --- | --- |
| `details` | string | hayır |  |
| `reason` | `malware` \| `illegal` \| `secrets` \| `other` | evet |  |

**Örnek istek (curl)**

```bash
curl -X POST "https://apidly.com/api/v1/template-shares/templateshare_example/report" \
  -H "Authorization: Bearer $APIDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason":"malware"}'
```

**JavaScript (SDK)**

```js
await apidly.templates.reportShared("templateshare_example", {
  reason: "malware"
});
```

**Python (SDK)**

```python
client.templates.report_shared("templateshare_example", reason="malware")
```

**Komut satırı aracı:** `apidly templates` ([CLI başvurusu](/docs/cli))

**Örnek yanıt** (201)

```json
{
  "ticketId": "id_example"
}
```

Hata durumları: `400`, `401`, `403`, `404`, `429`.
