API Reference
Connect SendGoal with AI assistants, build custom dashboards, or automate KPI tracking via REST API and MCP.
Authentication
All API requests require a Bearer token. Create one at Settings → API Keys.
Include it in the Authorization header:
httpAuthorization: Bearer sk_live_your_key_hereREST API
Base URL: https://sendgoal.com/api/v1
/api/v1/kpis#Returns all KPIs for the authenticated user, with the latest value for each.
Query Parameters
workspace_idFilter KPIs by workspace.
Response
json{
"kpis": [
{
"id": "uuid",
"name": "Monthly Revenue",
"description": "Total monthly recurring revenue",
"unit": "$",
"unit_type": "currency",
"frequency": "monthly",
"target_value": 100000,
"target_date": "2027-12-31",
"positive_direction": "up",
"tags": ["Finance"],
"agent_email": "kpi-abc123@sendgoal.cc",
"is_active": true,
"latest_value": 47500,
"latest_date": "2026-09-01",
"created_at": "2026-08-15T10:00:00Z",
"updated_at": "2026-09-22T14:30:00Z"
}
]
}Example
bashcurl https://sendgoal.com/api/v1/kpis \
-H "Authorization: Bearer sk_live_your_key_here"/api/v1/kpis/:id#Returns a single KPI with its full data history.
Path Parameters
idThe KPI ID.
Query Parameters
limitMax data points to return. Default: 100.
Response
json{
"kpi": {
"id": "uuid",
"name": "Monthly Revenue",
"unit": "$",
"frequency": "monthly",
"target_value": 100000,
...
},
"data": [
{ "value": 47500, "date": "2026-09-01", "note": null, "source": "api" },
{ "value": 42000, "date": "2026-08-01", "note": "Q3 push", "source": "email" }
]
}Example
bashcurl https://sendgoal.com/api/v1/kpis/YOUR_KPI_ID \
-H "Authorization: Bearer sk_live_your_key_here"/api/v1/kpis/:id/data#Returns only the data points for a KPI (without metadata).
Path Parameters
idThe KPI ID.
Query Parameters
limitMax data points. Default: 100.
Response
json{
"data": [
{ "value": 47500, "date": "2026-09-01", "note": null, "source": "api", "created_at": "..." },
{ "value": 42000, "date": "2026-08-01", "note": "Q3 push", "source": "email", "created_at": "..." }
]
}/api/v1/kpis/:id/data#Log a new data point for a KPI. If a value already exists for the same date, it will be updated (upsert).
Path Parameters
idThe KPI ID.
Request Body
valueThe numeric value to log.
dateDate in YYYY-MM-DD format. Defaults to today.
noteOptional note about this data point.
Response
json{
"data": {
"value": 47500,
"date": "2026-09-01",
"note": "September close",
"source": "api",
"created_at": "2026-09-26T14:30:00Z"
}
}Example
bashcurl -X POST https://sendgoal.com/api/v1/kpis/YOUR_KPI_ID/data \
-H "Authorization: Bearer sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"value": 47500, "date": "2026-09-01", "note": "September close"}'MCP Server
SendGoal exposes an MCP (Model Context Protocol) server that AI assistants can connect to directly. This enables natural-language interaction with your KPIs.
Endpoint
https://sendgoal.com/mcp
Configuration
Add to your MCP client config (Claude Desktop, OpenClaw, Cursor, etc.):
json{
"mcpServers": {
"sendgoal": {
"url": "https://sendgoal.com/mcp",
"headers": {
"Authorization": "Bearer sk_live_your_key_here"
}
}
}
}You can also pass the token as a query parameter: https://sendgoal.com/mcp?token=sk_live_...
MCP Tools
list_kpis
List all your KPIs with their latest values. No parameters required.
“Show me all my KPIs” · “What are my current metrics?”
get_kpi
Get a specific KPI with its historical data points.
kpi_idThe UUID of the KPI.
limitMax data points to return. Default: 50.
“Show me the Monthly Revenue KPI details” · “What's the trend for user signups?”
log_kpi_value
Log a new data point for a KPI. If no date is provided, uses today.
kpi_idThe UUID of the KPI.
valueThe numeric value to log.
dateDate in YYYY-MM-DD format. Defaults to today.
noteOptional note about this data point.
“Log 47,500 to Monthly Revenue” · “Update NPS to 72 for September”
search_kpis
Search KPIs by name or tag.
querySearch term to match against KPI names and tags.
“Find my revenue KPIs” · “Search for anything tagged Finance”
Error Codes
401UnauthorizedMissing or invalid API key.403ForbiddenAPI key lacks required scope (read or write).404Not FoundKPI does not exist or you don't have access.400Bad RequestMissing required fields (e.g. value for log).500Server ErrorSomething went wrong on our end.