report_outcome
Report what a bought hook actually did once posted. FREE (WP-H). Caller-supplied, unverified, and not used by generation/scoring/retrieval today. Retained for possible future calibration; no view prediction. Args: hook_id, platform (tiktok|instagram|youtube|x|linkedin|other), posted_at, views/likes (0..1e11), retention_pct?, url?, api_key, idempotency_key. Caps 20/hook, 500/day; an exact duplicate is a conflict. Returns outcome + aggregate + reward. Errors: unauthorized, not_found, invalid_request, conflict, rate_limited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http(s) URL of the post, for your own audit trail. Must carry a host; omit entirely rather than passing a placeholder. | |
| likes | No | Likes at report time, >=0. Omit if you cannot read it. | |
| views | Yes | Views the post had accrued at report time, >=0. Required: caller-supplied and not independently verified; retained as the primary measure for possible future calibration. Generation, scoring, and retrieval do not consume outcomes today. Report again later (up to 20 reports per hook) to record how it matured. | |
| api_key | No | API key for this call. Omit to fall back to the Authorization: Bearer / X-API-Key request header (streamable-HTTP only), then the VHGENGINE_API_KEY env var (the stdio default). No key resolvable -> unauthorized. | |
| hook_id | Yes | Which bought hook this result belongs to: the hook_id from a generate/batch/remix response or list_hooks. Must be a hook you own. | |
| platform | Yes | Where the hook was actually posted. Required. | |
| posted_at | Yes | When it went live, ISO-8601 UTC ('YYYY-MM-DDTHH:MM:SSZ'). May be in the past; more than 48h in the FUTURE is invalid_request. | |
| retention_pct | No | Average view-through as a PERCENT, 0-100 (not a 0-1 fraction). Omit if the platform does not expose it. | |
| idempotency_key | No | Caller-chosen replay key (any string, unique per intended effect). A repeat call with the SAME key returns the stored result and is NEVER charged twice; the same key with different arguments is an idempotency_conflict. Omit and every call is a fresh, separately charged operation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outcome | No | The stored row, as recorded. | |
| replayed | No | true when an idempotency_key replayed a stored report. | |
| aggregate | No | Rolled-up totals for this hook across every report you have made. | |
| reward_credits | No | Credits granted for this report. Only a hook's FIRST report earns one, so later reports return 0. | |
| credits_remaining | No | Your balance after the reward. Present only when one was granted. |