Skip to Content
API Reference

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/insights

Endpoints

Get Insights

Retrieve AI-generated insights for your agency.

GET /v1/insights

Response:

{ "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-accounts

Response:

{ "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

CodeDescription
401Invalid or missing API key
403Insufficient permissions
429Rate limit exceeded
500Internal server error
Last updated on