> Documentation index: https://docs.kiste.run/llms.txt, a list of every page in this documentation.

# Kiste Stream

> Publish a port of a Kiste at its own address under kiste.stream, list and revoke it.

Publish a port of a Kiste at its own address under kiste.stream, list and revoke it.

## List published ports

`GET /v1/instances/{name}/services`

The ports of this Kiste published on Kiste Stream, with their public addresses.

**Path parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | The Kiste's name. |

```bash
curl -sS "https://kiste.run/v1/instances/review-42/services" \
  -H "Authorization: Bearer $KISTE_TOKEN"
```

**Responses:**

- `200` OK. Body: list of [HostedServiceResponse](https://docs.kiste.run/api/schemas.md#hostedserviceresponse)

Errors use the [error envelope](https://docs.kiste.run/errors.md#reading-an-error).

## Publish a port

`POST /v1/instances/{name}/services`

Publishes a port of the Kiste at its own address `https://<label>.kiste.stream/`, where the label is a long random capability. Anyone with the address reaches the port over HTTP and WebSocket until you revoke it. `description` says what runs there.

**Path parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | The Kiste's name. |

```bash
curl -sS -X POST "https://kiste.run/v1/instances/review-42/services" \
  -H "Authorization: Bearer $KISTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"web","port":3000,"description":"Dev server"}'
```

**Request body:** [CreateServiceRequest](https://docs.kiste.run/api/schemas.md#createservicerequest)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | no |  |
| `name` | string | yes |  |
| `port` | integer (int32) | yes |  |

**Responses:**

- `200` OK. Body: [HostedServiceResponse](https://docs.kiste.run/api/schemas.md#hostedserviceresponse)

Errors use the [error envelope](https://docs.kiste.run/errors.md#reading-an-error).

## Revoke a published port

`DELETE /v1/instances/{name}/services/{service}`

Ends a published port; its address stops working at once and is never reused.

**Path parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | The Kiste's name. |
| `service` | string | yes | The published port's ID. |

```bash
curl -sS -X DELETE "https://kiste.run/v1/instances/review-42/services/SERVICE_ID" \
  -H "Authorization: Bearer $KISTE_TOKEN"
```

**Responses:**

- `200` OK. Body: [MessageResponse](https://docs.kiste.run/api/schemas.md#messageresponse)

Errors use the [error envelope](https://docs.kiste.run/errors.md#reading-an-error).

## Related topics

- [Overview](https://docs.kiste.run/api.md)
- [Conventions](https://docs.kiste.run/api/conventions.md)
- [Kisten](https://docs.kiste.run/api/instances.md)
- [Commands](https://docs.kiste.run/api/commands.md)
- [Snapshots](https://docs.kiste.run/api/snapshots.md)
- [SSH and terminal](https://docs.kiste.run/api/ssh-and-terminal.md)
- [Desktop](https://docs.kiste.run/api/desktop.md)
- [Images and environments](https://docs.kiste.run/api/images.md)
- [Events, webhooks and alerts](https://docs.kiste.run/api/events.md)
- [Account and access](https://docs.kiste.run/api/account.md)
- [Sign-in and platform](https://docs.kiste.run/api/platform.md)
- [Schemas](https://docs.kiste.run/api/schemas.md)
- Previous: [Desktop](https://docs.kiste.run/api/desktop.md)
- Next: [Images and environments](https://docs.kiste.run/api/images.md)
