Topolo Docs Topolo Platform
Open workspace

Exit journey enrollment

End one active enrollment now with status exited and the given reason; it takes no further steps. Already-ended enrollments are refused.

Outcome

End one active enrollment now with status exited and the given reason; it takes no further steps. Already-ended enrollments are refused.

Before you start

  • Verify identity and pin the intended organization and environment before discovering the action.
  • Discover a granted Nurture workspace. The application permission is workspace:write; required workspace access is read_write. A permission alone does not supply a workspace grant.
  • Organization and workspace come from verified context. Select resourceType/resourceId separately from action input; body fields cannot grant a different organization or workspace. The first authorized product action can initialize an identity-only workspace mirror.
  • Obtain authorization for the documented effect or personal-data export before supplying CLI --confirm or MCP confirm:true.

Discover the target

topolo whoami --json
topolo actions get app_topolo_nurture.journeys.enrollments.exit --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json
topolo actions get app_topolo_nurture.journeys.enrollments.list --detail --json
  • id: Journey enrollment id, not a journey id.

Request

POST /api/journey-enrollments/{id}/exit

Save action input as payload.json. The reviewed plan separates path identifiers, query fields and HTTP body. Set NURTURE_WORKSPACE_ID from granted resource discovery; it is separate from action input.

Inspect and test this action in the signed action console. A test response still requires the verification below.

Input fields

FieldRequiredTypeConstraints
idRequiredstringJourney enrollment id, not a journey id. {"minLength":1,"maxLength":64}
reasonRequiredstring{"minLength":1,"maxLength":200}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    }
  },
  "required": [
    "id",
    "reason"
  ],
  "additionalProperties": false
}

Effects

  • Sets the enrollment to exited and clears its due time.

Interpret the response

The returned identifier path is $.enrollment.id for journey_enrollment. Empty lists do not discover a target.

Call app_topolo_nurture.journeys.enrollments.get and confirm status exited.

Exact success schema:

{
  "type": "object",
  "required": [
    "enrollment"
  ],
  "properties": {
    "enrollment": {
      "type": "object",
      "required": [
        "id",
        "journeyId",
        "version",
        "contactId",
        "status",
        "currentNodeId",
        "dueAt",
        "enrolledAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "journeyId": {
          "type": "string"
        },
        "version": {
          "type": "integer"
        },
        "contactId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "completed",
            "converted",
            "exited"
          ]
        },
        "currentNodeId": {
          "type": "string"
        },
        "stepSeq": {
          "type": "integer"
        },
        "attempts": {
          "type": "integer"
        },
        "dueAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "exitReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string"
        },
        "enrolledAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      }
    }
  }
}

Worked examples

Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Replace synthetic identifiers using credential-scoped discovery. A local success is not evidence of a deployed effect, configured provider or delivered message.

Successful request

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jen_404b773948ad41c6906b7ad860bc8990",
  "reason": "asked to stop"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.enrollments.exit --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.enrollments.exit --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.journeys.enrollments.exit --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_nurture.journeys.enrollments.exit",
    "input": {
      "id": "jen_404b773948ad41c6906b7ad860bc8990",
      "reason": "asked to stop"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "enrollment": {
    "id": "jen_404b773948ad41c6906b7ad860bc8990",
    "journeyId": "jny_c4110afb68bf41928a75f6792e46820f",
    "version": 1,
    "contactId": "nct_3be85a59ce83464ca24017f53eb0a249",
    "status": "exited",
    "currentNodeId": "hello",
    "stepSeq": 1,
    "attempts": 0,
    "dueAt": null,
    "exitReason": "operator: asked to stop",
    "source": "manual:u1",
    "enrolledAt": "2026-10-01T09:00:00.000Z",
    "updatedAt": "2026-10-04T00:32:37.053Z"
  }
}

HTTP 200. Call app_topolo_nurture.journeys.enrollments.get and confirm status exited.

