---
title: "Register Environment"
method: POST
path: "/api/v1/environments/register"
tags: ["environments"]
---

# Register Environment

`POST /api/v1/environments/register`

## Request

- Base URL: `https://api.komos.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.komos.ai/api/v1/environments/register`
- Auth: none declared

## Headers

- `Authorization` string, nullable
- `X-Org-Id` string, nullable

## Request body

- EnvironmentRegisterRequest
  - `label` string, required
  - `kind` 'sandbox' | 'self_hosted' | 'persistent_sandbox', required
  - `metadata` EnvironmentMetadata
    - `platform` string, nullable
    - `version` string, nullable
    - `device_label` string, nullable
    - `arch` string, nullable
    - `nacl_arch` string, nullable
    - `browser` string, nullable
    - `browser_version` string, nullable
    - `user_agent` string, nullable
    - `locale` string, nullable

## Response `201`

Successful Response

- EnvironmentRegisterResponse
  - `environment_id` string, uuid, required
  - `secret` string, required
  - `expires_at` string, date-time, nullable, required
  - `gateway_url` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/komos/apis/komos-backend.md) · [All operations](https://skmtc.dev/komos/apis/komos-backend/llms.txt) · [OpenAPI document](https://skmtc.dev/komos/apis/komos-backend/revisions/f10e153fab38?raw)
