Skip to main content
POST
/
v1
/
restricted_keys
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

const restrictedKeyCreatedView = await client.restrictedKeys.create();

console.log(restrictedKeyCreatedView.id);
{
  "id": "<string>",
  "name": "<string>",
  "key_secret": "<string>",
  "scopes": [
    {
      "resource_type": "RESOURCE_TYPE_DEVBOXES",
      "access_level": "ACCESS_LEVEL_NONE"
    }
  ],
  "expires_at_ms": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
scopes
object[]
expires_at_ms
integer<int64> | null

Response

OK

id
string
name
string
key_secret
string
scopes
object[]
expires_at_ms
integer<int64> | null