---
title: "Publish a port on the agent's machine at a public URL"
method: POST
path: "/agents/{agent_id}/previews"
tags: ["Agent work"]
---

# Publish a port on the agent's machine at a public URL

`POST /agents/{agent_id}/previews`

## Request

- Base URL: `https://api-docs.jackhamr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.jackhamr.ai/agents/{agent_id}/previews`
- Auth: none declared

## Path parameters

- `agent_id` string, required

## Request body

- PreviewBody
  - `port` integer, required

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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