ViewerContext
Identity and organization context for the currently authenticated API client or user. Use this to discover your ownerID (organization slug) before creating resources.
type ViewerContext {
subjectID: String!
organizationIDs: [String!]!
primaryOrganizationID: String!
organizations: [OrganizationInfo!]!
}
Fields
ViewerContext.subjectID ● String! non-null scalar
Unique identifier of the authenticated subject (user ID or service account ID)
ViewerContext.organizationIDs ● [String!]! non-null scalar
Organization slug(s) this client belongs to. Use the first value as ownerID when creating strategies, bots, exchanges, etc.
ViewerContext.primaryOrganizationID ● String! non-null scalar
The primary organization slug for this client. Equivalent to organizationIDs[0]. Use this as ownerID in createStrategy, createBot, createExchange, and other mutations.
ViewerContext.organizations ● [OrganizationInfo!]! non-null object
Full organization details (id + title) for each organization this client belongs to. Useful when the caller needs to display organization names, not just slugs.
Returned By
viewer query