# API For Whitelist

## List whitelist entries

> Returns a paginated list of whitelist entries for the authenticated account, with support for sorting and ordering.

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseListWhiteList":{"type":"object","description":"Whitelist entries list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of whitelist entries.","items":{"$ref":"#/components/schemas/WhiteList"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"WhiteList":{"type":"object","description":"Whitelist entry representing an allowed client IP address.","properties":{"id":{"type":"integer","description":"Whitelist entry ID."},"ip":{"type":"string","description":"Whitelisted IP address."},"status":{"type":"integer","description":"1: Enabled, 2: Disabled"},"description":{"type":"string","description":"Optional description for the whitelist entry."},"created_at":{"type":"integer","description":"Whitelist entry creation timestamp."},"updated_at":{"type":"integer","description":"Whitelist entry last updated timestamp."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/white-list/get-list":{"get":{"summary":"List whitelist entries","description":"Returns a paginated list of whitelist entries for the authenticated account, with support for sorting and ordering.","parameters":[{"schema":{"type":"integer"},"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page. Default: 30"},{"schema":{"type":"integer"},"name":"page","in":"query","required":false,"description":"Requested page number (1-based). Default: 1"},{"schema":{"type":"string"},"name":"sort_by","in":"query","required":false,"description":"Field to sort by: 'id', 'ip', 'status', 'created_at', 'updated_at', 'description'. Default: id"},{"schema":{"type":"string"},"name":"order_by","in":"query","required":false,"description":"Sort order: desc or asc. Default: desc"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseListWhiteList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}}}}}}
```

## Create whitelist entries

> Creates one or more whitelist entries from the provided list of IP addresses.

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseGenerateWhiteList":{"type":"object","description":"Whitelist creation response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Created whitelist entry details.","$ref":"#/components/schemas/WhiteList"}}},"WhiteList":{"type":"object","description":"Whitelist entry representing an allowed client IP address.","properties":{"id":{"type":"integer","description":"Whitelist entry ID."},"ip":{"type":"string","description":"Whitelisted IP address."},"status":{"type":"integer","description":"1: Enabled, 2: Disabled"},"description":{"type":"string","description":"Optional description for the whitelist entry."},"created_at":{"type":"integer","description":"Whitelist entry creation timestamp."},"updated_at":{"type":"integer","description":"Whitelist entry last updated timestamp."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/white-list/create":{"post":{"summary":"Create whitelist entries","description":"Creates one or more whitelist entries from the provided list of IP addresses.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseGenerateWhiteList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ips":{"type":"array","items":{"type":"string","description":"IP address"},"description":"List of IP addresses to add to the whitelist."}},"required":["ips"]}}}}}}}}
```

## Update whitelist entries

> Updates one or more whitelist entries by ID, allowing changes to status and description.

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseUpdateWhiteList":{"type":"object","description":"Whitelist update response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Updated whitelist entry details.","$ref":"#/components/schemas/WhiteList"}}},"WhiteList":{"type":"object","description":"Whitelist entry representing an allowed client IP address.","properties":{"id":{"type":"integer","description":"Whitelist entry ID."},"ip":{"type":"string","description":"Whitelisted IP address."},"status":{"type":"integer","description":"1: Enabled, 2: Disabled"},"description":{"type":"string","description":"Optional description for the whitelist entry."},"created_at":{"type":"integer","description":"Whitelist entry creation timestamp."},"updated_at":{"type":"integer","description":"Whitelist entry last updated timestamp."}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/white-list/update":{"put":{"summary":"Update whitelist entries","description":"Updates one or more whitelist entries by ID, allowing changes to status and description.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseUpdateWhiteList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer"},"description":"List of whitelist entry IDs."},"description":{"type":"string","description":"Description for the whitelist entries."},"status":{"type":"integer","description":"Whitelist entry status. 1: enabled, 2: disabled"}},"required":["ids"]}}}}}}}}
```

## Delete whitelist entries

> Deletes one or more whitelist entries by ID.

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"servers":[{"url":"https://sandbox.9proxy.com"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"api-key","in":"query"}},"schemas":{"ResponseDeleteWhiteList":{"type":"object","description":"Whitelist deletion response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Deletion result.","properties":{"deleted":{"type":"boolean"}}}}},"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}},"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}},"paths":{"/client/v1/white-list/delete":{"delete":{"summary":"Delete whitelist entries","description":"Deletes one or more whitelist entries by ID.","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseDeleteWhiteList"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseBadRequestError"}}}},"403":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseForbiddenError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer"},"description":"List of whitelist entry IDs."}},"required":["ids"]}}}}}}}}
```

