Topolo Docs Topolo Platform
Open workspace

Create subscription topic

Create a subscription topic in the caller's Nurture workspace. The key is unique per workspace and doubleOptIn defaults to true.

Outcome

Create a subscription topic in the caller's Nurture workspace. The key is unique per workspace and doubleOptIn defaults to true.

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.subscription_topics.create --detail --json
topolo resources topolo-nurture --json
topolo workspaces list topolo-nurture --json

Request

POST /api/subscription-topics

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
keyRequiredstring{"pattern":"^[a-z0-9][a-z0-9_-]{0,62}$"}
nameRequiredstring{"minLength":1,"maxLength":120}
descriptionOptionalSee schema{}
doubleOptInOptionalboolean{}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ]
    },
    "doubleOptIn": {
      "type": "boolean"
    }
  },
  "required": [
    "key",
    "name"
  ],
  "additionalProperties": false
}

Effects

  • Creates one subscription topic in the workspace. The key is unique per workspace and doubleOptIn defaults to true.

Interpret the response

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

Call app_topolo_nurture.subscription_topics.get with $.topic.id and confirm the stored fields.

Exact success schema:

{
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "topic": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "doubleOptIn": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        },
        "createdAt": {
          "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:

{
  "key": "digest",
  "name": "Digest",
  "doubleOptIn": false
}

CLI:

topolo actions validate app_topolo_nurture.subscription_topics.create --data @payload.json --json
topolo actions plan app_topolo_nurture.subscription_topics.create --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.subscription_topics.create --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.subscription_topics.create",
    "input": {
      "key": "digest",
      "name": "Digest",
      "doubleOptIn": false
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "topic": {
    "id": "topic_6479c2fe755a47d9883a3e6ff6124dd6",
    "key": "digest",
    "name": "Digest",
    "description": null,
    "doubleOptIn": false,
    "status": "active",
    "createdAt": "2026-10-04T00:32:38.638Z",
    "updatedAt": "2026-10-04T00:32:38.638Z"
  }
}

HTTP 201. Call app_topolo_nurture.subscription_topics.get with $.topic.id and confirm the stored fields.

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:

{
  "key": "news",
  "name": "News"
}

CLI:

topolo actions validate app_topolo_nurture.subscription_topics.create --data @payload.json --json
topolo actions plan app_topolo_nurture.subscription_topics.create --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.subscription_topics.create --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.subscription_topics.create",
    "input": {
      "key": "news",
      "name": "News"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "topic": {
    "id": "topic_921562fd62f9455d8413b97c201b3367",
    "key": "news",
    "name": "News",
    "description": null,
    "doubleOptIn": true,
    "status": "active",
    "createdAt": "2026-10-04T00:32:38.637Z",
    "updatedAt": "2026-10-04T00:32:38.637Z"
  }
}

HTTP 201. Call app_topolo_nurture.subscription_topics.get with $.topic.id and confirm the stored fields.

Refused request · topic_key_taken

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:

{
  "key": "product-news",
  "name": "Dup"
}

CLI:

topolo actions validate app_topolo_nurture.subscription_topics.create --data @payload.json --json
topolo actions plan app_topolo_nurture.subscription_topics.create --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json

Captured local response · HTTP 409:

{
  "error": {
    "code": "topic_key_taken",
    "message": "A topic with key \"product-news\" already exists in this workspace."
  }
}

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

Verify the result

  • Call app_topolo_nurture.subscription_topics.get with $.topic.id and confirm the stored fields.

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.
  • topic_key_taken (HTTP 409): Choose a different key, or update the existing topic.

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

Archive the subscription topic created in error.

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.