API Reference / Workspaces
Fetch multiple workspaces by ID
Returns the workspaces for a list of IDs in a single call, confined to the caller's currently active workspace. A requested ID for any other workspace is reported separately, exactly like an ID that does not match a workspace at all.
/ accounts. v1. Accounts/ GetWorkspacesRequest body
application/jsonRequired
Request for several workspaces by identifier in one call, limited to the caller's workspace.
workspaceIds?array<string>Opaque 16-byte identifiers of the workspaces to fetch, each base64-encoded in JSON.
Response body
application/json
Success
notFoundIds?array<string>Requested identifiers with no workspace visible to the caller, including other customers' workspaces.
workspaces?array<Workspace>The workspaces that exist and are visible to the caller.
Show attributes
createdAt?stringWhen the workspace was created.
Format"date-time"
deletedAt?stringWhen the workspace was soft-deleted. Unset for active workspaces.
Format"date-time"
description?stringFree-form workspace description set by the workspace owner.
getStartedCompletedAt?stringWhen the workspace completed Get started: the first time it had proxies, accounts, a connected market and a contract all at once. Unset until then. Once set it is never cleared.
Format"date-time"
hardDeleteAt?stringWhen a soft-deleted workspace and everything in it is removed permanently. Unset for active workspaces.
Format"date-time"
id?stringOpaque 16-byte workspace identifier, base64-encoded in JSON.
Format"byte" base64
memberCount?integerNumber of accepted memberships in the workspace, computed server-side at read time. Read-only: any value sent by a client is ignored.
Format"int32"
name?stringHuman-readable workspace name.
owner?ActorSummaryThe workspace owner resolved for display at read time. Set only on administrator reads. Unset when the workspace has no accepted owner.
Show attributes
avatarUrl?stringThe user's avatar image URL. Unset for an API key or a user with no avatar.
displayName?stringThe user's name or the API key's name at read time. Empty when the actor no longer exists.
id?stringOpaque 16-byte identifier of the user or API key, base64-encoded in JSON.
Format"byte" base64
subjectType?stringHow the actor authenticated: a user session or an API key.
Value in"SUBJECT_"SUBJECT_"SUBJECT_
ownerEmail?stringThe workspace owner's email. Set only on administrator reads.
updatedAt?stringWhen the workspace was last modified.
Format"date-time"
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/accounts.v1.Accounts/GetWorkspaces" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspaceIds": [
"AAECAwQFBgcICQoLDA0ODw==",
"9HrBC1jMQ3KlZw4CssPUeQ=="
]
}'const res = await fetch("https://api.goldmine.to/accounts.v1.Accounts/GetWorkspaces", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"workspaceIds": [
"AAECAwQFBgcICQoLDA0ODw==",
"9HrBC1jMQ3KlZw4CssPUeQ=="
]
}),
});
const data = await res.json();body := strings.NewReader(`{
"workspaceIds": [
"AAECAwQFBgcICQoLDA0ODw==",
"9HrBC1jMQ3KlZw4CssPUeQ=="
]
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/accounts.v1.Accounts/GetWorkspaces", 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/accounts.v1.Accounts/GetWorkspaces",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"workspaceIds": [
"AAECAwQFBgcICQoLDA0ODw==",
"9HrBC1jMQ3KlZw4CssPUeQ=="
]
},
)
data = res.json(){
"workspaces": [
{
"id": "AAECAwQFBgcICQoLDA0ODw==",
"name": "Acme Trading",
"description": "Primary trading workspace.",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-03-02T14:22:30Z"
}
],
"notFoundIds": [
"9HrBC1jMQ3KlZw4CssPUeQ=="
]
}{
"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."
}