Cowdidocs

Get the caller's agent dashboard

GET
/v1/agents/me/dashboard

Roll up the caller's directly assigned customers into totals and a repayment rate. Requires the org:agents:read permission. inactive_threshold_days sets when a customer without a recent disbursement counts as INACTIVE, and repayment_window_days sets the window behind repayment_rate. Returns 404 when the caller is not an agent in the granted organization.

AuthorizationBearer <token>

Create a client with POST /v1/oauth/clients, then exchange its credentials for an access token. AUTHORIZATION_CODE clients act on behalf of a signed-in user and always use PKCE; CLIENT_CREDENTIALS clients act as themselves. A client may only be granted scopes its creator already holds — read the grantable list from GET /v1/oauth/clients/scopes.

In: header

Query Parameters

inactive_threshold_days?integer

Days without a disbursement before a customer is INACTIVE. Defaults to 60.

Formatint32
repayment_window_days?integer

Days back from today, from 1 to 365, over which to compute repayment_rate. Defaults to 90.

Formatint32

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/agents/me/dashboard?inactive_threshold_days=60&repayment_window_days=90"
{  "total_customer_count": 42,  "active_customer_count": 34,  "inactive_customer_count": 5,  "overdue_customer_count": 3,  "repayment_rate": 0.83,  "repayment_window_days": 90,  "inactive_threshold_days": 60}
{  "code": "BAD_REQUEST",  "description": "Bad Request"}
{  "code": "UNAUTHORISED",  "description": "Unauthorised"}
{  "code": "FORBIDDEN",  "description": "Forbidden"}
{  "code": "BAD_REQUEST",  "description": "Invalid input"}
{  "code": "RATE_LIMIT_EXCEEDED",  "description": "Too Many Requests"}
{  "code": "INTERNAL_ERROR",  "description": "Internal Server Error"}