API

Reputation API

Monitor phone number reputation and detect spam flags before they impact deliverability.

The Reputation API lets you check your DIDs against external spam databases and monitor reputation scores over time. Automated daily audits keep your pool clean without manual intervention.

Automated reputation audits run daily via cron (default 6:00 AM UTC). You can also trigger an audit manually at any time using the audit endpoint below.


Check DID reputation

GET /reputation/{number}

Returns the reputation status for a specific DID, including results from all configured reputation providers.

curl "https://api.trunx.io/reputation/+19495551234" \
  -H "Authorization: Bearer tk_live_..."
const res = await fetch("https://api.trunx.io/reputation/+19495551234", {
  headers: { "Authorization": "Bearer tk_live_..." },
});
const data = await res.json();
import requests

res = requests.get(
    "https://api.trunx.io/reputation/+19495551234",
    headers={"Authorization": "Bearer tk_live_..."},
)
data = res.json()

Response

{
  "number": "+19495551234",
  "flagged": false,
  "overallScore": 0.95,
  "providers": [
    {
      "flagged": false,
      "spamScore": 0.05,
      "complaints": 1,
      "details": "Low risk",
      "checkedAt": "2026-03-11T06:00:00.000Z"
    }
  ],
  "checkedAt": "2026-03-11T06:00:00.000Z"
}

Response fields

FieldTypeDescription
numberstringE.164 phone number
flaggedbooleantrue if any provider flagged the number as spam
overallScorenumberAggregate reputation score (0–1, higher is better)
providersarrayResults from reputation check providers
checkedAtstringISO 8601 timestamp of the most recent check

List all DIDs with reputation

GET /reputation

Returns all DIDs in your pool along with their current reputation status.

curl "https://api.trunx.io/reputation" \
  -H "Authorization: Bearer tk_live_..."
const res = await fetch("https://api.trunx.io/reputation", {
  headers: { "Authorization": "Bearer tk_live_..." },
});
const data = await res.json();
import requests

res = requests.get(
    "https://api.trunx.io/reputation",
    headers={"Authorization": "Bearer tk_live_..."},
)
data = res.json()

Response

{
  "dids": [
    {
      "number": "+19495551234",
      "state": "active",
      "healthScore": 0.92,
      "reputationScore": 0.95,
      "lastReputationCheck": "2026-03-11T06:00:00.000Z"
    },
    {
      "number": "+17145559876",
      "state": "cooling",
      "healthScore": 0.64,
      "reputationScore": 0.42,
      "lastReputationCheck": "2026-03-11T06:00:00.000Z"
    }
  ]
}

Trigger reputation audit

POST /reputation/audit

Queues a background job that checks all active DIDs against external reputation databases. Results are stored and reflected in subsequent GET /reputation calls.

curl -X POST "https://api.trunx.io/reputation/audit" \
  -H "Authorization: Bearer tk_live_..."
const res = await fetch("https://api.trunx.io/reputation/audit", {
  method: "POST",
  headers: { "Authorization": "Bearer tk_live_..." },
});
const data = await res.json();
import requests

res = requests.post(
    "https://api.trunx.io/reputation/audit",
    headers={"Authorization": "Bearer tk_live_..."},
)
data = res.json()

Response

{
  "queued": true,
  "message": "Reputation audit queued for all active DIDs"
}

The audit runs asynchronously via BullMQ. Depending on the size of your DID pool, results may take several minutes to complete. Use the GET /reputation endpoint to check updated scores.

On this page