> 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/setconfigports.md).

# SetConfigPorts

Apply a batch JSON configuration to multiple ports.

```c
GoUint8 SetConfigPorts(char* jsonInfo, GoInt jsonInfoLen)
```

***

## Parameters

* **jsonInfo**: JSON buffer mapping ports to config objects.
* **jsonInfoLen**: Length of jsonInfo in bytes.

## Return Value

GoUint8: 0 on success.

JSON Structure Example:&#x20;

```c
// JSON Structure

{
60000: {
  "port": 60000,
  "country": ["US", "CA"],
  "state": "California",
  "city": "San Francisco",
  "zip": "94105",
  "isp": "Comcast",
  "refresh": true, // áp dụng tự động refresh
  "rotation": false // áp dụng cho rotation
 }
}

```

## Example

```c
// example

SetConfigPorts((char*)j, (GoInt)strlen(j));

```
