POST
/v1/mgmt/accesskey/update

Authorization

AuthorizationRequiredBearer <token>

< Project ID >:< Management Key > as bearer

In: header

Request Body

application/jsonRequired
idstring
namestring
descriptionstring
roleNames

we want to differentiate between empty and nil so we use google.protobuf.Value

keyTenantsunknown

Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.

customClaimsobject
permittedIpsunknown

Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.

curl -X POST "https://api.descope.com/v1/mgmt/accesskey/update" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "name": "string",
    "description": "string",
    "roleNames": null,
    "keyTenants": null,
    "customClaims": {},
    "permittedIps": null
  }'

OK

{
  "key": {
    "id": "string",
    "name": "string",
    "roleNames": [
      "string"
    ],
    "keyTenants": [
      {
        "tenantId": "string",
        "roleNames": [
          "string"
        ],
        "tenantName": "string"
      }
    ],
    "status": "string",
    "createdTime": 0,
    "expireTime": 0,
    "createdBy": "string",
    "clientId": "string",
    "boundUserId": "string",
    "customClaims": {},
    "editable": true,
    "description": "string",
    "permittedIps": [
      "string"
    ]
  }
}

Was this helpful?