Moab logoMoab
Get started
Moab Docs

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.

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 status
data_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

ParameterTypeKindDescription
statusstringfilterminted → 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_stylestringfilterHow the code reads: discount (MIKE20), short (zx4k). One of discount, short, personal.
agent_idstringfilterThe campaign agent whose draft minted this code.
person_idstringfilterThe person this code was minted for (one code per recipient).
campaign_idstringfilterThe provider campaign the carrying message was preloaded into.
run_idstringfilterThe agent run that produced the carrying draft.
outbox_idstringfilterThe outbox message carrying this code.
redirect_hoststringfilterThe tracking host that serves this code, e.g. links.moabcrm.com.
qstringsearchFree-text search across destination_url.
sortstringsortOne of first_clicked_at; prefix with - to reverse.
limitnumberpageRows to return, 1–100. Defaults to 20.
cursorstringpagenext_cursor from the previous page.

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

ParameterTypeKindDescription
idstringpathThe link-code's id or slug.

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

FieldTypeRequiredDescription
eventstringyesThe human-readable timeline entry.
contextobjectnoProvenance — 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.

FieldTypeDescription
objectstringAlways link-code.
idstringStable object id. Also accepted in place of slug on any path.
slugstringURL-safe name, unique within the collection.
created_atstringISO-8601 timestamp of the first write.
updated_atstringISO-8601 timestamp of the most recent write. The cursor sorts on this.
person_idstringThe person this code was minted for (one code per recipient).
company_idstringThat person's company.
outbox_idstringThe outbox message carrying this code.
agent_idstringThe campaign agent whose draft minted this code.
sequence_idstringThe sequence the carrying message belongs to, when any.
campaign_idstringThe provider campaign the carrying message was preloaded into.
run_idstringThe agent run that produced the carrying draft.
channelstringDelivery channel of the carrying draft (email/linkedin), denormalized at mint — feeds utm_medium.
subjectstringSubject line of the carrying draft (capped at mint), for click attribution and engagement notifications.
content_idstringThe content row the carrying draft's copy was generated from, denormalized at mint.
content_namestringThat content piece's display name at first mint — what engagement notifications render as the Content line.
agent_namestringThe campaign agent's display NAME at mint — the human moab_agent_name / utm_campaign cut.
icp_industrystring\<icp_axes.industry> \<headcount band> of the campaign agent at mint (insurance 201-500); whichever half exists — never invented.
icp_rolesstringThe campaign agent's icp_axes.roles (falling back to role), comma-joined (CTO, VP of Engineering).
tagsstringComma-joined lowercase tags: screenshot|no-screenshot (from the draft's image presence) + code_style + program. Always stamped at mint.
screenshotstringThe SPECIFIC image the email embeds — the asset's basename, extension stripped (ionwarp-review-pr-1571). Absent when the draft shipped without an image.
landing_visitorsarrayBounded 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_atdateWhen 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_atdateWhen 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.
internalbooleanA 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_atdateFirst human click (rules v5), projected by the click reconciler from the code's request ledger.
ccstringClass 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_reasonsarrayReason 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_countsobjectPer-class request counts {hu, sc, bo, in}. The experiments and funnel count messages with hu > 0, rather than summing requests.
cc_atdateWhen the last click was judged.
cc_vnumberRule-table version (MOAB_CLICK_RULES_VERSION) the last verdict used; a backfill re-judges older rows by it.
cc_signalsobjectRaw 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_clicksarrayRing 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_atdateFirst landing-page read of ?code= (offer plan §4).
visit_countnumberLanding-page reads of this code.
converted_atdateWhen a signup carrying this code converted.
page_idstringThe 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.

On this page

Moab logoMoab

Ready to build? Connect an agent and go — no credit card needed to start.

Get startedSee our plans