---
title: "Create an SDK key"
method: PUT
path: "/v1/projects/{projectIdOrName}/feature-flags/sdk-keys"
tags: ["feature-flags"]
---

# Create an SDK key

`PUT /v1/projects/{projectIdOrName}/feature-flags/sdk-keys`

Creates an SDK key.

## Path parameters

- `projectIdOrName` string, required — The project id or name

## Query parameters

- `teamId` string
- `slug` string

## Request body

- object
  - `sdkKeyType` 'server' | 'mobile' | 'client', required
  - `environment` string, required
  - `label` string

## Response `200`

- FlagsSdkKeyWithSecrets — Representation of a Flags SDK key returned by CREATE. Includes cleartext secrets (`keyValue`, `tokenValue`, `connectionString`) which are only ever disclosed once, on creation.
  - `hashKey` string, required
  - `projectId` string, required
  - `type` 'client' | 'mobile' | 'server', required
  - `environment` string, required
  - `createdBy` string, required
  - `createdAt` number, required
  - `updatedAt` number, required
  - `label` string
  - `deletedAt` number
  - `partialKeyValue` string, required — Partially-masked representation of the SDK key value, safe to display in UIs. The value is the `vf_<type>_` prefix followed by the first 3 characters of the secret portion and a fixed 8-character `*` mask (e.g. `vf_server_abc********`).
  - `keyValue` string, required — Cleartext value of the SDK key.
  - `tokenValue` string — Cleartext value of the Edge Config token, when the project has an Edge Config connection.

## Other responses

- `400` — One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
- `401` — The request is not authorized.
- `402` — The account is missing a payment so payment method must be updated
- `403` — You do not have permission to access this resource.
- `404`
- `409`
- `410`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/versions/b4d86a3e3479/schema)
