> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/feature-management-experimentation/split-api-reference/api-keys.md).

# API Keys

## Create an API key

> Create and add an API key to your account.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"API Keys"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/apiKeys":{"post":{"summary":"Create an API key","description":"Create and add an API key to your account.","operationId":"create-an-api-key","parameters":[{"name":"Authorization","in":"header","description":"The Admin API key authorizing the request","schema":{"type":"string","default":"Bearer ADMIN_API_KEY"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"api-key":{"type":"string","description":"Request payload","format":"json"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"organization":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}}},"name":{"type":"string"},"createdBy":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}}},"createdAt":{"type":"integer","default":0},"environments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}}}},"roles":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"apiKeyType":{"type":"string"},"key":{"type":"string"}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"404":{"description":"404","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}},"409":{"description":"409","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","default":0},"message":{"type":"string"},"details":{"type":"string"},"transactionId":{"type":"string"}}}}}}},"deprecated":false,"tags":["API Keys"]}}}}
```

## Delete an API key

> Delete an API key from your account.

```json
{"openapi":"3.1.0","info":{"title":"Harness FME Admin API","version":"2"},"tags":[{"name":"API Keys"}],"servers":[{"url":"https://api.split.io/internal/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Admin API Key, sent as `Authorization: Bearer <ADMIN_API_KEY>`"}}},"paths":{"/apiKeys/{api-key-id}":{"delete":{"summary":"Delete an API key","description":"Delete an API key from your account.","operationId":"delete-an-api-key","parameters":[{"name":"Authorization","in":"header","description":"The Admin API Key authorizing the request","schema":{"type":"string","default":"Bearer ADMIN_API_KEY"}},{"in":"path","name":"api-key-id","schema":{"type":"string"},"required":true,"description":"The API key to be deleted"}],"responses":{"204":{"description":"204","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"403":{"description":"403","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"deprecated":false,"tags":["API Keys"]}}}}
```
