Reference
GraphQL API
The GraphQL API provides a flexible, typed interface for querying and mutating WorkFlows resources. Request exactly the fields you need with a single endpoint.
Coming Soon
The GraphQL API is currently in development and will be available in an upcoming release. The schema below represents the planned API design. In the meantime, use the REST API for full programmatic access to WorkFlows.
Endpoint
GraphQL Endpoint
POST https://www.workflows.com.es/api/graphql
Headers:
Authorization: Bearer wf_live_your_key
Content-Type: application/jsonExample Query
GraphQL
query GetProjectAlerts($projectId: ID!) {
project(id: $projectId) {
id
name
area
}
alerts(filter: { projectId: $projectId, status: ACTIVE }) {
id
title
severity
createdAt
}
}
# Variables
{
"projectId": "proj_xxx"
}Response
{
"data": {
"project": {
"id": "proj_xxx",
"name": "Supply Chain Q1",
"area": "Logistics"
},
"alerts": [
{
"id": "alert_abc",
"title": "Low inventory: Raw Material A",
"severity": "CRITICAL",
"createdAt": "2026-06-10T14:30:00Z"
}
]
}
}Example Mutation
GraphQL
mutation AskQuestion {
askAI(input: {
message: "What were the top 5 suppliers by delivery delay in Q1?"
projectId: "proj_xxx"
}) {
answer
tokens
model
}
}Schema Reference
Query
| Field | Type | Description |
|---|---|---|
| projects | [Project!]! | List all projects in the organization |
| project(id: ID!) | Project | Get a project by ID |
| alerts | [Alert!]! | List alerts with optional filters |
| alert(id: ID!) | Alert | Get an alert by ID |
| connections | [Connection!]! | List database connections |
| history | [QueryRecord!]! | List query history |
| users | [User!]! | List organization members |
| usage | UsageStats! | Get current usage statistics |
Mutation
| Field | Type | Description |
|---|---|---|
| createProject(input: CreateProjectInput!) | Project! | Create a new project |
| updateProject(id: ID!, input: UpdateProjectInput!) | Project! | Update a project |
| deleteProject(id: ID!) | Boolean! | Delete a project |
| createAlert(input: CreateAlertInput!) | Alert! | Create a new alert |
| resolveAlert(id: ID!) | Alert! | Mark an alert as resolved |
| askAI(input: AskInput!) | AIResponse! | Send a natural language query |
| createWebhook(input: CreateWebhookInput!) | Webhook! | Register a webhook |
Subscription
| Field | Type | Description |
|---|---|---|
| alertCreated | Alert! | New alert created in the organization |
| alertResolved | Alert! | An alert was resolved |
| queryCompleted(projectId: ID) | QueryRecord! | AI query completed |
Core Types
Project
Schema
type Project {
id: ID!
name: String!
area: String
description: String
createdAt: DateTime!
updatedAt: DateTime!
}Alert
Schema
type Alert {
id: ID!
title: String!
severity: AlertSeverity!
status: AlertStatus!
projectId: ID!
area: String
value: String
threshold: String
createdAt: DateTime!
}Connection
Schema
type Connection {
id: ID!
name: String!
dbType: ConnectionType!
status: ConnectionStatus!
}AIResponse
Schema
type AIResponse {
answer: String!
tokens: Int!
model: String!
projectId: ID!
}