Another supported request

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jen_1d32720f64e144b29f0ee595fc3a614b",
  "reason": "x"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.enrollments.exit --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.enrollments.exit --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.journeys.enrollments.exit --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --confirm --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_nurture.journeys.enrollments.exit",
    "input": {
      "id": "jen_1d32720f64e144b29f0ee595fc3a614b",
      "reason": "x"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 200:

{
  "enrollment": {
    "id": "jen_1d32720f64e144b29f0ee595fc3a614b",
    "journeyId": "jny_2d4104e7c89b4ae9bb71c3c147b24f4c",
    "version": 1,
    "contactId": "nct_3be85a59ce83464ca24017f53eb0a249",
    "status": "exited",
    "currentNodeId": "hello",
    "stepSeq": 1,
    "attempts": 0,
    "dueAt": null,
    "exitReason": "operator: x",
    "source": "manual:u1",
    "enrolledAt": "2026-10-01T09:00:00.000Z",
    "updatedAt": "2026-10-04T00:32:37.060Z"
  }
}

HTTP 200. Call app_topolo_nurture.journeys.enrollments.get and confirm status exited.

Refused request · permission_denied

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jen_x",
  "reason": "x"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.enrollments.exit --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.enrollments.exit --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 403:

{
  "error": {
    "code": "permission_denied",
    "message": "The credential lacks workspace:write.",
    "details": {
      "requiredPermission": "workspace:write"
    }
  }
}

HTTP 403. Preserve the refusal details and do not claim success.

Refused request · not_found

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jen_missing",
  "reason": "x"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.enrollments.exit --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.enrollments.exit --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 404:

{
  "error": {
    "code": "not_found",
    "message": "Enrollment was not found in this workspace."
  }
}

HTTP 404. Preserve the refusal details and do not claim success.

Refused request · enrollment_not_active

Actual dispatcher and migration-created SQLite; verified identity/workspace and external CRM, Engage, Notify, Consent, Nexus, Brand, Generator, Voice and delivery dependencies are simulated. No live authorization, paid generation or external delivery is established.

Input · payload.json:

{
  "id": "jen_404b773948ad41c6906b7ad860bc8990",
  "reason": "again"
}

CLI:

topolo actions validate app_topolo_nurture.journeys.enrollments.exit --data @payload.json --json
topolo actions plan app_topolo_nurture.journeys.enrollments.exit --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 409:

{
  "error": {
    "code": "enrollment_not_active",
    "message": "The enrollment already ended (exited)."
  }
}

HTTP 409. Preserve the refusal details and do not claim success.

Verify the result

  • Call app_topolo_nurture.journeys.enrollments.get and confirm status exited.

Errors and recovery

  • organization_required (HTTP 403): Select an organization available to the verified caller before choosing a Nurture workspace.
  • permission_denied (HTTP 403): Grant the credential the required Nurture workspace permission.
  • workspace_required (HTTP 409): Create a Nurture workspace, or pass the workspace resource context.
  • invalid_input (HTTP 422): Correct the fields named in error.details using inputSchema, then retry.
  • not_found (HTTP 404): Call app_topolo_nurture.journeys.enrollments.list to find an enrollment id in this workspace.
  • enrollment_not_active (HTTP 409): The enrollment already ended; nothing to do.

Auth or gateway failures may precede this handler. Preserve the exact response shape, error string/code, request id and credential context; no synthetic fixture establishes live credential access.

Recovery boundary

Exit cannot be undone; enroll the contact again (needs allowReentry) to restart from the entry node.

  • List journey enrollments: List a journey's enrollments, newest first, optionally by status (active, completed, converted, exited); up to 200. Each enrollment is pinned to a version and shows the node it will run next and when (dueAt).
  • Enroll contact in journey: Put one active contact on a published journey's live version, due immediately: the scheduler (every 5 minutes) then advances it, and each send node takes an eligibility reservation, so suppression, subscriptions, caps and quiet hours apply. Idempotent: a contact already active on the journey returns that enrollment with created false. Refused when the journey is not published, or the contact already went through it and the version has allowReentry off.

Evidence

Actual dispatcher and migration-created SQLite or Worker handlers; identity/workspace and external service dependencies are simulated. Fixture identifiers and timestamps are synthetic. These responses establish no live authorization, paid generation, credential provisioning or message delivery. Test scenario and capture digests are retained with each fixture.