> For the complete documentation index, see [llms.txt](https://texau.gitbook.io/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://texau.gitbook.io/api-docs/reference/api-reference/proxies.md).

# Proxies

## Add a proxy

Use this API to add a proxy to your account.

## POST /api/v1/public/proxies

>

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateProxyDto":{"type":"object","properties":{"name":{"type":"string","description":"The proxy name"},"credentials":{"$ref":"#/components/schemas/credentials"}},"required":["name","credentials"]},"credentials":{"type":"object","properties":{"ip":{"type":"string","description":"The ip"},"port":{"type":"string","description":"The port"},"username":{"type":"string","description":"The username"},"password":{"type":"string","description":"The password"}},"required":["ip","port","username","password"]},"AddProxyDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/AddProxy"}},"required":["success","message","data"]},"AddProxy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"$ref":"#/components/schemas/Location"},"credentials":{"$ref":"#/components/schemas/ProxyCredentials"},"type":{"type":"string"}},"required":["id","name","location","credentials","type"]},"Location":{"type":"object","properties":{"city":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"countryCode":{"type":"string"}},"required":["city","region","country","countryCode"]},"ProxyCredentials":{"type":"object","properties":{"ip":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}},"required":["ip","port","username","password"]}}},"paths":{"/api/v1/public/proxies":{"post":{"operationId":"ApiController_addProxy","parameters":[{"name":"X-TexAu-Context","in":"header","description":"Pass orgUserId and workspaceId as ‘{\"orgUserId\":\"123\",\"workspaceId\":\"123\"}’","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProxyDto"}}}},"responses":{"201":{"description":"Proxy added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProxyDto"}}}},"401":{"description":"Unauthorized access"},"403":{"description":"Your plan does not have API access"},"406":{"description":"Proxy not supported by TexAu"},"422":{"description":"Requested workspace does not belongs to you"},"500":{"description":"Error occurred in adding proxy"}},"tags":["API Service"]}}}}
```

### Buy a proxy

Use this API to buy a proxy for connected account.

## POST /api/v1/public/proxies/buy

>

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"BuyDto":{"type":"object","properties":{"connectedAccountId":{"type":"string"}},"required":["connectedAccountId"]},"AddProxyDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/AddProxy"}},"required":["success","message","data"]},"AddProxy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"$ref":"#/components/schemas/Location"},"credentials":{"$ref":"#/components/schemas/ProxyCredentials"},"type":{"type":"string"}},"required":["id","name","location","credentials","type"]},"Location":{"type":"object","properties":{"city":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"countryCode":{"type":"string"}},"required":["city","region","country","countryCode"]},"ProxyCredentials":{"type":"object","properties":{"ip":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}},"required":["ip","port","username","password"]}}},"paths":{"/api/v1/public/proxies/buy":{"post":{"operationId":"ApiController_orderProxy","parameters":[{"name":"X-TexAu-Context","in":"header","description":"Pass orgUserId and workspaceId as ‘{\"orgUserId\":\"123\",\"workspaceId\":\"123\"}’","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyDto"}}}},"responses":{"201":{"description":"Proxy purchased successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProxyDto"}}}},"401":{"description":"Unauthorized access"},"403":{"description":"Your plan does not have API access"},"422":{"description":"Requested workspace does not belongs to you"},"500":{"description":"Error occurred in purchasing proxy"}},"tags":["API Service"]}}}}
```

## Update a proxy

Use this API to update proxy credentials, in case it gets expired or updated from provider

## PUT /api/v1/public/proxies/{proxyId}

>

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"UpdateProxyDto":{"type":"object","properties":{"name":{"type":"string","description":"The proxy name"},"credentials":{"$ref":"#/components/schemas/credentials"}}},"credentials":{"type":"object","properties":{"ip":{"type":"string","description":"The ip"},"port":{"type":"string","description":"The port"},"username":{"type":"string","description":"The username"},"password":{"type":"string","description":"The password"}},"required":["ip","port","username","password"]},"ProxyUpdateDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateProxy"}},"required":["success","message","data"]},"UpdateProxy":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"paths":{"/api/v1/public/proxies/{proxyId}":{"put":{"operationId":"ApiController_updateProxy","parameters":[{"name":"X-TexAu-Context","in":"header","description":"Pass orgUserId and workspaceId as ‘{\"orgUserId\":\"123\",\"workspaceId\":\"123\"}’","required":true,"schema":{"type":"string"}},{"name":"proxyId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProxyDto"}}}},"responses":{"200":{"description":"Proxy update successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyUpdateDto"}}}},"401":{"description":"Unauthorized access"},"403":{"description":"Your plan does not have API access"},"404":{"description":"Proxy does not exist"},"406":{"description":"Proxy not supported by TexAu"},"422":{"description":"Requested workspace does not belongs to you"},"500":{"description":"Error occurred while updating the proxy"}},"tags":["API Service"]}}}}
```

## List all proxies

This API will be used for listing all proxies of your account by their name

## GET /api/v1/public/proxies

>

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetProxyDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"total":{"type":"number"},"data":{"description":"Array of proxy data","type":"array","items":{"$ref":"#/components/schemas/ProxyData"}}},"required":["success","message","total","data"]},"ProxyData":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isUsable":{"type":"boolean"}},"required":["id","name","isUsable"]}}},"paths":{"/api/v1/public/proxies":{"get":{"operationId":"ApiController_getAllProxies","parameters":[{"name":"X-TexAu-Context","in":"header","description":"Pass orgUserId and workspaceId as ‘{\"orgUserId\":\"123\",\"workspaceId\":\"123\"}’","required":true,"schema":{"type":"string"}},{"name":"start","required":false,"in":"query","description":"The page No","schema":{"minimum":0,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"The Page Size","schema":{"minimum":1,"maximum":50,"type":"number"}}],"responses":{"200":{"description":"Proxies fetch successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProxyDto"}}}},"401":{"description":"Unauthorized access"},"403":{"description":"Your plan does not have API access"},"404":{"description":"Proxy does not exist"},"422":{"description":"Requested workspace does not belongs to you"},"500":{"description":"Error in fetching proxies"}},"tags":["API Service"]}}}}
```

