### Get subscriptions Source: https://help.decodo.com/api-reference/subscriptions/get-subscriptions Fetches detailed information about your current subscription for Residential subscription. ```APIDOC ## GET /v2/subscriptions ### Description Detailed information about your current subscription for Residential subscription. ### Method GET ### Endpoint /v2/subscriptions ### Parameters ### Request Example ```json { "example": "No request body needed for this GET request." } ``` ### Response #### Success Response (200) - **traffic_limit** (string) - The total traffic limit for the subscription. - **traffic_per_period** (string) - The traffic limit per period. - **users_limit** (integer) - The maximum number of users allowed. - **ip_address_limit** (integer) - The limit for IP addresses. - **valid_from** (string) - The start date of the subscription validity. - **valid_until** (string) - The end date of the subscription validity. - **service_type** (string) - The type of service subscribed to (e.g., "residential_proxies"). #### Response Example ```json { "traffic_limit": "50", "traffic_per_period": "0.15", "users_limit": 3, "ip_address_limit": 2, "valid_from": "2018-11-08", "valid_until": "2019-06-30", "service_type": "residential_proxies" } ``` #### Error Response (400) - **error_code** (string) - The error code (e.g., "not_found"). - **message** (string) - A message describing the error. #### Error Response Example ```json { "error_code": "not_found", "message": "Resource not found" } ``` ``` -------------------------------- ### OpenAPI Specification for Get Subscriptions Source: https://help.decodo.com/api-reference/subscriptions/get-subscriptions This OpenAPI 3.1.0 specification defines the GET /v2/subscriptions endpoint for retrieving subscription details. It includes details on request parameters, responses, and security schemes. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/subscriptions: get: tags: - Subscriptions summary: Get subscriptions description: >- Detailed information about your current subscription for Residential subscription operationId: get-subscriptions responses: '200': description: '200' content: application/json: examples: Result: value: |- { "traffic_limit":"50" "traffic_per_period":"0.15" "users_limit":3 "ip_address_limit":2 "valid_from":"2018-11-08" "valid_until":"2019-06-30" "service_type":"residential_proxies" } '400': description: '400' content: application/json: examples: Result: value: |- { "error_code":"not_found" "message":"Resource not found" } deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization ``` -------------------------------- ### Get Whitelisted IPs Source: https://help.decodo.com/api-reference/whitelisted-ips/get-whitelisted-ips Fetches a list of all whitelisted IP addresses associated with the Residential subscription. ```APIDOC ## GET /v2/whitelisted-ips ### Description Get a list of whitelisted IPs for Residential subscription. ### Method GET ### Endpoint /v2/whitelisted-ips ### Parameters ### Request Body ### Request Example ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the whitelisted IP entry. - **ip** (string) - The whitelisted IP address. - **enabled** (boolean) - Indicates if the IP address is currently enabled. - **created_at** (string) - The timestamp when the IP address was added. #### Response Example { "example": "[\n 0:{\n \"id\":69489\n \"ip\":\"127.0.0.1\"\n \"enabled\":true\n \"created_at\":\"2019-05-22 12:44\"\n\t}\n]" } #### Error Response (400) - **error_code** (string) - The error code indicating the issue (e.g., "not_found"). - **message** (string) - A message describing the error. #### Response Example { "example": "{\n \"error_code\":\"not_found\"\n \"message\":\"Resource not found\"\n}" } ``` -------------------------------- ### OpenAPI Specification for Get Targets Source: https://help.decodo.com/api-reference/targets/get-targets This OpenAPI 3.1.0 specification defines the GET Targets endpoint. It includes details on request parameters like date range, proxy users, search queries, and proxy types, as well as possible responses. ```yaml openapi: 3.1.0 info: title: Dash stats version: '1.2' servers: - url: https://api.decodo.com/api/v2/statistics security: - sec0: [] tags: - name: Dash Stats description: Dashboard statistics endpoints paths: /targets: post: tags: - Targets summary: Get targets operationId: get-targets requestBody: content: application/json: schema: type: object properties: startDate: type: string description: >- Timezone is UTC. Max date return interval is 180 days. Date in this format: YYYY-MM-DD HH:MM:SS default: '2024-09-01 00:00:00' endDate: type: string description: >- Timezone is UTC. Max date return interval is 180 days. Date in this format: YYYY-MM-DD HH:MM:SS default: '2024-10-01 00:00:00' proxyUsers: type: array description: >- A list of proxy user IDs retrieved [from here](https://help.decodo.com/api-reference/sub-users/get-sub-users) (only available for residential_proxies). Not applicable to RTC proxies (Scraping APIs) items: type: string search: type: string description: >- Search for specific string in targets. Minimum 3 characters. If left empty will return all targets proxyType: type: string description: RTC proxies are Scraping APIs default: residential_proxies enum: - residential_proxies - mobile_proxies - rtc_universal_proxies - rtc_universal_core_proxies - modular_scraper required: [] responses: '200': description: '200' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} '400': description: '400' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} deprecated: false components: securitySchemes: sec0: type: apiKey in: header name: Authorization ``` -------------------------------- ### Successful Sub User Traffic Response Example Source: https://help.decodo.com/api-reference/sub-users/get-sub-user-traffic This JSON object represents a successful response for retrieving sub-user traffic. It includes total traffic, received traffic (rx), and transmitted traffic (tx). ```json { "traffic": 4.7, "traffic_rx": 4.2, "traffic_tx": 0.5 } ``` -------------------------------- ### Get Sub Users Source: https://help.decodo.com/api-reference/sub-users/get-sub-users Fetches a list of active sub-users associated with a Residential subscription. You can filter the results by specifying the service type. ```APIDOC ## GET /v2/sub-users ### Description Get a list of active sub users for Residential subscription. ### Method GET ### Endpoint /v2/sub-users ### Parameters #### Query Parameters - **service_type** (string) - Optional - Possible parameters: residential_proxies ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the sub-user. - **username** (string) - The username of the sub-user. - **status** (string) - The current status of the sub-user (e.g., 'active'). - **created_at** (string) - The timestamp when the sub-user was created. - **traffic** (number) - The current traffic usage of the sub-user. - **traffic_limit** (null) - The traffic limit for the sub-user (if set). - **service_type** (string) - The type of service the sub-user is subscribed to. - **traffic_count_from** (string) - The timestamp from which traffic is counted. - **auto_disable** (boolean) - Indicates if the sub-user is set to auto-disable. #### Response Example { "example": "[\n 0:{\n \"id\":24570,\n \"username\":\"name\",\n \"status\":\"active\",\n \"created_at\":\"2019-03-23 13:08\",\n \"traffic\" : 1.13,\n \"traffic_limit\":NULL,\n \"service_type\":\"residential_proxies\",\n \"traffic_count_from\":\"2019-03-23 13:10\",\n \"auto_disable\":false\n }\n]" } #### Error Response (400) - **error_code** (string) - The error code (e.g., 'not_found'). - **message** (string) - A message describing the error. #### Response Example { "example": "{\n \"error_code\":\"not_found\"\n \"message\":\"Resource not found\"\n}" } ``` -------------------------------- ### Get Sub User API Definition (OpenAPI) Source: https://help.decodo.com/api-reference/sub-users/get-sub-user This OpenAPI definition describes the GET /v2/sub-users/{sub_user_id} endpoint. Use this to understand the request parameters and response structure for retrieving sub user details. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/sub-users/{sub_user_id}: get: tags: - Sub-users summary: Get sub user description: Get a single active sub user operationId: get-sub-user parameters: - name: sub_user_id in: path schema: type: integer format: int32 required: true responses: '200': description: '200' content: application/json: examples: Result: value: | { "id": 1, "username": "name", "status": "active", "created_at": "2021-07-01 00:00", "traffic": 0, "traffic_limit": null, "service_type": "type", "traffic_count_from": null, "auto_disable": false } schema: type: object properties: id: type: integer example: 1 default: 0 username: type: string example: name status: type: string example: active created_at: type: string example: 2021-07-01 00:00 traffic: type: integer example: 0 default: 0 traffic_limit: {} service_type: type: string example: type traffic_count_from: {} auto_disable: type: boolean example: false default: true '400': description: '400' content: application/json: examples: Result: value: | { "error_code": "bad_request", "message": "Can not process request" } schema: type: object properties: error_code: type: string example: bad_request message: type: string example: Can not process request deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization ``` -------------------------------- ### OpenAPI Specification for Get Endpoints Source: https://help.decodo.com/api-reference/endpoints/get-endpoints This OpenAPI 3.1.0 specification defines the GET /v2/endpoints operation. It includes details on request parameters, responses, and example data structures for successful and error scenarios. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/endpoints: get: tags: - Endpoints summary: Get endpoints description: Get types of endpoints for Residential subscription operationId: get-endpoints responses: '200': description: '200' content: application/json: examples: Result: value: |- [ 0:{ "type":"random" "available_locations":"148" "url":"endpoints/random" } 1:{ "type":"sticky" "available_locations":"62" "url":"endpoints/sticky" } ] '400': description: '400' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} deprecated: false security: [] components: {} ``` -------------------------------- ### Get endpoints by type Source: https://help.decodo.com/api-reference/endpoints/get-endpoints-by-type Retrieves a list of endpoints for a Residential subscription, filtered by a specified type. The type parameter can be 'random' or 'sticky'. ```APIDOC ## GET /v2/endpoints/{type} ### Description Get a list of endpoints by a specified type for Residential subscription. ### Method GET ### Endpoint /v2/endpoints/{type} ### Parameters #### Path Parameters - **type** (string) - Required - Specifies the type of endpoints to retrieve. Must be one of: 'random', 'sticky'. ### Response #### Success Response (200) - **location** (string) - The geographical location of the endpoint. - **hostname** (string) - The hostname of the endpoint. - **port_range** (string) - The port range available for the endpoint. #### Response Example ```json [ { "location": "Random", "hostname": "gate.decodo.com", "port_range": "7000" }, { "location": "Canada", "hostname": "ca.decodo.com", "port_range": "20000" } ] ``` #### Error Response (400) - **error_code** (string) - Indicates the type of error. Example: 'bad_request'. - **message** (string) - A message describing the error. Example: 'Bad proxy type provided.' #### Response Example ```json { "error_code": "bad_request", "message": "Bad proxy type provided." } ``` ``` -------------------------------- ### OpenAPI Specification for Get Endpoints by Type Source: https://help.decodo.com/api-reference/endpoints/get-endpoints-by-type This OpenAPI 3.1.0 specification defines the GET endpoint for retrieving proxy endpoints by type. It includes details on parameters, expected responses, and example request/response bodies. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/endpoints/{type}: get: tags: - Endpoints summary: Get endpoints by type description: Get a list of endpoints by a specified type for Residential subscription operationId: get-endpoints-by-type parameters: - name: type in: path description: '' schema: type: string enum: - random - sticky required: true responses: '200': description: '200' content: application/json: examples: Result: value: |- [ 0:{ "location":"Random" "hostname":"gate.decodo.com" "port_range":"7000" } 1:{ "location":"Canada" "hostname":"ca.decodo.com" "port_range":"20000" } '400': description: '400' content: application/json: examples: Result: value: |- { "error_code":"bad_request" "message":"Bad proxy type provided." } deprecated: false security: [] components: {} ``` -------------------------------- ### OpenAPI Specification for Get Sub Users Source: https://help.decodo.com/api-reference/sub-users/get-sub-users This OpenAPI 3.1.0 specification defines the GET /v2/sub-users endpoint for retrieving sub-user data. It includes request parameters, response schemas for success (200) and error (400) cases, and security definitions. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/sub-users: get: tags: - Sub-users summary: Get sub users description: Get a list of active sub users for Residential subscription operationId: get-sub-users parameters: - name: service_type in: query description: 'Possible parameters: residential_proxies' schema: type: string enum: - residential_proxies responses: '200': description: '200' content: application/json: examples: Result: value: |- [ 0:{ "id":24570, "username":"name", "status":"active", "created_at":"2019-03-23 13:08", "traffic" : 1.13, "traffic_limit":NULL, "service_type":"residential_proxies", "traffic_count_from":"2019-03-23 13:10", "auto_disable":false } ] '400': description: '400' content: application/json: examples: Result: value: |- { "error_code":"not_found" "message":"Resource not found" } deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization ``` -------------------------------- ### Error Response Example for Sub User Traffic Source: https://help.decodo.com/api-reference/sub-users/get-sub-user-traffic This JSON object illustrates an error response, specifically when a resource is not found. It includes an error code and a descriptive message. ```json { "error_code":"not_found" "message":"Resource not found" } ``` -------------------------------- ### Get Endpoints Source: https://help.decodo.com/api-reference/endpoints/get-endpoints Retrieves a list of available endpoint types, including the number of available locations and the corresponding URL for each type. This is useful for understanding the proxy options for a Residential subscription. ```APIDOC ## GET /v2/endpoints ### Description Get types of endpoints for Residential subscription. This endpoint returns a list of available endpoint types, their available locations, and their respective URLs. ### Method GET ### Endpoint /v2/endpoints ### Parameters ### Request Example (No request body or parameters specified in the source) ### Response #### Success Response (200) - **type** (string) - The type of the endpoint (e.g., "random", "sticky"). - **available_locations** (string) - The number of available locations for this endpoint type. - **url** (string) - The URL to access this endpoint type. #### Response Example ```json [ { "type": "random", "available_locations": "148", "url": "endpoints/random" }, { "type": "sticky", "available_locations": "62", "url": "endpoints/sticky" } ] ``` #### Error Response (400) - Description: '400' - Content: application/json - Example: {} ``` -------------------------------- ### OpenAPI Specification for Whitelisted IPs Source: https://help.decodo.com/api-reference/whitelisted-ips/get-whitelisted-ips This OpenAPI 3.1.0 specification defines the GET /v2/whitelisted-ips endpoint. It includes details on request parameters, response formats for success (200) and error (400) scenarios, and security schemes. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/whitelisted-ips: get: tags: - Whitelisted IPs summary: Get whitelisted IPs description: Get a list of whitelisted IPs for Residential subscription operationId: get-whitelisted-ips responses: '200': description: '200' content: application/json: examples: Result: value: "[ 0:{ \"id\":69489 \"ip\":\"127.0.0.1\" \"enabled\":true \"created_at\":\"2019-05-22 12:44" } ]" '400': description: '400' content: application/json: examples: Result: value: |- { "error_code":"not_found" "message":"Resource not found" } deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization ``` -------------------------------- ### Get targets Source: https://help.decodo.com/api-reference/targets/get-targets Retrieves a list of targets based on the provided filtering criteria. This endpoint is useful for segmenting and analyzing target data. ```APIDOC ## POST /targets ### Description Retrieves a list of targets based on the provided filtering criteria. This endpoint is useful for segmenting and analyzing target data. ### Method POST ### Endpoint /targets ### Parameters #### Request Body - **startDate** (string) - Optional - Timezone is UTC. Max date return interval is 180 days. Date in this format: YYYY-MM-DD HH:MM:SS (default: '2024-09-01 00:00:00') - **endDate** (string) - Optional - Timezone is UTC. Max date return interval is 180 days. Date in this format: YYYY-MM-DD HH:MM:SS (default: '2024-10-01 00:00:00') - **proxyUsers** (array of strings) - Optional - A list of proxy user IDs retrieved from [here](https://help.decodo.com/api-reference/sub-users/get-sub-users) (only available for residential_proxies). Not applicable to RTC proxies (Scraping APIs) - **search** (string) - Optional - Search for specific string in targets. Minimum 3 characters. If left empty will return all targets - **proxyType** (string) - Optional - RTC proxies are Scraping APIs (default: 'residential_proxies', enum: ['residential_proxies', 'mobile_proxies', 'rtc_universal_proxies', 'rtc_universal_core_proxies', 'modular_scraper']) ### Response #### Success Response (200) - **{}** (object) - An empty object indicating success. The actual data structure is not detailed in the provided schema. #### Response Example ```json {} ``` #### Error Response (400) - **{}** (object) - An empty object indicating a bad request. The actual error details are not detailed in the provided schema. #### Response Example ```json {} ``` ``` -------------------------------- ### Get Sub User Source: https://help.decodo.com/api-reference/sub-users/get-sub-user Retrieves the details of a single active sub user by their ID. This endpoint is part of the Sub-users management API. ```APIDOC ## GET /v2/sub-users/{sub_user_id} ### Description Get a single active sub user. ### Method GET ### Endpoint /v2/sub-users/{sub_user_id} ### Parameters #### Path Parameters - **sub_user_id** (integer) - Required - The unique identifier for the sub user. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the sub user. - **username** (string) - The username of the sub user. - **status** (string) - The current status of the sub user (e.g., 'active'). - **created_at** (string) - The timestamp when the sub user was created. - **traffic** (integer) - The amount of traffic used by the sub user. - **traffic_limit** (null) - The traffic limit for the sub user, if set. - **service_type** (string) - The type of service associated with the sub user. - **traffic_count_from** (null) - Indicates from where traffic is counted, if applicable. - **auto_disable** (boolean) - Whether the sub user is automatically disabled when limits are reached. #### Response Example { "id": 1, "username": "name", "status": "active", "created_at": "2021-07-01 00:00", "traffic": 0, "traffic_limit": null, "service_type": "type", "traffic_count_from": null, "auto_disable": false } #### Error Response (400) - **error_code** (string) - A code indicating the type of error. - **message** (string) - A message describing the error. #### Error Response Example { "error_code": "bad_request", "message": "Can not process request" } ``` -------------------------------- ### OpenAPI Specification for Custom Endpoints Source: https://help.decodo.com/api-reference/endpoints/generate-custom-endpoints This OpenAPI 3.1.0 specification defines the GET /v2/endpoints-custom endpoint for generating custom proxy routes. It includes details on all available query parameters, their types, descriptions, and default values. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/endpoints-custom: get: tags: - Endpoints summary: Generate custom endpoints description: >- Generate custom endpoints for proxying for Residential and Datacenter Pay per GB (DEPRECATED) subscriptions. If a default value is preset you don't need to actually include it in the request param query. operationId: generate-custom-endpoints parameters: - name: proxy_type in: query required: false description: For what proxy type you wish to generate routes schema: type: string default: residential_proxies enum: - residential_proxies - name: auth_type in: query description: >- Provide what authorization method you want to use, it could be `basic` or `whitelist`. Default is `basic`. `whitelist` only works when param `proxyType` value is `residential_proxies`. schema: type: string enum: - basic - whitelist default: basic - name: username in: query description: >- Provide username for authorization. This param is **required** if param `authType` value is `basic`. schema: type: string - name: password in: query description: >- Provide password for authorization. This param is **required** if param `authType` value is `basic`. schema: type: string - name: session_type in: query description: >- Choose what session type should be used. Choose `sticky` for sticky sessions or `random` for rotating sessions. Default is `sticky`. schema: type: string enum: - sticky - random default: sticky - name: session_time in: query description: >- Session time in minutes, range is 1-1440(inclusive). This param is **required** if param `proxyType` value is `residential_proxies` and param `authType` value is `basic` and param `sessionType` value is `sticky`. Default is 10. schema: type: integer format: int32 default: 10 - name: location in: query description: >- One of available locations in lowercase, could be country Alpha-2 code, city or state name. To get available places, please check _Get endpoints by type_. Default is `random`. schema: type: string default: random - name: output_format in: query description: Output format type. Default is `protocol:auth@endpoint`. schema: type: string enum: - protocol:auth@endpoint - endpoint:auth - auth@endpoint default: protocol:auth@endpoint - name: count in: query description: >- Count of routes that will be generated and returned. Min value is 1, max value depends on param `page` and specific location. Default is 10. schema: type: integer format: int32 default: 10 - name: page in: query description: >- Page of the routes(pagination). Min value is 1, max value depends on param `count` and specific location. Default is 1. schema: type: integer format: int32 default: 1 - name: response_format in: query description: >- What response type will be returned. Could be `json`, `txt` or `html`. Default is `json`. schema: type: string enum: - json - txt - html default: json - name: line_break in: query description: >- What line break will be used in response content. This is **required** if param `responseType` value is `txt`. Default is `\n`. schema: type: string enum: - "\n" - "\r\n" - "\r" ``` -------------------------------- ### Get allocated sub user traffic Source: https://help.decodo.com/api-reference/sub-users/get-allocated-sub-user-traffic Retrieves the allocated traffic limit across all sub-users for a Residential subscription. This endpoint is useful for monitoring and managing traffic usage for your sub-users. ```APIDOC ## GET /v2/allocated-traffic-limit ### Description Get allocated traffic across all of your sub users for Residential subscription ### Method GET ### Endpoint /v2/allocated-traffic-limit ### Parameters #### Query Parameters - **service_type** (string) - Required - Specifies the type of service. Must be 'residential_proxies'. ### Response #### Success Response (200) - **allocated_traffic_limit** (integer) - The total allocated traffic limit in GB for your sub-users. Defaults to 0 if not set. #### Response Example ```json { "allocated_traffic_limit": 728 } ``` #### Error Response (400) - **error_code** (string) - The error code. - **message** (string) - A message describing the error. #### Error Response Example ```json { "error_code": "not_found", "message": "Resource not found" } ``` ``` -------------------------------- ### OpenAPI Specification for Allocated Traffic Limit Source: https://help.decodo.com/api-reference/sub-users/get-allocated-sub-user-traffic This OpenAPI 3.1.0 specification defines the GET `/v2/allocated-traffic-limit` endpoint. It includes details on parameters, responses, and security schemes for managing sub-user traffic limits. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/allocated-traffic-limit: get: tags: - Sub-users summary: Get allocated sub user traffic description: >- Get allocated traffic across all of your sub users for Residential subscription operationId: get-allocated-sub-user-traffic parameters: - name: service_type in: query description: '' schema: type: string enum: - residential_proxies responses: '200': description: '200' content: application/json: examples: Result: value: |- { "allocated_traffic_limit":728 } schema: type: object properties: allocated_traffic_limit: type: integer example: 728 default: 0 '400': description: '400' content: application/json: examples: Result: value: |- { "error_code":"not_found" "message":"Resource not found" } deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization ``` -------------------------------- ### OpenAPI Specification for Adding Whitelisted IPs Source: https://help.decodo.com/api-reference/whitelisted-ips/add-whitelisted-ips This OpenAPI 3.1.0 specification defines the POST /v2/whitelisted-ips endpoint for adding whitelisted IP addresses. It includes request body schema and example responses for success and error cases. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/whitelisted-ips: post: tags: - Whitelisted IPs summary: Add whitelisted IPs description: Whitelist your IPs here for Residential subscription operationId: add-whitelisted-ips requestBody: content: application/json: schema: type: object properties: IPAddressList: type: array items: type: string responses: '200': description: '200' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} '400': description: '400' content: application/json: examples: Result: value: |- { "error_code":"bad_request" "message":"Can not process request" } deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization ``` -------------------------------- ### Sub User Traffic OpenAPI Specification Source: https://help.decodo.com/api-reference/sub-users/get-sub-user-traffic This OpenAPI 3.1.0 specification defines the GET /v2/sub-users/{sub_user_id}/traffic endpoint. It includes details on parameters, request/response schemas, and security. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/sub-users/{sub_user_id}/traffic: get: tags: - Sub-users summary: Get sub user traffic description: Get traffic usage of specified sub user operationId: get-sub-user-traffic parameters: - name: sub_user_id in: path description: '"Get sub users" received sub user ID' schema: type: string required: true - name: type in: query description: >- If custom type is selected you can provide **from** and **to** parameters or leave them empty and then they will have default values, sub-user creation date, and current date respectively. required: true schema: type: string enum: - 24h - 7days - month - custom - name: from in: query description: Use date format yyyy-mm-dd schema: type: string format: date - name: to in: query description: Use date format yyyy-mm-dd schema: type: string format: date - name: service_type in: query description: '' schema: type: string enum: - residential_proxies responses: '200': description: '200' content: application/json: examples: Result: value: |- { "traffic": 4.7, "traffic_rx": 4.2, "traffic_tx": 0.5 } schema: type: object properties: traffic: type: number example: 4.7 default: 0 traffic_rx: type: number example: 4.2 default: 0 traffic_tx: type: number example: 0.5 default: 0 '400': description: '400' content: application/json: examples: Result: value: |- { "error_code":"not_found" "message":"Resource not found" } deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization ``` -------------------------------- ### OpenAPI Specification for Updating a Sub User Source: https://help.decodo.com/api-reference/sub-users/update-sub-user This OpenAPI 3.1.0 specification defines the PUT request for updating a sub-user. It includes parameters for the sub-user ID and a request body for specifying traffic limits, password, auto-disable status, and traffic count start date. It also outlines possible responses, including success (201) and error (400) scenarios. ```yaml openapi: 3.1.0 info: title: Smartproxy version: '1.2' servers: - url: https://api.decodo.com security: - sec0: [] tags: - name: Sub-users description: Manage sub-users for Residential subscription - name: Whitelisted IPs description: Manage whitelisted IPs for Residential subscription - name: Endpoints description: Manage and generate proxy endpoints - name: Subscriptions description: Subscription information paths: /v2/sub-users/{sub_user_id}: put: tags: - Sub-users summary: Update sub user description: Update password or traffic limit of specified sub user operationId: update-sub-user parameters: - name: sub_user_id in: path description: '"Get sub users" received sub user ID' schema: type: integer format: int32 required: true requestBody: content: application/json: schema: type: object properties: traffic_limit: type: number description: Traffic limit format: float auto_disable: type: boolean description: Disables subuser when the traffic limit is hit default: false password: type: string description: >- Must include: 12 or more characters; at least one upper case letter; one lower case letter; one number; one of these symbols `_` `~` `+` `=` (`@` and `:` are not allowed). format: json traffic_count_from: type: string description: >- Handles subuser subscription traffic starting from the specified date. Use date format yyyy-mm-dd hh:mm:ss. format: date status: type: string description: '' enum: - active - disabled responses: '201': description: '201' content: application/json: examples: Result: value: '{}' schema: type: object properties: {} '400': description: '400' content: application/json: examples: Result: value: |- { "error_code": "bad_request", "message": "Can not process request", "error": { "password": "password must be between 9 and 64 characters and must contain at least one number. Symbols @ and : are invalid" } } schema: type: object properties: error_code: type: string example: bad_request message: type: string example: Can not process request error: type: object properties: password: type: string example: >- password must be between 9 and 64 characters and must contain at least one number. Symbols @ and : are invalid deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: Authorization ```