> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.6mm.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.6mm.com/_mcp/server.

# API Key Yönetimi

> Uygun izinler, IP kısıtlamalar, gizli depolama ve dönüşüm uygulamalarını uygularken 6MM API anahtarları oluşturun, inceleyin, güncelleyin ve geri alın.

API Key yönetim uç noktaları yalnızca JWT kimlik doğrulamasını kabul eder.

<h2 id="create-api-key">
  Yarat API Key
</h2>

```http
POST /v1/private/user/api-key/create
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
```

İstek parametreleri:

| Parametre     | Tip       | Gerekli | Tanım                                                                          |
| ------------- | --------- | ------- | ------------------------------------------------------------------------------ |
| `label`       | string    | Evet    | API Key etiketi, uzunluğu 1 - 64                                               |
| `permissions` | int       | Hayır   | İzin bitmaskesi, varsayılan `1`, aralık `1` - `7`                              |
| `ipWhitelist` | String\[] | Hayır   | IP beyaz liste, 20'ye kadar giriş. Eğer hariç tutulursa, kaynak IP sınırsızdır |

Örnek istemek:

```bash
curl -X POST https://api.6mm.com/v1/private/user/api-key/create \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "label": "external-service-prod",
    "permissions": 3,
    "ipWhitelist": ["203.0.113.10"]
  }'
```

Yanıt örneği:

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "apiKey": "fx_xxxxxxxxxxxxxxxxxxxxxxxx",
    "apiSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "requestId": "req-api-key"
}
```

`apiSecret` API Key oluşturulduğunda sadece bir kez geri döner. Hemen gizli bir yönetim sisteminde depolayın. Bunu kaynak kod depolarına veya loglara yazmayın.

Her kullanıcı 30 API Anahtar oluşturabilir.

<h2 id="list-api-keys">
  Liste API Anahtarlar
</h2>

```http
GET /v1/private/user/api-key/list
Authorization: Bearer YOUR_ACCESS_TOKEN
```

Yanıt alanları:

| Saha                 | Tip       | Tanım                                      |
| -------------------- | --------- | ------------------------------------------ |
| `list[].id`          | string    | API Key Kimliği                            |
| `list[].label`       | string    | Plak Şirketi                               |
| `list[].apiKey`      | string    | Kamu API Key tanımlayıcısı                 |
| `list[].permissions` | int       | Permission bitmask                         |
| `list[].ipWhitelist` | String\[] | IP beyaz listesi                           |
| `list[].status`      | int       | Durum: `1` etkin, `0` devre dışı bırakıldı |
| `list[].lastUsedAt`  | int64     | Son kullanım zamanı                        |
| `list[].createdAt`   | int64     | Yaratım zamanı                             |

<h2 id="update-api-key">
  Güncelleme API Key
</h2>

```http
PUT /v1/private/user/api-key/update
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
```

İstek parametreleri:

| Parametre     | Tip       | Gerekli | Tanım                                         |
| ------------- | --------- | ------- | --------------------------------------------- |
| `id`          | string    | Evet    | API Key Kimliği                               |
| `label`       | string    | Hayır   | Yeni plak şirketi                             |
| `permissions` | int       | Hayır   | Yeni izin bitmaskesi                          |
| `ipWhitelist` | String\[] | Hayır   | Yeni IP beyaz listesi                         |
| `status`      | int       | Hayır   | `1` etkinleştirildi, `0` devre dışı bırakıldı |

<h2 id="delete-api-key">
  Sil API Key
</h2>

```http
POST /v1/private/user/api-key/delete
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
```

Talep bedeni:

```json
{ "id": "1001" }
```

<h2 id="delete-all-api-keys">
  Tüm API Anahtarlarını Sil
</h2>

```http
POST /v1/private/user/api-key/delete-all
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
```

Yanıt alanları:

| Saha      | Tip   | Tanım                      |
| --------- | ----- | -------------------------- |
| `deleted` | int64 | Silinen API Anahtar Sayısı |

<h2 id="related-security-guides">
  İlgili güvenlik rehberleri
</h2>

* [Doğrulama](/tr/developer-api/authentication)
* [İstek İmzaları](/tr/developer-api/request-signing)
* [Sırlar ve İmza Alma](/tr/sdk/security/secrets-signing)
* [Entegrasyon Önerileri](/tr/developer-api/integration-recommendations)