Substy Developers
Analytics

Get team performance statistics

Read employee performance across the supplied period, creator filters and reporting options. Results respect the account's analytics visibility.

GET/v1/agencies/{agencyId}/analytics/employees

Read employee performance across the supplied period, creator filters and reporting options. Results respect the account's analytics visibility.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

agencyId*string
Length1 <= length

Query Parameters

startDate?string
endDate?string
creatorIds?array<string>
Default[]
employeeIds?array<string>
Default[]
chartMetric?string
Default"net_earnings"

Value in

  • "net_earnings"
  • "ppv_sent"
  • "average"
  • "message_sent"
  • "golden_ratio"
granularity?string
Default"daily"

Value in

  • "daily"
  • "weekly"
  • "monthly"
earningsMode?string
Default"net"

Value in

  • "net"
  • "gross"
includeChartData?boolean
Defaulttrue
includePaidMessages?boolean
Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/agencies/string/analytics/employees" \  -H "Authorization: Bearer YOUR_API_KEY"
{  "data": {    "employees": [      {        "id": "string",        "name": "string",        "email": "string",        "imageUrl": null,        "rate": null,        "hourlyWage": null,        "agencyId": "string",        "employeeId": "string",        "creators": [          {            "id": "string"          }        ],        "stats": {          "messages": {            "amountPpvSent": 0,            "amountPpvPaid": 0,            "amountMessagesSent": 0,            "unlockRate": 0,            "aov": 0,            "aovNet": 0,            "sumGeneratedGross": 0,            "sumGeneratedNet": 0,            "sumTips": 0,            "sumTipsNet": 0          }        },        "commission": 0,        "hoursWorked": 0,        "paidMessages": null,        "tips": null,        "joinedAt": "2019-08-24T14:15:22Z"      }    ],    "ai": [      {        "id": "string",        "name": "string",        "email": "string",        "imageUrl": null,        "rate": null,        "hourlyWage": null,        "agencyId": "string",        "employeeId": "string",        "creators": [          {            "id": "string"          }        ],        "stats": {          "messages": {            "amountPpvSent": 0,            "amountPpvPaid": 0,            "amountMessagesSent": 0,            "unlockRate": 0,            "aov": 0,            "aovNet": 0,            "sumGeneratedGross": 0,            "sumGeneratedNet": 0,            "sumTips": 0,            "sumTipsNet": 0          }        },        "commission": 0,        "hoursWorked": 0,        "paidMessages": null,        "tips": null,        "joinedAt": "2019-08-24T14:15:22Z"      }    ],    "chartData": [      {        "date": "string",        "ai": 0,        "employee": 0      }    ],    "aggregatedTotals": {      "totalMessagesSent": 0,      "totalNetEarnings": 0,      "totalGrossEarnings": 0,      "totalPPVSent": 0,      "totalUnlockRate": 0,      "avgPrice": 0,      "avgPriceNet": 0,      "goldenRatio": 0    },    "aiMetrics": {      "avgPrice": 0,      "avgPriceNet": 0,      "msgs": 0,      "earnings": 0,      "ppv": 0,      "golden": 0,      "unlockRate": 0    },    "employeeMetrics": {      "avgPrice": 0,      "avgPriceNet": 0,      "msgs": 0,      "earnings": 0,      "ppv": 0,      "golden": 0,      "unlockRate": 0    }  },  "meta": {    "requestId": "string"  }}