API Reference / Proxy assignments
Create many proxy assignments
Binds many accounts to proxy sessions in one call. Each row is committed independently and the response reports per-row success or a typed error, so one bad row does not fail the whole batch. The operation is idempotent per account: a row whose account is already bound to the same pool converges on the existing assignment as a no-op success, while a row whose account is already bound to a different pool reports ALREADY_EXISTS.
/ proxies. v1. Proxies/ BulkCreateAssignmentRequest body
application/jsonRequired
Request to create many proxy assignments in one call, up to 10000. Each input succeeds or fails on its own.
assignments?array<BulkCreateAssignmentInput>The assignments to create, at most 10000. More is rejected with invalid_argument.
Show attributes
accountName?stringSteam account name to bind. Surrounding whitespace is trimmed.
pinned?booleanTrue keeps the account on this session. It is never rotated automatically.
poolId?stringOpaque 16-byte identifier of the pool, base64-encoded in JSON.
Format"byte" base64
sessionIdstringOpaque 16-byte identifier of the session to bind, base64-encoded in JSON. Required, and must belong to the pool.
Format"byte" base64
Response body
application/json
Success
results?array<BulkCreateAssignmentResult>The outcome of each input, in request order.
Show attributes
assignmentId?stringOpaque 16-byte identifier of the assignment created for this input, base64-encoded in JSON. Set when the input succeeded.
Format"byte" base64
error?BulkCreateAssignmentErrorWhy this input failed. Set when it failed. Other inputs are unaffected.
Show attributes
code?stringThe kind of failure: the account is already assigned, the input is invalid, the session or pool does not exist, or an internal error.
Value in"BULK_"BULK_"BULK_"BULK_"BULK_
message?stringHuman-readable detail of the failure.
application/json
The request was malformed, such as a missing required field or an unparseable cursor. The request cannot be carried out in the current system state.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The service is temporarily unavailable. Retry with backoff.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/proxies.v1.Proxies/BulkCreateAssignment" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"assignments": [
{
"poolId": "AY+MISIifMyN3T09PT09PQ==",
"sessionId": "AY+MIjMzfu6P/05OTk5OTg==",
"accountName": "steam_bot_01",
"pinned": true
},
{
"poolId": "AY+MISIifMyN3T09PT09PQ==",
"sessionId": "AY+MIkREeqqLu19fX19fXw==",
"accountName": "steam_bot_02"
}
]
}'const res = await fetch("https://api.goldmine.to/proxies.v1.Proxies/BulkCreateAssignment", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"assignments": [
{
"poolId": "AY+MISIifMyN3T09PT09PQ==",
"sessionId": "AY+MIjMzfu6P/05OTk5OTg==",
"accountName": "steam_bot_01",
"pinned": true
},
{
"poolId": "AY+MISIifMyN3T09PT09PQ==",
"sessionId": "AY+MIkREeqqLu19fX19fXw==",
"accountName": "steam_bot_02"
}
]
}),
});
const data = await res.json();body := strings.NewReader(`{
"assignments": [
{
"poolId": "AY+MISIifMyN3T09PT09PQ==",
"sessionId": "AY+MIjMzfu6P/05OTk5OTg==",
"accountName": "steam_bot_01",
"pinned": true
},
{
"poolId": "AY+MISIifMyN3T09PT09PQ==",
"sessionId": "AY+MIkREeqqLu19fX19fXw==",
"accountName": "steam_bot_02"
}
]
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/proxies.v1.Proxies/BulkCreateAssignment", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/proxies.v1.Proxies/BulkCreateAssignment",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"assignments": [
{
"poolId": "AY+MISIifMyN3T09PT09PQ==",
"sessionId": "AY+MIjMzfu6P/05OTk5OTg==",
"accountName": "steam_bot_01",
"pinned": true
},
{
"poolId": "AY+MISIifMyN3T09PT09PQ==",
"sessionId": "AY+MIkREeqqLu19fX19fXw==",
"accountName": "steam_bot_02"
}
]
},
)
data = res.json(){
"results": [
{
"assignmentId": "AY+MI0REf/+Kql9fX19fXw=="
},
{
"error": {
"code": "BULK_CREATE_ASSIGNMENT_ERROR_CODE_ALREADY_EXISTS",
"message": "assignment already exists for this pool and account"
}
}
]
}{
"code": "failed_precondition",
"message": "The request cannot be carried out in the current system state."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}{
"code": "unavailable",
"message": "The service is temporarily unavailable. Retry with backoff."
}