List All Clients
Retrieve a list of all clients in your workspace with their health scores and metrics.
Your workspace domain (e.g., yourcompany.com)
Request
curl -X GET "https://api.gostanna.com/api/clients?workspaceId=yourcompany.com" \
-H "Authorization: Bearer sk-your-api-key-here"
Response
[
{
"id": "client_123",
"name": "Acme Corp",
"domain": "acme.com",
"sentimentScore": 85,
"lastInteraction": "2024-01-15T10:30:00Z",
"mrr": 5000,
"renewalDate": "2024-06-01",
"csmOwner": "john.doe@yourcompany.com",
"isExcluded": false,
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
]
Response Fields
| Field | Type | Description |
|---|
id | string | Unique client identifier |
name | string | Client company name |
domain | string | Client’s domain |
sentimentScore | number | Health score (0-100) |
lastInteraction | string | ISO 8601 timestamp of last contact |
mrr | number | Monthly recurring revenue |
renewalDate | string | Next renewal date (YYYY-MM-DD) |
csmOwner | string | Assigned CSM email |
isExcluded | boolean | Whether client is excluded from metrics |
Get Client Details
Retrieve detailed information about a specific client.
The client’s unique identifier
Request
curl -X GET "https://api.gostanna.com/api/clients/client_123?workspaceId=yourcompany.com" \
-H "Authorization: Bearer sk-your-api-key-here"
Response
{
"client": {
"id": "client_123",
"name": "Acme Corp",
"domain": "acme.com",
"sentimentScore": 85,
"lastInteraction": "2024-01-15T10:30:00Z",
"mrr": 5000,
"renewalDate": "2024-06-01",
"csmOwner": "john.doe@yourcompany.com",
"isExcluded": false
},
"metrics": {
"totalInteractions": 156,
"avgResponseTime": 2.5,
"lastMonthInteractions": 12,
"sentimentTrend": "improving"
},
"contacts": [
{
"email": "contact@acme.com",
"name": "Jane Smith",
"title": "CEO",
"lastSeen": "2024-01-15T10:30:00Z"
}
]
}
Get Client Interactions
Retrieve interaction history for a specific client.
The client’s unique identifier
Maximum number of interactions to return (default: 50, max: 200)
Number of interactions to skip for pagination (default: 0)
Request
curl -X GET "https://api.gostanna.com/api/clients/client_123/interactions?workspaceId=yourcompany.com&limit=10" \
-H "Authorization: Bearer sk-your-api-key-here"
Response
{
"interactions": [
{
"id": "int_456",
"type": "email",
"subject": "Re: Product Update",
"sentiment": "positive",
"date": "2024-01-15T10:30:00Z",
"from": "contact@acme.com",
"to": "support@yourcompany.com",
"summary": "Client expressed satisfaction with recent updates"
}
],
"pagination": {
"total": 156,
"limit": 10,
"offset": 0,
"hasMore": true
}
}
Get Last Interactions
Get the last interaction timestamp for all clients.
Request
curl -X GET "https://api.gostanna.com/api/clients/last-interactions?workspaceId=yourcompany.com" \
-H "Authorization: Bearer sk-your-api-key-here"
Response
{
"client_123": "2024-01-15T10:30:00Z",
"client_124": "2024-01-14T15:45:00Z",
"client_125": "2024-01-13T08:20:00Z"
}
The response is a map of client IDs to their last interaction timestamps.