API Reference
Integrate askMyAgency directly into your applications.
Authentication
All API requests require authentication using a Bearer token.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.askmyagency.com/v1/insightsEndpoints
Get Insights
Retrieve AI-generated insights for your agency.
GET /v1/insightsResponse:
{
"insights": [
{
"id": "ins_123",
"type": "churn_risk",
"subAccountId": "sa_456",
"score": 0.85,
"message": "High churn risk detected",
"createdAt": "2024-01-15T10:30:00Z"
}
]
}Get Sub-Accounts
List all connected sub-accounts.
GET /v1/sub-accountsResponse:
{
"subAccounts": [
{
"id": "sa_456",
"name": "Acme Corp",
"status": "active",
"contactCount": 1250,
"healthScore": 92
}
]
}Rate Limits
- Standard tier: 100 requests/minute
- Pro tier: 1,000 requests/minute
- Enterprise: Custom limits
Error Codes
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Last updated on