Moab logoMoab
Get started
Moab Docs

Goals

What the outreach is for — the number a campaign is trying to move.

Base path /api/v1/goals 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 goals

GET /api/v1/goals

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

Returns a paginated list of goal objects, newest first.

{
  "object": "list",
  "data": [
    {
      "object": "goal",
      "id": "obj_123",
      "name": "name",
      "goal_prompt": "goal prompt",
      "product_id": "product_123",
      "status": "paused",
      "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 goal: paused, sandbox (sends confined to the sandbox audience), or live (delivers to real recipients). One of paused, sandbox, live.
product_idstringfilterThe products row this goal belongs to.
target_metricstringfilterThe metric being moved (e.g. signups, demos_booked).
qstringsearchFree-text search across name.
sortstringsortOne of progress_pct, last_evaluated_at; prefix with - to reverse.
limitnumberpageRows to return, 1–100. Defaults to 20.
cursorstringpagenext_cursor from the previous page.

Retrieve a goal

GET /api/v1/goals/draft-001

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

Returns the goal object.

{
  "object": "goal",
  "id": "obj_123",
  "name": "name",
  "goal_prompt": "goal prompt",
  "product_id": "product_123",
  "status": "paused",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

ParameterTypeKindDescription
idstringpathThe goal's id or slug.

Create a goal

POST /api/v1/goals

curl -X POST "https://moabcrm.com/api/v1/goals" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest" \
  -H "Content-Type: application/json" \
  -d '{"status":"paused"}'
Create a new goal
data_set {
  "collection": "goals",
  "object_id": "draft-001",
  "data": {
    "status": "paused"
  }
}

Returns the goal object.

{
  "object": "goal",
  "id": "obj_123",
  "name": "name",
  "goal_prompt": "goal prompt",
  "product_id": "product_123",
  "status": "paused",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoHuman name of the goal — the number the campaigns exist to move, in plain words.
goal_promptstringnoThe standing instruction the progress-update pass follows: what to measure and what counts as movement.
product_idstringnoThe products row this goal belongs to.
statusstringnoRun-mode ladder for this goal: paused, sandbox (sends confined to the sandbox audience), or live (delivers to real recipients). One of paused, sandbox, live.

Update a goal

PATCH /api/v1/goals/draft-001

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

Returns the goal object.

{
  "object": "goal",
  "id": "obj_123",
  "name": "name",
  "goal_prompt": "goal prompt",
  "product_id": "product_123",
  "status": "paused",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoHuman name of the goal — the number the campaigns exist to move, in plain words.
goal_promptstringnoThe standing instruction the progress-update pass follows: what to measure and what counts as movement.
product_idstringnoThe products row this goal belongs to.
statusstringnoRun-mode ladder for this goal: paused, sandbox (sends confined to the sandbox audience), or live (delivers to real recipients). One of paused, sandbox, live.

Append an event to a goal

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

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

FieldTypeDescription
objectstringAlways goal.
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.
target_metricstringThe metric being moved (e.g. signups, demos_booked).
target_valuenumberThe number the operator is aiming for.
target_datedateThe date the target must be hit by (a goal is "N of metric by DATE"). Set at creation; the progress pass reads it to judge pace, never writes it.
current_valuenumberOutbound-attributed signups since the goal was created (link codes converted), SERVER-STAMPED by the destination refresh; the model interprets it and never writes it (goal_progress_server_stamped).
progress_pctnumbercurrent_value / target_value as a percentage, server-stamped with the evaluation.
banner_imagestringGenerated banner artifact for the goal card and hero, written by the default-image pipeline.
last_evaluated_atdateWhen the progress-update pass last measured this goal.

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