API Reference / Memberships
List the caller's pending workspace invitations
Lists the invitations addressed to the caller that have not been accepted or declined, whichever workspace is current, each with the workspace's name and member count and who sent it. There is no user_id request field. The result always means the caller's own invitations.
/ accounts. v1. Accounts/ ListMyInvitationsRequest body
application/jsonRequired
Request for one page of the caller's own pending workspace invitations, oldest first.
cursor?stringOpaque cursor from a previous ListMyInvitationsResponse.next_cursor. Empty for the first page.
filter?InvitationFilterOptional filters applied before pagination. Keep unchanged when continuing with a cursor.
Show attributes
membershipIds?array<string>Only these invited memberships, OR within the field, so an invitation page reads its one invitation. At most 100. Empty includes every pending invitation of the caller.
limit?integerMaximum number of invitations to return, up to 100. Zero uses the default of 100. A larger value is rejected with invalid_argument.
Format"int32"
Response body
application/json
Success
invitations?array<InvitationSummary>The invitations on this page, ordered by creation time then id.
Show attributes
createdAt?stringWhen the invitation was sent.
Format"date-time"
expiresAt?stringWhen the invitation stops being acceptable. An invitation past this time is still listed so the page can say it expired.
Format"date-time"
inviter?ActorSummaryWho sent the invitation. Unset for invitations sent before the inviter was recorded.
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_
membershipId?stringOpaque 16-byte identifier of the invited membership, the id AcceptMembership and DeclineMembership take.
Format"byte" base64
policies?array<string>The policies the invitation grants, as on Membership.policies. Empty means a read-only member.
role?stringThe role the invitation offers.
Value in"MEMBERSHIP_"MEMBERSHIP_"MEMBERSHIP_
workspaceId?stringOpaque 16-byte identifier of the inviting workspace.
Format"byte" base64
workspaceMemberCount?integerNumber of accepted memberships in the workspace at read time, not counting this invitation.
Format"int32"
workspaceName?stringThe workspace's name at read time.
nextCursor?stringCursor to pass as cursor to fetch the next page. Empty when this is the last page.
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 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/ListMyInvitations" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://api.goldmine.to/accounts.v1.Accounts/ListMyInvitations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await res.json();body := strings.NewReader(`{}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/accounts.v1.Accounts/ListMyInvitations", 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/ListMyInvitations",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={},
)
data = res.json(){
"invitations": [
{
"membershipId": "VniQq83vEjRWeBI0VniQqw==",
"workspaceId": "AAECAwQFBgcICQoLDA0ODw==",
"workspaceName": "Northwind Flips",
"workspaceMemberCount": 4,
"role": "MEMBERSHIP_ROLE_MEMBER",
"policies": [
"trading"
],
"inviter": {
"subjectType": "SUBJECT_TYPE_SESSION",
"id": "ICEiIyQlJicoKSorLC0uLw==",
"displayName": "Sam Carter"
},
"createdAt": "2026-11-01T09:00:00Z",
"expiresAt": "2026-11-08T09:00:00Z"
}
]
}{
"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": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}