# Action links

## Get links

<mark style="color:blue;">`GET`</mark> `https://mobile.proxy-seller.com/api/v1/modems/{modemId}/links`

This point returns direct links to reboot, get the IP and get the modem status.

**Example**

```
https://mobile.proxy-seller.com/api/v1/modems/63c234098746e15666325bf9f/links
```

**Example with  domainId**

```
https://mobile.proxy-seller.com/api/v1/modems/63c234098746e15666325bf9f/links?domainId=1asdbu1kb23
```

**Path parameters**

<table><thead><tr><th width="267">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>modemId<mark style="color:red;">*</mark></td><td>String</td><td>id  of  modem</td></tr></tbody></table>

**Headers**

<table><thead><tr><th width="371">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization<mark style="color:red;">*</mark></td><td><code>&#x3C;YOUR_API_TOKEN></code></td></tr></tbody></table>

**Query parameters**

<table><thead><tr><th>Name</th><th width="203">Type</th><th>Description</th></tr></thead><tbody><tr><td>domainId</td><td>String</td><td>your costom domain Id</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "reboot": "https://mobile.proxy-seller.com/c/modem/reboot/103790e5f286b193bedd3aee67bff18afb746e",
    "status": "https://mobile.proxy-seller.com/c/modem/status/103790e5f286b193bedd3aee67bff18afb746e",
    "ip": "https://mobile.proxy-seller.com/c/modem/ip/103790e5f286b193bedd3aee67bff18afb746e"
}
```

{% endtab %}

{% tab title="401" %}

```
AUTHORIZATION_FAILED,
IP_AUTHORIZATION_FAILED,
HOST_USER_ID_AND_AUTH_DOES_NOT_MATCH
```

{% endtab %}

{% tab title="404" %}

```
INVALID_MODEM, DOMAIN_NOT_FOUND
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Example  to use  links:&#x20;

```
https://mobile.proxy-seller.com/c/modem/ip/103790e5f286b193bedd3aee67bff18afb746e
```

{% endhint %}

## Client domain

<mark style="color:blue;">`GET`</mark> `https://mobile.proxy-seller.com/api/v1/domains`

This point will return a list of all the domain names you have.

**Example**

```
https://mobile.proxy-seller.com/api/v1/domains
```

**Headers**

<table><thead><tr><th width="371">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization<mark style="color:red;">*</mark></td><td><code>&#x3C;YOUR_API_TOKEN></code></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
[
  {
        "id": "63888a772bd6cd2bc8071515",
        "domain": "mobile.space",
        "useTls": true,
        "approved": true,
        "prioritized": false,
        "linkEnabled": true,
        "prefix": "/custom/"
  }
]
```

{% endtab %}

{% tab title="401" %}

```
AUTHORIZATION_FAILED,
IP_AUTHORIZATION_FAILED
```

{% endtab %}
{% endtabs %}

## Get domain

<mark style="color:blue;">`GET`</mark> `https://mobile.proxy-seller.com/api/v1/domains/{domainId}`

This point will return a list of all the domain names you have.

**Example**

```
https://mobile.proxy-seller.com/api/v1/domains/63888a772bd6cd2bc8071515
```

**Path parameters**

<table><thead><tr><th width="267">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>domainId<mark style="color:red;">*</mark></td><td>String</td><td>id  of  domain</td></tr></tbody></table>

**Headers**

<table><thead><tr><th width="371">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization<mark style="color:red;">*</mark></td><td><code>&#x3C;YOUR_API_TOKEN></code></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
   "id": "63888a772bd6cd2bc8071515",
   "domain": "mobile.space",
   "useTls": false,
   "approved": true,
   "prioritized": false,
   "linkEnabled": true,
   "prefix": "/custom/"
}
```

{% endtab %}

{% tab title="401" %}

```
AUTHORIZATION_FAILED,
IP_AUTHORIZATION_FAILED
```

{% endtab %}

{% tab title="404" %}

```
DOMAIN_NOT_FOUND
```

{% endtab %}
{% endtabs %}

## Create domain

<mark style="color:green;">`POST`</mark> `https://mobile.proxy-seller.com/api/v1/domains`

This request creates your custom domain name.

**Example**

```
https://mobile.proxy-seller.com/api/v1/domains
```

**Headers**

<table><thead><tr><th width="371">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization<mark style="color:red;">*</mark></td><td><code>&#x3C;YOUR_API_TOKEN></code></td></tr></tbody></table>

Request Body

