S D K Keys (beta)

Update SDK key

PATCH
/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys/{sdkKeyKey}

Update a an existing SDK key by its identifying key.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
environmentKey*string
sdkKeyKey*string

The user-defined identifying key of the SDK key. This is used solely to identify an SDK key and is distinct from the value field, which is the actual SDK key value.

Query Parameters

version?integer

The version of the SDK key for optimistic locking. If provided, the update will only succeed if the current version matches.

Header Parameters

LD-API-Version*"beta"

Version of the endpoint.

Value in

  • "beta"

Request Body

application/json

An array of patches for updating an existing SDK key. The following fields are supported: name, description, expiry.

name?string

(Optional)The human-readable name of the SDK key.

description?string

(Optional) The description of the SDK key.

expiry?integer
Formatint64

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v2/projects/default/environments/production/sdk-keys/my-sdk-key" \  -H "LD-API-Version: beta" \  -H "Content-Type: application/json" \  -d '{    "name": "name",    "description": "description",    "expiry": 0  }'
{  "isDefault": true,  "_links": {    "parent": {      "href": "href",      "type": "type"    },    "self": {      "href": "href",      "type": "type"    }  },  "kind": "sdk",  "_createdAt": 6,  "name": "name",  "description": "description",  "expiry": 0,  "value": "value",  "_updatedAt": 1,  "_version": 5,  "key": "key",  "_createdByMemberId": "_createdByMemberId"}