> 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-native-c/functions/putconfigport.md).

# PutConfigPort

Apply a JSON “configure port” payload to a single port.

{% code overflow="wrap" %}

```c
GoUint8 PutConfigPort(GoUint32 port, char* jsonInfo, GoInt jsonInfoLen)
```

{% endcode %}

***

## Parameters

* **port**: Target port.
* **jsonInfo**: JSON buffer describing the configuration.
* **jsonInfoLen**: Length of jsonInfo in bytes.

## Return Value

* GoUint8: 0 on success.

JSON Structure Format:

```json
// JSON Structure Format

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

```

## Example

```c
// example

const char* j="{\"port\":60000,\"country\":[\"US\"]  }";
GoUint8 ok = PutConfigPort(1080,(char*)j,(GoInt)strlen(j));


```
