---
title: "Get API keys"
method: GET
path: "/api/{projectId}/apikeys"
tags: ["Projects"]
---

# Get API keys

`GET /api/{projectId}/apikeys`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/{projectId}/apikeys`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in cookie `jwt`
  - API key in header `x-jwt-token`
  - OAuth 2
    - Authorization code: `/v1/oauth/authorize`
    - Client credentials
    - Implicit: `/v1/oauth/authorize`
    - Password
    - Token URL: `/v1/oauth/token`
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api/:projectId/apikeys/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve all API keys. This does **not** return the full API key, but only a portion (for security purposes). The development key will be returned in full, as it'll be set in devices and is thus not private. This API returns an empty array when not authenticating with JWT token authentication.

## Path parameters

- `projectId` integer, required

## Response `200`

OK

- ListApiKeysResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `apiKeys` ProjectApiKey[], required: List of API keys.
    - `id` integer, required
    - `apiKey` string, required
    - `isDevelopmentKey` boolean, required
    - `name` string, required
    - `created` string, date-time, required
    - `role` 'admin' | 'readonly' | 'ingestiononly' | 'ingestion_deployment' | 'wladmin', required
    - `createdByUser` CreatedUpdatedByUser
      - `id` integer, required
      - `name` string, required
      - `username` string, required
      - `photo` string
    - `lastUsed` object: When this API key was last used.
      - `date` string, date-time, required
      - `country` string: If available, the country from which the API key was last used.
      - `ipAddress` string: If available, the IP address from which the API key was last used.
    - `expires` string, date-time: If the key has a ttl set, when the key will expire
    - `createdViaOAuthClientId` string: OAuth client_id that created this API key through an OAuth-scoped key endpoint.
    - `createdForExtension` ApiKeyExtension
      - `projectExtensionId` integer, required
      - `name` string, required

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
