Developers / Playground

API explorer

Run operations against the live schema for your workspace.

Operation
Response —
Run an operation to see the response.

Endpoint

URL
POST /graphql
Content-Type
application/json
Auth
session cookie
Introspection
enabled
Docs
/docs

Schema

SDL
# Helio Customer Data Platform - GraphQL schema
# Introspection and the explorer are served from this schema.

scalar Boolean   # Built-in Boolean
scalar DateTime   # ISO-8601 timestamp.
scalar Float   # Built-in Float
scalar ID   # Built-in ID
scalar Int   # Built-in Int
scalar JSON   # Opaque JSON payload, serialised as a string.
scalar String   # Built-in String

type Query {
  viewer: User   """The authenticated user."""
  workspaces(limit: Int = 100): [Workspace!]   """Workspaces visible to the caller."""
  myWorkspaces: [Workspace!]   """Workspaces the caller is a member of."""
  workspace(id: ID!): Workspace
  node(id: ID!): Node   """Fetch any addressable object by ID."""
  contacts(limit: Int = 100, offset: Int = 0): [Contact!]
  contact(id: ID!): Contact
  company(id: ID!): Company
  segment(id: ID!): Segment
  event(id: ID!): Event
  campaign(id: ID!): Campaign
  me: [Member!]   """Memberships belonging to the caller."""
  segments: [Segment!]   """Saved audience filters."""
  campaigns: [Campaign!]   """Messaging campaigns."""
  events(limit: Int = 50, offset: Int = 0): [Event!]
  workspaceStats(id: ID!): WorkspaceStats   """Aggregate counters for one workspace."""
  schemaStats: String @deprecated(reason: "Use the admin metrics dashboard instead.")   """Operational counters."""
}

type Mutation {
  createWorkspace(input: WorkspaceInput!): Workspace
  updateWorkspace(id: ID!, input: WorkspaceInput!): Workspace
  createContact(input: ContactInput!): Contact
  updateContact(id: ID!, input: ContactInput!): Contact
  updateProfile(input: ProfileInput!): User
  deleteContact(id: ID!): Boolean!
  updateDealStage(companyId: ID!, stage: String!): Company
  archiveContacts(ids: [ID!]!): Int!
  sendCampaign(id: ID!): Campaign
  exportWorkspace(id: ID!): ExportPayload
  billingDetails(id: ID!): BillingDetails
  workspaceApiKeys(workspaceId: ID!): [ApiKey!]
  regenerateApiKey(workspaceId: ID!): ApiKey
}

type Contact {
  id: ID!   """Unique identifier."""
  email: String!
  firstName: String
  lastName: String
  fullName: String!
  phone: String
  lifecycleStage: String
  verified: Boolean!
  createdAt: DateTime!
  ssn: String   """Government identifier. Restricted to workspace admins."""
  mrr: Int   """Monthly recurring revenue attributed to this contact."""
  churnScore: Int   """0-100 propensity to churn."""
  internalNotes: String   """Free-form notes visible to the owning team only."""
  debugInfo: String @deprecated(reason: "Use importStatus instead.")   """Raw import diagnostics."""
  company: Company
  owner: User
  events: [Event!]
  workspace: Workspace
}

type Company {
  id: ID!
  name: String!
  domain: String
  industry: String
  employeeCount: Int!
  stage: String!
  createdAt: DateTime!
  mrr: Int   """Contracted MRR. Finance-visible field."""
  churnScore: Int   """0-100 churn propensity."""
  owner: User
  contacts: [Contact!]
  workspace: Workspace
}

type Segment {
  id: ID!
  name: String!
  definition: String
  contactCount: Int!
  createdAt: DateTime!
  contacts: [Contact!]
  workspace: Workspace
}

type Event {
  id: ID!
  type: String!
  userAgent: String
  ipAddress: String   """Client IP captured at ingest."""
  properties: JSON
  occurredAt: DateTime!
  contact: Contact
  workspace: Workspace
}

type Campaign {
  id: ID!
  name: String!
  status: String!
  sentCount: Int!
  openRate: Int!
  createdAt: DateTime!
  segment: Segment
  workspace: Workspace
}

type ApiKey {
  id: ID!
  label: String!
  prefix: String!
  environment: String!
  lastUsed: DateTime
  createdAt: DateTime!
  secret: String   """Full API key. Shown once at creation, never again."""
  workspace: Workspace
}

type Member {
  id: ID!
  role: String!
  createdAt: DateTime!
  user: User
  workspace: Workspace
}

type User {
  id: ID!
  name: String!
  email: String!
  title: String
  role: String!   """Platform role for this user."""
  createdAt: DateTime!
  memberships: [Member!]
}

type Workspace {
  id: ID!
  name: String!
  slug: String!
  plan: String!
  seats: Int!
  region: String!
  createdAt: DateTime!
  monthlyEventQuota: Int   """Contracted quota."""
  internalNotes: String @deprecated(reason: "Renamed to billingNote.")   """Billing context."""
  owner: User
  members: [Member!]
  apiKeys: [ApiKey!]
  contacts: [Contact!]
  companies: [Company!]
  segments: [Segment!]
  campaigns: [Campaign!]
  recentEvents: [Event!]
  contactCount: Int!
  companyCount: Int!
}

type ExportPayload {
  workspaceId: ID!
  workspaceName: String!
  recordCount: Int!
  csv: String!   """Base64 CSV of every contact row."""
  requestedAt: DateTime!
}

type WorkspaceStats {
  workspaceId: ID!
  name: String!
  slug: String!
  plan: String!
  contacts: Int!
  companies: Int!
  segments: Int!
  campaigns: Int!
  events7d: Int!
  attributedMrr: Int!
  quota: Int!
  members: Int!
}

type BillingDetails {
  workspaceId: ID!
  plan: String!
  seats: Int!
  cardLast4: String
  billingEmail: String
  renewalDate: DateTime!
}

interface Node {
  id: ID!
}

input ContactInput {
  email: String
  firstName: String
  lastName: String
  phone: String
  lifecycleStage: String
  ssn: String
  mrr: Int
  churnScore: Int
  verified: Boolean
  internalNotes: String
  companyId: ID
  ownerId: ID
  workspaceId: ID
}

input ProfileInput {
  name: String
  title: String
  email: String
  role: String
}

input WorkspaceInput {
  name: String
  plan: String
  seats: Int
  region: String
  monthlyEventQuota: Int
}