curl -X POST "https://<your-api-host>/api/metrics" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "metrics": [
      {
        "id": "awesome-dex___TVL",
        "value": 12345678.9,
        "protocolId": "awesome-dex",
        "unit": "USD",
        "timestamp": "2025-08-05T17:00:00Z"
      },
      {
        "id": "awesome-dex___USERS_MOM",
        "value": 5.2,
        "protocolId": "awesome-dex",
        "unit": "%"
      }
    ]
  }'
{
  "success": true,
  "processed": 2,
  "errors": [],
  "warnings": []
}
Authorization
string
required
Bearer token from the Snippet mobile app. Format: Bearer YOUR_API_KEY.
metrics
array[object]
required
List of metric objects to submit in a single request (max 100).
curl -X POST "https://<your-api-host>/api/metrics" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "metrics": [
      {
        "id": "awesome-dex___TVL",
        "value": 12345678.9,
        "protocolId": "awesome-dex",
        "unit": "USD",
        "timestamp": "2025-08-05T17:00:00Z"
      },
      {
        "id": "awesome-dex___USERS_MOM",
        "value": 5.2,
        "protocolId": "awesome-dex",
        "unit": "%"
      }
    ]
  }'
{
  "success": true,
  "processed": 2,
  "errors": [],
  "warnings": []
}
Max 100 metrics per request. Timestamps must be valid ISO 8601 and not more than 5 minutes in the future.