API Reference / Steam accounts
Set the workspace's Steam Web API key
Upsert the workspace-tier Steam Web API key shared by every account in the workspace, the second tier of the key resolution hierarchy. The key is returned only by RevealWorkspaceAPIKey, which is recorded for the audit log. Every set or replacement is recorded too, with the mask and never the key.
/ steam. v1. Steam/ SetWorkspaceAPIKeyRequest body
application/jsonRequired
Request to set or replace the workspace-tier Steam Web API key shared by every account in the workspace that has no key of its own.
apiKeystringThe workspace-tier Steam Web API key. Upserts in place, so a repeat call rotates the key.
Response body
application/json
Success
No fields.
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
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.
curl -X POST "https://api.goldmine.to/steam.v1.Steam/SetWorkspaceAPIKey" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"apiKey": "1A2B3C4D5E6F7890ABCDEF1234567890"
}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/SetWorkspaceAPIKey", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"apiKey": "1A2B3C4D5E6F7890ABCDEF1234567890"
}),
});
const data = await res.json();body := strings.NewReader(`{
"apiKey": "1A2B3C4D5E6F7890ABCDEF1234567890"
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/SetWorkspaceAPIKey", 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/steam.v1.Steam/SetWorkspaceAPIKey",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"apiKey": "1A2B3C4D5E6F7890ABCDEF1234567890"
},
)
data = res.json(){}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"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."
}