| Name                                          | Type    | Description                                                        |
| --------------------------------------------- | ------- | ------------------------------------------------------------------ |
| domain<mark style="color:red;">\*</mark>      | String  | Domain name  (example.com)                                         |
| useTls<mark style="color:red;">\*</mark>      | Boolean | use TLS or not                                                     |
| linkEnabled<mark style="color:red;">\*</mark> | Boolean | Use custom prefix or not                                           |
| prefix<mark style="color:red;">\*</mark>      | String  | prefix for link after domain (example "/some/prefix/") , not empty |

**Example request body**

```json
{
    "domain": "some.com",
    "useTls": false,
    "linkEnabled": true,
    "prefix": "/some/prefix/"
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "id": "6683a91b19erd56a69f71697",
    "domain": "some.com",
    "useTls": false,
    "approved": false,
    "prioritized": false,
    "linkEnabled": true,
    "prefix": "/some/prefix/"
}

```

{% endtab %}

{% tab title="401" %}

```
AUTHORIZATION_FAILED,
IP_AUTHORIZATION_FAILED
```

{% endtab %}
{% endtabs %}

## Approve domain

<mark style="color:purple;">`PATCH`</mark> `https://mobile.proxy-seller.com/api/v1/domains/{domainId}/approve`

This request performs a verification and validates your domain.

{% hint style="warning" %}
The domain IP must match the proxy server IP
{% endhint %}

**Example**

```
https://mobile.proxy-seller.com/api/v1/domains/6683a91b19erd56a69f71697/approve
```

**Path parameters**

<table><thead><tr><th width="267">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>domainId<mark style="color:red;">*</mark></td><td>String</td><td>id  of  domain</td></tr></tbody></table>

**Headers**

<table><thead><tr><th width="371">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization<mark style="color:red;">*</mark></td><td><code>&#x3C;YOUR_API_TOKEN></code></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
true
```

{% endtab %}

{% tab title="401" %}

```
AUTHORIZATION_FAILED,
IP_AUTHORIZATION_FAILED
```

{% endtab %}

{% tab title="404" %}

```
DOMAIN_NOT_FOUND
```

{% endtab %}
{% endtabs %}

## Edit domain

<mark style="color:purple;">`PUT`</mark> `https://mobile.proxy-seller.com/api/v1/domains/{domainId}`

This request update your custom domain.

**Example**

```
https://mobile.proxy-seller.com/api/v1/domains/6683a91b19erd56a69f71697
```

**Path parameters**

<table><thead><tr><th width="267">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>domainId<mark style="color:red;">*</mark></td><td>String</td><td>id  of  domain</td></tr></tbody></table>

**Headers**

<table><thead><tr><th width="371">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization<mark style="color:red;">*</mark></td><td><code>&#x3C;YOUR_API_TOKEN></code></td></tr></tbody></table>

Request Body

| Name                                          | Type    | Description                                                        |
| --------------------------------------------- | ------- | ------------------------------------------------------------------ |
| useTls<mark style="color:red;">\*</mark>      | Boolean | use TLS or not                                                     |
| linkEnabled<mark style="color:red;">\*</mark> | Boolean | Use custom prefix or not                                           |
| prefix<mark style="color:red;">\*</mark>      | String  | prefix for link after domain (example "/some/prefix/") , not empty |

Example request body:

```json
{
    "useTls": false,
    "linkEnabled": true,
    "prefix": "/some/new/prefix/"
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "id": "6683a91b19erd56a69f716",
    "domain": "some.com",
    "useTls": false,
    "approved": true,
    "prioritized": false,
    "linkEnabled": true,
    "prefix": "/some/new/prefix/"
}

```

{% endtab %}

{% tab title="401" %}

```
AUTHORIZATION_FAILED,
IP_AUTHORIZATION_FAILED
```

{% endtab %}

{% tab title="404" %}

```
DOMAIN_NOT_FOUND
```

{% endtab %}
{% endtabs %}

## Delete domain

<mark style="color:red;">`DELETE`</mark> `https://mobile.proxy-seller.com/api/v1/domains/{domainId}`

This request remove domain.

{% hint style="danger" %}
Be careful it can cause irreversible effects.
{% endhint %}

**Example**

```
https://mobile.proxy-seller.com/api/v1/domains/6683a91b19erd56a69f71697
```

**Path parameters**

<table><thead><tr><th width="267">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>domainId<mark style="color:red;">*</mark></td><td>String</td><td>id  of  domain</td></tr></tbody></table>

**Headers**

<table><thead><tr><th width="371">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization<mark style="color:red;">*</mark></td><td><code>&#x3C;YOUR_API_TOKEN></code></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}
successful answer has no body, the success state is determined by the status 200
{% endtab %}

{% tab title="401" %}

```
AUTHORIZATION_FAILED,
IP_AUTHORIZATION_FAILED
```

{% endtab %}
{% endtabs %}
