Skip to content

Batch set profile proxy

Request

Bind a proxy to multiple browser profiles.

  • Preconditions: provide at least one of envIds or uniqueIds. A supplied proxyId must already exist in the team, otherwise the call is rejected rather than creating one.
  • Effect: writes proxyId on each profile. When proxyId is omitted or 0, an existing proxy with identical connection details is reused, and if none matches a new proxy record is created in the calling team.
  • Completion: synchronous. Running browsers keep the proxy they started with.
  • Retry: rebinding the same proxyId is idempotent, but repeating a call that carries raw connection details can create another proxy record each time deduplication misses.

Documented business errors: 19106, 19193, 14023. See Error Codes for what each code means. Any operation can additionally return the common codes.

Security
OpenApiBearer
Bodyapplication/jsonrequired
envIdsArray of strings

Profile IDs.

uniqueIdsArray of integers, (int32)

Profile sequence numbers.

Example:
[ 1001 ]
proxyobject(ProxyInput)

Proxy connection details. When proxyId refers to an existing proxy, that proxy is reused; otherwise a new proxy is created from these fields.

curl -i -X POST \
  https://api.morelogin.com/env/setProxy/batch \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "envIds": [
      "1800000000000001"
    ],
    "proxy": {
      "proxyIp": "127.0.0.1",
      "proxyPort": 1080,
      "proxyType": 2,
      "proxyProvider": 0,
      "username": "user",
      "password": "pass"
    }
  }'

Responses

Success

Bodyapplication/json
codeintegerrequired

Return result code. 0 means success; other codes indicate exceptions.

Example:0
msgstring or nullrequired

Error message. Usually null on success.

Example:null
requestIdstring

Operation request ID. This field may be present when the request passes through the API gateway.

Example:"1d4f3ea968664593860b94b35d4ebf5e"
databooleanrequired

Whether the batch operation succeeded.

Example:true
Response
{ "code": 0, "msg": null, "requestId": "1d4f3ea968664593860b94b35d4ebf5e", "data": true }