---
title: "Bind service to localhost"
method: POST
path: "/api/projects/{projectId}/sessions/{sessionId}/services/{serviceId}/localhost"
tags: ["Services"]
---

# Bind service to localhost

`POST /api/projects/{projectId}/sessions/{sessionId}/services/{serviceId}/localhost`

Bind service to localhost. Accepts a JSON request body when defined and returns the resulting resource or action status.

## Path parameters

- `projectId` string, required
- `sessionId` string, required
- `serviceId` string, required

## Response `200`

Localhost binding

- LocalhostBinding — localhost Binding API object.
  - `url` string — URL for a browser or API client to use.
  - `port` integer — port value for the localhost Binding object.

---

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