---
title: "Register an agent (obtain sandbox credentials)"
method: POST
path: "/api/agent/register"
tags: ["Agent"]
---

# Register an agent (obtain sandbox credentials)

`POST /api/agent/register`

## Request body

- AgentRegisterRequest
  - `name` string
  - `type` string — optional; defaults to "opencode"

## Response `201`

Created

- AgentRegisterResponse
  - `proxy_token` string, required
  - `sandbox_id` string, required
  - `short_id` string, required
  - `tunnel_token` string, required
  - `workspace_id` string, required

## Other responses

- `400` — bad request
- `401` — unauthorized
- `403` — no permission
- `500` — internal error

## Changes

> 20 revisions in range; 1 could not be searched.

- **2026-05-22** `5599b083b4ea` — 1 info
  - endpoint added
- **2026-05-22** `1ba39f384b63` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agentserver/apis/agentserver-api/changes/api/agent/register/post.md)

---

[API](https://skmtc.dev/agentserver/apis/agentserver-api.md) · [All operations](https://skmtc.dev/agentserver/apis/agentserver-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentserver/agentserver-api/revisions/e8c329825b4e/schema)