## The WhiteList object

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"components":{"schemas":{"WhiteList":{"type":"object","description":"Whitelist entry representing an allowed client IP address.","properties":{"id":{"type":"integer","description":"Whitelist entry ID."},"ip":{"type":"string","description":"Whitelisted IP address."},"status":{"type":"integer","description":"1: Enabled, 2: Disabled"},"description":{"type":"string","description":"Optional description for the whitelist entry."},"created_at":{"type":"integer","description":"Whitelist entry creation timestamp."},"updated_at":{"type":"integer","description":"Whitelist entry last updated timestamp."}}}}}}
```

## The ResponseListWhiteList object

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"components":{"schemas":{"ResponseListWhiteList":{"type":"object","description":"Whitelist entries list response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Paginated response data.","properties":{"items":{"type":"array","description":"List of whitelist entries.","items":{"$ref":"#/components/schemas/WhiteList"}},"total_items":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."}}}}},"WhiteList":{"type":"object","description":"Whitelist entry representing an allowed client IP address.","properties":{"id":{"type":"integer","description":"Whitelist entry ID."},"ip":{"type":"string","description":"Whitelisted IP address."},"status":{"type":"integer","description":"1: Enabled, 2: Disabled"},"description":{"type":"string","description":"Optional description for the whitelist entry."},"created_at":{"type":"integer","description":"Whitelist entry creation timestamp."},"updated_at":{"type":"integer","description":"Whitelist entry last updated timestamp."}}}}}}
```

## The ResponseGenerateWhiteList object

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"components":{"schemas":{"ResponseGenerateWhiteList":{"type":"object","description":"Whitelist creation response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Created whitelist entry details.","$ref":"#/components/schemas/WhiteList"}}},"WhiteList":{"type":"object","description":"Whitelist entry representing an allowed client IP address.","properties":{"id":{"type":"integer","description":"Whitelist entry ID."},"ip":{"type":"string","description":"Whitelisted IP address."},"status":{"type":"integer","description":"1: Enabled, 2: Disabled"},"description":{"type":"string","description":"Optional description for the whitelist entry."},"created_at":{"type":"integer","description":"Whitelist entry creation timestamp."},"updated_at":{"type":"integer","description":"Whitelist entry last updated timestamp."}}}}}}
```

## The ResponseUpdateWhiteList object

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"components":{"schemas":{"ResponseUpdateWhiteList":{"type":"object","description":"Whitelist update response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Updated whitelist entry details.","$ref":"#/components/schemas/WhiteList"}}},"WhiteList":{"type":"object","description":"Whitelist entry representing an allowed client IP address.","properties":{"id":{"type":"integer","description":"Whitelist entry ID."},"ip":{"type":"string","description":"Whitelisted IP address."},"status":{"type":"integer","description":"1: Enabled, 2: Disabled"},"description":{"type":"string","description":"Optional description for the whitelist entry."},"created_at":{"type":"integer","description":"Whitelist entry creation timestamp."},"updated_at":{"type":"integer","description":"Whitelist entry last updated timestamp."}}}}}}
```

## The ResponseDeleteWhiteList object

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"components":{"schemas":{"ResponseDeleteWhiteList":{"type":"object","description":"Whitelist deletion response payload.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"result":{"type":"object","description":"Deletion result.","properties":{"deleted":{"type":"boolean"}}}}}}}}
```

## The ResponseForbiddenError object

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"components":{"schemas":{"ResponseForbiddenError":{"type":"object","description":"Response payload returned when access is forbidden.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}}}
```

## The ResponseBadRequestError object

```json
{"openapi":"3.1.1","info":{"title":"Whitelist","version":"1.0"},"components":{"schemas":{"ResponseBadRequestError":{"type":"object","description":"Response payload returned when the request is invalid.","properties":{"success":{"type":"boolean","description":"Indicates whether the request was successful."},"message":{"type":"string","description":"Human-readable response message."},"errors":{"type":"array","description":"List of error messages.","items":{"type":"string"}}}}}}}
```
