How to Work with API Reference

In this section, we will explore examples of interaction and how to use parameters in APIs

All data used in this example are placeholders and meant for demonstration purposes only. When working with the API, always use your own valid data.

PATCH https://mobile.proxy-seller.com/api/v1/hosts/{hostId}/changeName

Take a closer look

PATCH - indicates the method used for the query

{hostId} - indicates the variable to be replaced with its valid value.

Example:

https://mobile.proxy-seller.com/api/v1/hosts/21vjv1224n45v7457mvcas/changeName

Queries can have different set and type of parameters see figure below

All mandatory parameters are marked with an asterisk (*)

Let's consider an example of use in several programming languages

curl -X PATCH \
  -H "Content-Type: application/json" \
  -H "Authorization: YOUR_API_KEY" \
  -d '{"name":"Host new name"}' \
  "https://mobile.proxy-seller.com/api/v1/hosts/ID_OF_SOME_HOST/changeName"

Response examples by HTTP status code. A '200' indicates success, while '4XX' codes indicate errors.

Response

{
    "id": "21vjv1224n45v7457mvcas",
    "name": "Host new name",
    "number": "101"
}

Last updated