POST /api/link/report

Last updated 2 September 2026.

POST/api/link/report
Report values for many subjects at once. For values that change when nobody is looking, on a schedule. Returns counts only and reads nothing back. Never fires webhooks.

Request

FieldTypeRules
reportsarrayrequiredAt most 500 entries. Each subject may appear once.
reports[].subjectstringrequiredSee the subject rules.
reports[].valuesobject | nulloptionalSame shape and rules as values on /api/link/status.
POST /api/link/report
Authorization: Bearer sk_yourservice_…
Content-Type: application/json

{
  "reports": [
    { "subject": "u_8f31c2", "values": { "club": { "id": "b3c1a708", "name": "ThePretorians", "slug": "thepretorians",
                                                   "sr": 1678, "rank": 4, "wins": 395, "losses": 253, "matchesPlayed": 648 } } },
    { "subject": "u_a9d004", "values": { "club": null } },
    { "subject": "u_c17b3e", "values": { "club": { "id": "e9f0…", "name": null, "slug": null,
                                                   "sr": null, "rank": null, "wins": null, "losses": null, "matchesPlayed": null } } }
  ]
}

Responses

200Applied. accepted = subjects with a live link to your service; unknown = the rest. Never per-subject.
{ "service": "yourservice", "accepted": 2, "unknown": 1 }

An empty reports array is a 200 with two zeroes.

400Rejected in full. Every entry is validated before any is applied; the index names the entry.
{ "error": "reports must be an array." }
{ "error": "reports must contain at most 500 entries." }        // refused, not truncated
{ "error": "reports[3] must be an object." }
{ "error": "reports[3]: subject …" }                             // any subject rule
{ "error": "reports[3]: duplicate subject." }
{ "error": "reports[3]: values…" }                               // any values rule from /api/link/status
401Bad or missing key.
{ "error": "Unknown or missing service key." }

Notes

  • Entries are applied sequentially. Expect a 500-entry batch to take a few seconds; the handler allows itself 60.
  • Chunk at 500 at your end and let a failed chunk not stop the ones after it.
  • Report everyone linked, not just those who changed.