GET
/
users
/
{id}
/
metrics
curl --request GET \
  --url https://app.trophy.so/api/users/{id}/metrics \
  --header 'X-API-KEY: <api-key>'
[
  {
    "id": "d01dcbcb-d51e-4c12-b054-dc811dcdc623",
    "key": "words-written",
    "name": "Words written",
    "emoji": "πŸ“",
    "status": "active",
    "streakFrequency": "daily",
    "current": 4500,
    "achievements": [
      {
        "id": "abe3120f-5ca9-4344-92c8-5b891643a04b",
        "name": "Novice Writer",
        "metricId": "d01dcbcb-d51e-4c12-b054-dc811dcdc623",
        "metricValue": 500,
        "achievedAt": "2021-01-01T00:00:00Z",
        "badgeUrl": "https://example.com/badge1.png"
      },
      {
        "id": "8a07f2d0-9c72-4de1-bf92-9530ae82b4b6",
        "name": "Intermediate Writer",
        "metricId": "d01dcbcb-d51e-4c12-b054-dc811dcdc623",
        "metricValue": 1000,
        "achievedAt": "2021-01-02T00:00:00Z",
        "badgeUrl": "https://example.com/badge2.png"
      },
      {
        "id": "2090d038-aa04-4048-ab2e-e2b7bf2d3b9f",
        "name": "Expert Writer",
        "metricId": "d01dcbcb-d51e-4c12-b054-dc811dcdc623",
        "metricValue": 2000,
        "achievedAt": null
      }
    ]
  }
]

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string
required

ID of the user

Response

200
application/json

Successful operation

The response is of type object[].