# JSON-RPC API guide **Version 1.1.** The latest JSON-RPC API guide is available here: [https://docs.safedns.com/books/json-rpc-api/page/json-rpc-api-guide](https://docs.safedns.com/books/json-rpc-api/page/json-rpc-api-guide) --- JSON-RPC API methods are designed for interaction with the service and making changes to the settings. --- The API was designed using JSON-RPC protocol and is compatible with the following versions: 1.0 and 2.0. More info is available here: [ ](http://www.jsonrpc.org/specification)[http://www.jsonrpc.org/specification](http://www.jsonrpc.org/specification) An example of a CURL request for JSON-RPC 1.0: ```shell curl -X POST https://www.safedns.com/api/json/v1-L-d '{"id":0,"method":"methodName","params":{"param1":"param1"}}' ``` An example of a CURL request for JSON-RPC 2.0: ```shell curl -X POST https://www.safedns.com/api/json/v2-L-d '{"id":0,"jsonrpc":"2.0","method":"methodName","params":{"param1":"para m1"}}' ``` Some API methods require basic authentication. In this case, authentication details must be sent in the request. Example: ```shell curl -X POST https://www.safedns.com/api/json/v2 -L --user username:password -d '{"id":0,"jsonrpc":"2.0","method":"methodName","params":{"param1":"param1"}}' ``` --- ##### Response format: JSON. A response example of a successful API call: ```JSON { "jsonrpc": "2.0", "id": 0, "result": "result" } ``` A method result is included in the “result” key. In case of an incorrect request the response will be the following: ```JSON { "jsonrpc": "2.0", "id": 0, "error": {"code": "code", "name": "name", "message": "message", "data": "data"} } ``` ---
**\#** | **Value** | **Description** |
1 | **systemInfo** | Gets information about the system configuration |
2 | **myip** | Gets the current client’s IP |
3 | **testAuth** | User’s authentication |
4 | **register** | Registers a new user |
5 | **userInfo** | Gets user information |
6 | **profiles** | Gets a list of available filtering policies |
7 | **addProfile** | Creates a new filtering policy |
8 | **removeProfile** | Deletes a filtering policy |
9 | **renameProfile** | Renames a filtering policy |
10 | **categories** | Gets a list of available filtering categories |
11 | **userFilter** | Gets a list of filtering categories applied for a user |
12 | **setFilterCat** | Changes filtering settings |
13 | **domains** | Gets a list of Allow/Denylisted domains for a certain filtering policy |
14 | **addDomain** | Adds a domain to the Allow/Denylist for a certain filtering policy |
15 | **removeDomain** | Deletes a domain from a certain filtering policy |
16 | **clearDomains** | Clears the list of domains for a certain filtering policy |
17 | **updateNic** | Updates a dynamic IP |
18 | **setWhiteListOnly** | Enables/disables the "Allow list only" mode |
19 | **setSafeSearchEnabled** | Enables/disables "Safe Search mode" for Google and Bing |
20 | **setSafeYoutubeEnabled** | Enables/disables "Restricted YouTube mode" |
21 | **multiSchedule** | Gets information on the filtering schedule for a certain policy |
22 | **setSchedule** | Sets filtering schedule for a certain policy |
23 | **setScheduleEnabled** | Enables/disables filtering schedule for a certain policy |
24 | **profileScheduleActivity** | Gets the time left before a change of the filtering policy according to the filtering schedule |
25 | **getProfile** | Creates AgentInfo, gets AgentInfo status or updates AgentInfo policy depending on the parameters |
26 | **setProfile** | Sets a filtering policy for AgentInfo |
27 | **feedback** | Sends user’s feedback |
28 | **getCategoriesDailyStats** | Gets daily categories stats of a policy |
29 | **getAdvertising** | Gets the information on promo |
30 | **getPlans** | Gets the list of available billing plans |
31 | **getPlan** | Gets the user’s billing plan |
32 | **getAPCVersion** | Gets mobile app’s version: minimal supported and the current one |