Create an SDK key
PUT
/__remote/api.vercel.com/v1/projects/{projectIdOrName}/feature-flags/sdk-keysCreates an SDK key.
/__remote/api.vercel.com/v1/projects/{projectIdOrName}/feature-flags/sdk-keys
const response = await fetch('/__remote/api.vercel.com/v1/projects/projectIdOrName/feature-flags/sdk-keys?teamId=string&slug=string', { method: 'PUT', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "sdkKeyType": "server", "environment": "string", "label": "string" }),});
const data = await response.json();console.log(data);Response
{ "createdAt": "123", "createdBy": "string", "deletedAt": "123", "environment": "string", "hashKey": "string", "label": "string", "partialKeyValue": "string", "projectId": "example_id", "type": "client", "updatedAt": "123", "keyValue": "string", "tokenValue": "string"}AuthorizationbearerToken
Default authentication mechanism
200Success
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********).400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
401The request is not authorized.
402The account is missing a payment so payment method must be updated
403You do not have permission to access this resource.
404Error
409Error
410Error