Create zone
client.zones.create(ZoneCreateParams { name, default_mcp_gateway_application, description, 4 more } body, RequestOptionsoptions?): Zone { id, created_at, name, 12 more }
POST/zones
Creates a new zone for the authenticated organization. A zone is an isolated environment for IAM resources.
Parameters
Returns
Create zone
import KeycardAPI from '@keycardai/api';
const client = new KeycardAPI();
const zone = await client.zones.create({ name: 'x' });
console.log(zone.id);{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"name": "x",
"organization_id": "organization_id",
"protocols": {
"oauth2": {
"authorization_endpoint": "https://example.com",
"authorization_server_metadata": "https://example.com",
"dcr_enabled": true,
"issuer": "https://example.com",
"jwks_uri": "https://example.com",
"pkce_required": true,
"redirect_uri": "https://example.com",
"registration_endpoint": "https://example.com",
"token_endpoint": "https://example.com"
},
"openid": {
"provider_configuration": "https://example.com",
"userinfo_endpoint": "https://example.com"
}
},
"slug": "slug",
"updated_at": "2019-12-27T18:11:19.117Z",
"default_mcp_gateway_application_id": "default_mcp_gateway_application_id",
"default_resource_id": "default_resource_id",
"description": "description",
"encryption_key": {
"arn": "x",
"type": "aws"
},
"login_flow": "default",
"permissions": {
"zones": {
"read": true,
"update": true,
"delete": false,
"create": false
},
"applications": {
"read": true,
"list": true,
"create": false
}
},
"requires_invitation": true,
"user_identity_provider_id": "user_identity_provider_id"
}Returns Examples
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"name": "x",
"organization_id": "organization_id",
"protocols": {
"oauth2": {
"authorization_endpoint": "https://example.com",
"authorization_server_metadata": "https://example.com",
"dcr_enabled": true,
"issuer": "https://example.com",
"jwks_uri": "https://example.com",
"pkce_required": true,
"redirect_uri": "https://example.com",
"registration_endpoint": "https://example.com",
"token_endpoint": "https://example.com"
},
"openid": {
"provider_configuration": "https://example.com",
"userinfo_endpoint": "https://example.com"
}
},
"slug": "slug",
"updated_at": "2019-12-27T18:11:19.117Z",
"default_mcp_gateway_application_id": "default_mcp_gateway_application_id",
"default_resource_id": "default_resource_id",
"description": "description",
"encryption_key": {
"arn": "x",
"type": "aws"
},
"login_flow": "default",
"permissions": {
"zones": {
"read": true,
"update": true,
"delete": false,
"create": false
},
"applications": {
"read": true,
"list": true,
"create": false
}
},
"requires_invitation": true,
"user_identity_provider_id": "user_identity_provider_id"
}