Moab logoMoab
Get started
Moab Docs

Content

Reusable message and image templates campaign agents draft from.

Base path /api/v1/content on https://moabcrm.com. Authenticate with Authorization: Bearer $DASH_API_KEY and name the project with the Project-ID header. Writes are validated in declared mode; an operation this resource does not declare answers 405 operation_not_supported.

List content

GET /api/v1/content

curl "https://moabcrm.com/api/v1/content?status=paused" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest"
Show me the live content templates
data_query {
  "collection": "content",
  "where": {
    "status": "paused"
  }
}

Returns a paginated list of content objects, newest first.

{
  "object": "list",
  "data": [
    {
      "object": "content",
      "id": "obj_123",
      "name": "Hermes joins the team",
      "type": "email",
      "mode": "template",
      "status": "live",
      "score": {
        "total": 8,
        "components": [
          {
            "id": "best_practices",
            "kind": "best_practices",
            "points": 5,
            "note": "+ plain-subject, template-has-image, new-angle, grounded-body, cta-block-correct"
          },
          {
            "id": "signups",
            "kind": "signups",
            "points": 3,
            "note": "3 attributed signups"
          }
        ]
      },
      "channel": "channel",
      "content_prompt": "content prompt",
      "subject_template": "A question about your review workflow",
      "headline": "headline",
      "body_template": "Hi {{first_name}} — Acme helps teams review pull requests. Would a short demo be useful?",
      "body": "body",
      "best": true,
      "has_offer": true,
      "image": {
        "source": "source",
        "source_url": "source url",
        "alt_text": "alt text",
        "scope": "scope"
      },
      "public_asset": {
        "url": "https://example.com",
        "mime_type": "mime type",
        "width": 1,
        "height": 1
      },
      "created_at": "2026-07-25T12:00:00.000Z",
      "updated_at": "2026-07-25T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Parameters

ParameterTypeKindDescription
statusstringfilterRun-mode ladder for this piece: paused, sandbox (sends confined to the sandbox audience), or live (delivers to real recipients). One of paused, sandbox, live.
typestringfilterWhat kind of template this is. A wrong value is a named 400 naming the valid ones. One of email, linkedin, image, text.
modestringfilterWhat kind of record this is: template (reusable copy with {{merge_fields}}), piece (a one-off written for one send), or instance (a rendered template). The fallback ladder also looks for generic — campaign-level copy with no per-lead variable — which currently has no writer.
channelstringfilterChannel the piece is written for.
product_idstringfilterThe product this piece sells.
agent_idstringfilterThe campaign agent this piece belongs to.
qstringsearchFree-text search across name, headline.
sortstringsortOne of score, status; prefix with - to reverse.
limitnumberpageRows to return, 1–100. Defaults to 20.
cursorstringpagenext_cursor from the previous page.

Retrieve a content

GET /api/v1/content/draft-001

curl "https://moabcrm.com/api/v1/content/draft-001" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest"
Open the content {id}
data_get {
  "collection": "content",
  "object_id": "draft-001"
}

Returns the content object.

{
  "object": "content",
  "id": "obj_123",
  "name": "Hermes joins the team",
  "type": "email",
  "mode": "template",
  "status": "live",
  "score": {
    "total": 8,
    "components": [
      {
        "id": "best_practices",
        "kind": "best_practices",
        "points": 5,
        "note": "+ plain-subject, template-has-image, new-angle, grounded-body, cta-block-correct"
      },
      {
        "id": "signups",
        "kind": "signups",
        "points": 3,
        "note": "3 attributed signups"
      }
    ]
  },
  "channel": "channel",
  "content_prompt": "content prompt",
  "subject_template": "A question about your review workflow",
  "headline": "headline",
  "body_template": "Hi {{first_name}} — Acme helps teams review pull requests. Would a short demo be useful?",
  "body": "body",
  "best": true,
  "has_offer": true,
  "image": {
    "source": "source",
    "source_url": "source url",
    "alt_text": "alt text",
    "scope": "scope"
  },
  "public_asset": {
    "url": "https://example.com",
    "mime_type": "mime type",
    "width": 1,
    "height": 1
  },
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

ParameterTypeKindDescription
idstringpathThe content's id or slug.

Create a content

POST /api/v1/content

curl -X POST "https://moabcrm.com/api/v1/content" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme introduction","type":"email","mode":"template","product_id":"$PRODUCT_ID","subject_template":"A question about your review workflow","body_template":"Hi {{first_name}} — Acme helps teams review pull requests. Would a short demo be useful?","status":"paused"}'
Write a new email template about the Hermes launch
data_set {
  "collection": "content",
  "object_id": "draft-001",
  "data": {
    "name": "Acme introduction",
    "type": "email",
    "mode": "template",
    "product_id": "$PRODUCT_ID",
    "subject_template": "A question about your review workflow",
    "body_template": "Hi {{first_name}} — Acme helps teams review pull requests. Would a short demo be useful?",
    "status": "paused"
  }
}

Returns the content object.

{
  "object": "content",
  "id": "obj_123",
  "name": "Hermes joins the team",
  "type": "email",
  "mode": "template",
  "status": "live",
  "score": {
    "total": 8,
    "components": [
      {
        "id": "best_practices",
        "kind": "best_practices",
        "points": 5,
        "note": "+ plain-subject, template-has-image, new-angle, grounded-body, cta-block-correct"
      },
      {
        "id": "signups",
        "kind": "signups",
        "points": 3,
        "note": "3 attributed signups"
      }
    ]
  },
  "channel": "channel",
  "content_prompt": "content prompt",
  "subject_template": "A question about your review workflow",
  "headline": "headline",
  "body_template": "Hi {{first_name}} — Acme helps teams review pull requests. Would a short demo be useful?",
  "body": "body",
  "best": true,
  "has_offer": true,
  "image": {
    "source": "source",
    "source_url": "source url",
    "alt_text": "alt text",
    "scope": "scope"
  },
  "public_asset": {
    "url": "https://example.com",
    "mime_type": "mime type",
    "width": 1,
    "height": 1
  },
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoHuman-readable template name.
typestringnoWhat kind of template this is. A wrong value is a named 400 naming the valid ones. One of email, linkedin, image, text.
modestringnoWhat kind of record this is: template (reusable copy with {{merge_fields}}), piece (a one-off written for one send), or instance (a rendered template). The fallback ladder also looks for generic — campaign-level copy with no per-lead variable — which currently has no writer.
statusstringnoRun-mode ladder for this piece: paused, sandbox (sends confined to the sandbox audience), or live (delivers to real recipients). One of paused, sandbox, live.
scoreobjectnoThe record's grade — { total, components }. The write door folds components by id and computes total; writers send ONLY their own component. Absent until a component exists. See the GET example.
  score.totalnumbernoSum of components[].points — server-computed at the write door, never writer-supplied.
  score.componentsarraynoThe score's ledger — [{ id, kind: best_practices|engagement, points, note, counts? }]. best_practices ← the graders; engagement ← the server engagement stamper only.
channelstringnoChannel the piece is written for.
product_idstringnoThe product this piece sells.
content_prompttextnoOne-line generation prompt for an image template.
subject_templatestringnoSubject line with {{merge_fields}}.
headlinestringnoHeadline for a piece — the searchable one-line hook, distinct from the name.
body_templatetextnoBody with {{merge_fields}}.
bodytextnoLiteral body for a piece or a generic campaign copy — no merge fields. This is the text the LinkedIn fallback ladder reads at rung (b).
bestbooleannoThe single outbound-default image row — exactly one image content row per project carries true (the collateral indexer owns the flag; the highest-ranked overview product screenshot wins).
imageobjectnoProvenance and accessibility of the piece's image: where it came from, the page it was lifted off, and its alt text. The image BYTES live on image_artifact_id; this object describes them.
  image.sourcestringnoWhere the image came from — real_site_image (lifted off the product's own site), pdf_extract (mined out of an uploaded deck), or upload (a screenshot the operator uploaded directly).
  image.source_urlstringnoThe original page URL the image was taken from.
  image.alt_textstringnoAccessible description of the image.
  image.scopestringnoHow zoomed-in the screenshot is — overview | feature | detail (media_analyze screenshot_scope). Overview outranks feature outranks detail for outbound imagery.
public_assetobjectnoThe intentionally published rendition of the image — what an outbound email's \<img> actually loads, since a provider cannot read a signed artifact. Written only after a deliberate publish, never automatically.
  public_asset.urlstringnoPublicly fetchable HTTPS URL for the image.
  public_asset.mime_typestringnoMIME type of url.
  public_asset.widthnumbernoPixel width of the public asset, so a card reserves the right box.
  public_asset.heightnumbernoPixel height of the public asset.

Update a content

PATCH /api/v1/content/draft-001

curl -X PATCH "https://moabcrm.com/api/v1/content/draft-001" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest" \
  -H "Content-Type: application/json" \
  -d '{"type":"email","status":"paused"}'
Set content {id} to live
data_set {
  "collection": "content",
  "object_id": "draft-001",
  "data": {
    "type": "email",
    "status": "paused"
  }
}

Returns the content object.

{
  "object": "content",
  "id": "obj_123",
  "name": "Hermes joins the team",
  "type": "email",
  "mode": "template",
  "status": "live",
  "score": {
    "total": 8,
    "components": [
      {
        "id": "best_practices",
        "kind": "best_practices",
        "points": 5,
        "note": "+ plain-subject, template-has-image, new-angle, grounded-body, cta-block-correct"
      },
      {
        "id": "signups",
        "kind": "signups",
        "points": 3,
        "note": "3 attributed signups"
      }
    ]
  },
  "channel": "channel",
  "content_prompt": "content prompt",
  "subject_template": "A question about your review workflow",
  "headline": "headline",
  "body_template": "Hi {{first_name}} — Acme helps teams review pull requests. Would a short demo be useful?",
  "body": "body",
  "best": true,
  "has_offer": true,
  "image": {
    "source": "source",
    "source_url": "source url",
    "alt_text": "alt text",
    "scope": "scope"
  },
  "public_asset": {
    "url": "https://example.com",
    "mime_type": "mime type",
    "width": 1,
    "height": 1
  },
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoHuman-readable template name.
typestringnoWhat kind of template this is. A wrong value is a named 400 naming the valid ones. One of email, linkedin, image, text.
modestringnoWhat kind of record this is: template (reusable copy with {{merge_fields}}), piece (a one-off written for one send), or instance (a rendered template). The fallback ladder also looks for generic — campaign-level copy with no per-lead variable — which currently has no writer.
statusstringnoRun-mode ladder for this piece: paused, sandbox (sends confined to the sandbox audience), or live (delivers to real recipients). One of paused, sandbox, live.
scoreobjectnoThe record's grade — { total, components }. The write door folds components by id and computes total; writers send ONLY their own component. Absent until a component exists. See the GET example.
  score.totalnumbernoSum of components[].points — server-computed at the write door, never writer-supplied.
  score.componentsarraynoThe score's ledger — [{ id, kind: best_practices|engagement, points, note, counts? }]. best_practices ← the graders; engagement ← the server engagement stamper only.
channelstringnoChannel the piece is written for.
product_idstringnoThe product this piece sells.
content_prompttextnoOne-line generation prompt for an image template.
subject_templatestringnoSubject line with {{merge_fields}}.
headlinestringnoHeadline for a piece — the searchable one-line hook, distinct from the name.
body_templatetextnoBody with {{merge_fields}}.
bodytextnoLiteral body for a piece or a generic campaign copy — no merge fields. This is the text the LinkedIn fallback ladder reads at rung (b).
bestbooleannoThe single outbound-default image row — exactly one image content row per project carries true (the collateral indexer owns the flag; the highest-ranked overview product screenshot wins).
imageobjectnoProvenance and accessibility of the piece's image: where it came from, the page it was lifted off, and its alt text. The image BYTES live on image_artifact_id; this object describes them.
  image.sourcestringnoWhere the image came from — real_site_image (lifted off the product's own site), pdf_extract (mined out of an uploaded deck), or upload (a screenshot the operator uploaded directly).
  image.source_urlstringnoThe original page URL the image was taken from.
  image.alt_textstringnoAccessible description of the image.
  image.scopestringnoHow zoomed-in the screenshot is — overview | feature | detail (media_analyze screenshot_scope). Overview outranks feature outranks detail for outbound imagery.
public_assetobjectnoThe intentionally published rendition of the image — what an outbound email's \<img> actually loads, since a provider cannot read a signed artifact. Written only after a deliberate publish, never automatically.
  public_asset.urlstringnoPublicly fetchable HTTPS URL for the image.
  public_asset.mime_typestringnoMIME type of url.
  public_asset.widthnumbernoPixel width of the public asset, so a card reserves the right box.
  public_asset.heightnumbernoPixel height of the public asset.

Append an event to a content

POST /api/v1/content/{id}/events

curl -X POST "https://moabcrm.com/api/v1/content/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 content {id}
data_event {
  "collection": "content",
  "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 content carries the envelope below. The fields under it are computed or stamped by the platform — they are returned, never sent.

FieldTypeDescription
objectstringAlways content.
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.
status_reasonstringOne line on why this status was set, stamped at the flip. Example: "paused 2026-08-13: shipped with placeholder body; rebirth with real copy".
template_idstringThe template row this piece was rendered from, when it was rendered from one.
agent_idstringThe campaign agent this piece belongs to.
company_idstringThe company a one-off piece was written for, when it was written for one.
person_idstringThe person a one-off piece was written for, when it was written for one.
created_by_run_idstringThe campaign run that created this piece — what the "Runs" cell links to.
created_by_agent_idstringThe campaign agent that created this piece. Read by the platform's object_created provenance hook to attribute the row's timeline entry.
created_by_agent_labelstringThat agent's NAME, denormalised alongside created_by_agent_id.
seed_artifact_idstringThe artifact the image was generated FROM — the real product image, never a generated id.
image_artifact_idstringThe artifact rendered as this piece's hero, list thumbnail and email-card image.
has_offerbooleanTrue when this piece's subject or body names a commercial offer (a discount, promo code, credits, a free trial, a "% off"). Server-stamped from the copy on every write; never written by you. Use it to pick copy for an agent whose brief bans offers — do not re-read the bodies.

Errors

Failures use { error: { type, code, message, param } }. The full code table is generated at Error Codes.