Link Codes
One row per minted outbound link code — who it was minted for, where it redirects, and the click/visit/convert truth the dash-links worker stamps.
Base path /api/v1/link-codes on https://moabcrm.com. Authenticate with Authorization: Bearer $DASH_API_KEY and name the project with the Project-ID header. Writes are validated in strict mode; an operation this resource does not declare answers 405 operation_not_supported.
List link codes
GET /api/v1/link-codes
curl "https://moabcrm.com/api/v1/link-codes?status=minted" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest"Show me the link codes filtered by statusdata_query {
"collection": "link_codes",
"where": {
"status": "minted"
}
}Returns a paginated list of link-code objects, newest first.
{
"object": "list",
"data": [
{
"object": "link-code",
"id": "obj_123",
"code_style": "discount",
"program": "program",
"offer_kind": "offer kind",
"offer_value": "offer value",
"destination_url": "destination url",
"redirect_host": "redirect host",
"status": "minted",
"created_at": "2026-07-25T12:00:00.000Z",
"updated_at": "2026-07-25T12:00:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}Parameters
| Parameter | Type | Kind | Description |
|---|---|---|---|
status | string | filter | minted → sent → clicked → visited → converted (expired as terminal). Monotone: the worker/landing reads only move a code forward. One of minted, sent, clicked, visited, converted, expired. |
code_style | string | filter | How the code reads: discount (MIKE20), short (zx4k). One of discount, short, personal. |
agent_id | string | filter | The campaign agent whose draft minted this code. |
person_id | string | filter | The person this code was minted for (one code per recipient). |
campaign_id | string | filter | The provider campaign the carrying message was preloaded into. |
run_id | string | filter | The agent run that produced the carrying draft. |
outbox_id | string | filter | The outbox message carrying this code. |
redirect_host | string | filter | The tracking host that serves this code, e.g. links.moabcrm.com. |
q | string | search | Free-text search across destination_url. |
sort | string | sort | One of first_clicked_at; prefix with - to reverse. |
limit | number | page | Rows to return, 1–100. Defaults to 20. |
cursor | string | page | next_cursor from the previous page. |
Retrieve a link-code
GET /api/v1/link-codes/draft-001
curl "https://moabcrm.com/api/v1/link-codes/draft-001" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest"Open the link-code {id}data_get {
"collection": "link_codes",
"object_id": "draft-001"
}Returns the link-code object.
{
"object": "link-code",
"id": "obj_123",
"code_style": "discount",
"program": "program",
"offer_kind": "offer kind",
"offer_value": "offer value",
"destination_url": "destination url",
"redirect_host": "redirect host",
"status": "minted",
"created_at": "2026-07-25T12:00:00.000Z",
"updated_at": "2026-07-25T12:00:00.000Z"
}Parameters
| Parameter | Type | Kind | Description |
|---|---|---|---|
id | string | path | The link-code's id or slug. |
Append an event to a link-code
POST /api/v1/link-codes/{id}/events
curl -X POST "https://moabcrm.com/api/v1/link-codes/draft-001/events" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest" \
-H "Content-Type: application/json" \
-d '{"event":"Noted by the operator","context":{"source":"api"}}'Add a note to the link-code {id}data_event {
"collection": "link_codes",
"object_id": "draft-001",
"event": "Noted by the operator"
}Returns the appended event object.
{
"object": "event",
"id": "evt_123",
"event": "Noted by the operator"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
event | string | yes | The human-readable timeline entry. |
context | object | no | Provenance — source, integration, worker_run_id, … |
What comes back (read-only)
Every link-code carries the envelope below. The fields under it are computed or stamped by the platform — they are returned, never sent.
| Field | Type | Description |
|---|---|---|
object | string | Always link-code. |
id | string | Stable object id. Also accepted in place of slug on any path. |
slug | string | URL-safe name, unique within the collection. |
created_at | string | ISO-8601 timestamp of the first write. |
updated_at | string | ISO-8601 timestamp of the most recent write. The cursor sorts on this. |
person_id | string | The person this code was minted for (one code per recipient). |
company_id | string | That person's company. |
outbox_id | string | The outbox message carrying this code. |
agent_id | string | The campaign agent whose draft minted this code. |
sequence_id | string | The sequence the carrying message belongs to, when any. |
campaign_id | string | The provider campaign the carrying message was preloaded into. |
run_id | string | The agent run that produced the carrying draft. |
channel | string | Delivery channel of the carrying draft (email/linkedin), denormalized at mint — feeds utm_medium. |
subject | string | Subject line of the carrying draft (capped at mint), for click attribution and engagement notifications. |
content_id | string | The content row the carrying draft's copy was generated from, denormalized at mint. |
content_name | string | That content piece's display name at first mint — what engagement notifications render as the Content line. |
agent_name | string | The campaign agent's display NAME at mint — the human moab_agent_name / utm_campaign cut. |
icp_industry | string | \<icp_axes.industry> \<headcount band> of the campaign agent at mint (insurance 201-500); whichever half exists — never invented. |
icp_roles | string | The campaign agent's icp_axes.roles (falling back to role), comma-joined (CTO, VP of Engineering). |
tags | string | Comma-joined lowercase tags: screenshot|no-screenshot (from the draft's image presence) + code_style + program. Always stamped at mint. |
screenshot | string | The SPECIFIC image the email embeds — the asset's basename, extension stripped (ionwarp-review-pr-1571). Absent when the draft shipped without an image. |
landing_visitors | array | Bounded distinct visitor keys (ip+ua hash) seen on coded landing reads — the D1 analog of "distinct landing persons". More than 2 on one per-recipient code reads as scanner_suspect on the report side (attribution v2 §0/§5.5). Stamped by the dash-links pages worker. |
sent_at | date | When the send road handed the message off (stamped on the minted→sent flip, agents/moab/server/outbox-send.ts). NOT the scanner clock any more: on a campaign provider the handoff precedes delivery by hours (Instantly's 30/day mailbox), so the 60 s rule read 63,000 s and could never fire (owner review R3 §1.4). The latency rule reads delivered_at. |
delivered_at | date | When the provider put the carrying message on the wire — the links worker's ONE latency clock (HUMAN_CLICK_MIN_LATENCY_MS after it is a scanner). A transactional send stamps it at handoff; a campaign provider's row gets it from provider-activity sync (the provider's own contact time). Absent = no clock = no latency verdict (latency_s null), never the handoff time in disguise. |
internal | boolean | A code minted for our own use (harness lanes, probes, operator tests): every click on it is classed in at the redirect (reason ic) and counts nowhere, however human the click looks. Set at mint; the 2026-09-04 backfill stamps it on lane*/probe* codes. |
first_clicked_at | date | First human click (rules v5), projected by the click reconciler from the code's request ledger. |
cc | string | Class of the LAST click — hu (human), sc (scanner-suspect: <60 s after delivery, a vendor/hosting network without our cookie, or two soft rules), bo (declared bot: HEAD, bot UA, honeypot), in (internal: our own app's referer or a lane code). The open pixel carries the same class on its event. Only hu moves the qualified message count, the outbox rung and the timeline. |
cc_reasons | array | Reason codes behind the last click's class — hd ua hp ap lt as bu hh nc hb (see MOAB_CLICK_REASONS). Recorded even when they did not change the class, so the rules can be scored before they act. |
cc_counts | object | Per-class request counts {hu, sc, bo, in}. The experiments and funnel count messages with hu > 0, rather than summing requests. |
cc_at | date | When the last click was judged. |
cc_v | number | Rule-table version (MOAB_CLICK_RULES_VERSION) the last verdict used; a backfill re-judges older rows by it. |
cc_signals | object | Raw signals behind the last verdict — method, ua_bot, hashed UA/IP keys, latency_s, asn, as_org, header flags, cookie_seen, burst_n. Forensics; never the UA or IP string itself. |
recent_clicks | array | Ring of the last 8 clicks ({t, ipk, uak, cc}) the burst and no-cookie rules read on the NEXT click — free, it is on the row the 302 already reads. |
first_visited_at | date | First landing-page read of ?code= (offer plan §4). |
visit_count | number | Landing-page reads of this code. |
converted_at | date | When a signup carrying this code converted. |
page_id | string | The pages row this code's destination resolves to — stamped at mint when the destination is a project page (built page_url or indexed source_url). The per-lineage funnel evidence and the pages engagement stamp group by this hop. |
Errors
Failures use { error: { type, code, message, param } }. The full code table is generated at Error Codes.