Skip to main content
POST
/
v1
/
graph
/
nodes
Add service
curl --request POST \
  --url https://api.example.com/v1/graph/nodes \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "type": "<string>",
  "team": "<string>",
  "criticality": 123
}
'

Overview

Adds a service node to your tenant’s infrastructure topology graph. The topology graph is used by CauseFlow AI during investigations to understand service ownership, calculate blast radius, and trace failure propagation paths. Required role: admin or member

Request body

name
string
required
The service name. Must be unique within your tenant. Use the canonical name as it appears in your monitoring tools and deployment pipelines (e.g. checkout-service, prod-db-01).
type
string
required
The service category. One of: api, worker, database, cache, queue.
ValueDescription
apiHTTP/gRPC API service
workerBackground job processor or async consumer
databaseRelational or document database
cacheIn-memory cache (Redis, Memcached, etc.)
queueMessage queue or event stream (Kafka, SQS, RabbitMQ)
team
string
The team that owns this service. Used to route incident notifications and displayed in the topology view. Example: payments, platform, data-eng.
criticality
integer
Business criticality on a scale of 1 (lowest) to 10 (highest). Used to prioritize investigation and escalation. Services with criticality 810 trigger immediate on-call alerts.

Response

Returns 201 Created with the newly created service node.
{
  "serviceId": "svc_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "name": "checkout-service",
  "type": "api",
  "team": "payments",
  "criticality": 9,
  "createdAt": "2024-04-01T10:00:00Z"
}
FieldTypeDescription
serviceIdstringUnique identifier for the service node
namestringService name as provided
typestringService category
teamstringOwning team. null if not provided
criticalityintegerCriticality score. Defaults to 5 if not provided
createdAtstringISO 8601 timestamp when the node was created

Error responses

StatusError codeDescription
400validation_errorname or type is missing, or type is not a valid value
409conflictA service with the given name already exists in your tenant

Examples

curl https://api.causeflow.ai/v1/graph/nodes \
  -X POST \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "checkout-service",
    "type": "api",
    "team": "payments",
    "criticality": 9
  }'