> For the complete documentation index, see [llms.txt](https://docs.9proxy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.9proxy.com/developers/sdk/sdk-nodejs/functions/putconfigport-...args.md).

# putConfigPort(...args)

Applies a JSON configuration (as a buffer) to a single port.

```javascript
putConfigPort(port, jsonBuf, len)
```

***

## Parameters

* **port** (<mark style="color:green;">number</mark>) – Port number
* **jsonBuf** (<mark style="color:green;">Buffer</mark>) – JSON buffer with config
* **len** (<mark style="color:green;">number</mark>) – Buffer length

## Return value

number (0 = success)

## Example JSON

```json
// JSON

{
  "port": 60000,
  "country": ["US", "CA"],
  "state": "California",
  "city": "San Francisco",
  "zip": "94105",
  "isp": "Comcast",
  "refresh": true,
  "rotation": false
}

```

## Example

```javascript
// example

const body = Buffer.from(JSON.stringify({ port: 60000, country: ["US", "CA"] }));
sdk.putConfigPort(60000, body, body.length);

```