## Get proxy by ID

This API will be used to get `location` and `credentials` of proxy by ID

## GET /api/v1/public/proxies/{proxyId}

>

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"GetProxyByIdDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/ProxyByIdData"}},"required":["success","message","data"]},"ProxyByIdData":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"isUsable":{"type":"boolean"},"credentials":{"$ref":"#/components/schemas/ProxyCredentials"},"location":{"$ref":"#/components/schemas/Location"}},"required":["id","name","isUsable","credentials","location"]},"ProxyCredentials":{"type":"object","properties":{"ip":{"type":"string"},"port":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}},"required":["ip","port","username","password"]},"Location":{"type":"object","properties":{"city":{"type":"string"},"region":{"type":"string"},"country":{"type":"string"},"countryCode":{"type":"string"}},"required":["city","region","country","countryCode"]}}},"paths":{"/api/v1/public/proxies/{proxyId}":{"get":{"operationId":"ApiController_getProxyById","parameters":[{"name":"X-TexAu-Context","in":"header","description":"Pass orgUserId and workspaceId as ‘{\"orgUserId\":\"123\",\"workspaceId\":\"123\"}’","required":true,"schema":{"type":"string"}},{"name":"proxyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Proxies fetch successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProxyByIdDto"}}}},"401":{"description":"Unauthorized access"},"403":{"description":"Your plan does not have API access"},"404":{"description":"Proxy does not exist"},"422":{"description":"Requested workspace does not belongs to you"},"500":{"description":"Error in fetching proxies"}},"tags":["API Service"]}}}}
```

## Delete proxy by ID

This API will be used to delete proxy from your TexAu account

## DELETE /api/v1/public/proxies/{proxyId}

>

```json
{"openapi":"3.0.0","info":{"title":"TexAu APIs","version":"1.0"},"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"DeleteProxyDto":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}},"paths":{"/api/v1/public/proxies/{proxyId}":{"delete":{"operationId":"ApiController_deleteProxyById","parameters":[{"name":"X-TexAu-Context","in":"header","description":"Pass orgUserId and workspaceId as ‘{\"orgUserId\":\"123\",\"workspaceId\":\"123\"}’","required":true,"schema":{"type":"string"}},{"name":"proxyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Proxy deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProxyDto"}}}},"401":{"description":"Unauthorized access"},"403":{"description":"Your plan does not have API access"},"404":{"description":"Proxy does not exist"},"412":{"description":"Proxy in use, cannot be deleted"},"422":{"description":"Requested workspace does not belongs to you"},"500":{"description":"Error in deleting proxy"}},"tags":["API Service"]}}}}
```
