POST
/v1/mgmt/accesskey/create

Authorization

AuthorizationRequiredBearer <token>

< Project ID >:< Management Key > as bearer

In: header

Request Body

application/jsonRequired
namestring
expireTimestring
roleNamesarray<string>
keyTenantsarray<object>
userIdstring
customClaimsobject
descriptionstring
permittedIpsarray<string>
curl -X POST "https://api.descope.com/v1/mgmt/accesskey/create" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "expireTime": "string",
    "roleNames": [
      "string"
    ],
    "keyTenants": [
      {
        "tenantId": "string",
        "roleNames": [
          "string"
        ]
      }
    ],
    "userId": "string",
    "customClaims": {},
    "description": "string",
    "permittedIps": [
      "string"
    ]
  }'

OK

{
  "cleartext": "string",
  "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?