Topolo Docs Topolo Platform
Open workspace

Create contact

Add one contact to the workspace audience with source manual. The email is stored as entered (trimmed) and must be unique per workspace, case-insensitively; attributes is a flat map of up to 50 string, number or boolean values that segment rules can match by key.

Outcome

Add one contact to the workspace audience with source manual. The email is stored as entered (trimmed) and must be unique per workspace, case-insensitively; attributes is a flat map of up to 50 string, number or boolean values that segment rules can match by key.

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

Request

POST /api/contacts

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
emailRequiredstring{"minLength":3,"maxLength":254,"pattern":"^[^\s@]+@[^\s@]+\.[^\s@]+$"}
firstNameOptionalSee schema{}
lastNameOptionalSee schema{}
localeOptionalSee schema{}
timezoneOptionalSee schema{}
attributesOptionalobject{}

Exact input schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "minLength": 3,
      "maxLength": 254,
      "pattern": "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
    },
    "firstName": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "lastName": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "locale": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
        },
        {
          "type": "null"
        }
      ]
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ]
    },
    "attributes": {
      "type": "object",
      "propertyNames": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9_]{0,62}$"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 500
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          }
        ]
      }
    }
  },
  "required": [
    "email"
  ],
  "additionalProperties": false
}

Effects

  • Creates one active contact in the workspace's contacts database. Nothing is sent to the contact.

Interpret the response

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

Call app_topolo_nurture.contacts.get with $.contact.id and confirm the stored fields.

Exact success schema:

{
  "type": "object",
  "required": [
    "contact"
  ],
  "properties": {
    "contact": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "emailHash": {
          "type": "string",
          "description": "Org-scoped salted SHA-256 address key shared with @topolo-io/audience."
        },
        "firstName": {
          "type": [
            "string",
            "null"
          ]
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ]
        },
        "locale": {
          "type": [
            "string",
            "null"
          ]
        },
        "timezone": {
          "type": [
            "string",
            "null"
          ]
        },
        "attributes": {
          "type": "object"
        },
        "source": {
          "type": "string",
          "enum": [
            "manual",
            "csv",
            "signup",
            "connector"
          ]
        },
        "sourceRef": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "archived"
          ]
        },
        "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:

{
  "email": "ada@example.com",
  "timezone": "Europe/London"
}

CLI:

topolo actions validate app_topolo_nurture.contacts.create --data @payload.json --json
topolo actions plan app_topolo_nurture.contacts.create --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.contacts.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.contacts.create",
    "input": {
      "email": "ada@example.com",
      "timezone": "Europe/London"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "contact": {
    "id": "nct_5343bec9ee3743269b15515100f009ff",
    "email": "ada@example.com",
    "emailHash": "f2f9af61eaa6f01b12704c26c1bd3bec774f36a43566ad48697869708117154d",
    "firstName": null,
    "lastName": null,
    "locale": null,
    "timezone": "Europe/London",
    "attributes": {},
    "source": "manual",
    "sourceRef": null,
    "status": "active",
    "createdAt": "2026-10-04T00:32:38.639Z",
    "updatedAt": "2026-10-04T00:32:38.639Z"
  }
}

HTTP 201. Call app_topolo_nurture.contacts.get with $.contact.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:

{
  "email": "ada@example.com",
  "timezone": "Europe/London"
}

CLI:

topolo actions validate app_topolo_nurture.contacts.create --data @payload.json --json
topolo actions plan app_topolo_nurture.contacts.create --resource-type workspace --resource-id "$NURTURE_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_nurture.contacts.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.contacts.create",
    "input": {
      "email": "ada@example.com",
      "timezone": "Europe/London"
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "contact": {
    "id": "nct_f4095688094d4d2dbdfe8c7286d89d25",
    "email": "ada@example.com",
    "emailHash": "f2f9af61eaa6f01b12704c26c1bd3bec774f36a43566ad48697869708117154d",
    "firstName": null,
    "lastName": null,
    "locale": null,
    "timezone": "Europe/London",
    "attributes": {},
    "source": "manual",
    "sourceRef": null,
    "status": "active",
    "createdAt": "2026-10-04T00:32:38.508Z",
    "updatedAt": "2026-10-04T00:32:38.508Z"
  }
}

HTTP 201. Call app_topolo_nurture.contacts.get with $.contact.id and confirm the stored fields.

Refused request · contact_exists

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:

{
  "email": "ADA@example.com"
}

CLI:

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

Captured local response · HTTP 409:

{
  "error": {
    "code": "contact_exists",
    "message": "A contact with this email already exists in this workspace."
  }
}

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

Refused request · invalid_email

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:

{
  "email": "a..b@x.io"
}

CLI:

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

Captured local response · HTTP 422:

{
  "error": {
    "code": "invalid_email",
    "message": "The email address is not valid."
  }
}

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

Refused request · invalid_input

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:

{
  "email": "nope"
}

CLI:

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

Captured local response · HTTP 422:

{
  "error": {
    "code": "invalid_input",
    "message": "The input does not match the action schema.",
    "details": [
      {
        "origin": "string",
        "code": "invalid_format",
        "format": "regex",
        "pattern": "/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/",
        "path": [
          "email"
        ],
        "message": "Invalid string: must match pattern /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/"
      }
    ]
  }
}

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

Verify the result

  • Call app_topolo_nurture.contacts.get with $.contact.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.
  • contact_exists (HTTP 409): Emails are unique per workspace; find the existing contact with app_topolo_nurture.contacts.list (q = the email) and update it instead.
  • invalid_email (HTTP 422): Send a valid address; it is normalized (lower-cased, punycode domain) before the uniqueness check.

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

Erase the contact created in error (permanent), or archive it to keep the record.

  • Get contact: Read one Nurture contact by id, including its attributes and source.
  • Update contact: Change an active contact's email, names, locale, timezone or attributes. Only the fields sent change; attributes, when sent, replace the whole map; null clears a name, locale or timezone.
  • Erase contact permanently: Right to erasure: permanently delete one contact, remove all of its segment membership history, journey enrollments (with their steps and intended sends), lead score, score history and lead handoff records, subscription history, confirmation tokens, send reservations and contact-scoped suppression events, and detach it from every lifecycle event (the events remain without a contact). Org-wide address suppressions (hard_bounce, deliverable, complaint, wrong_person) are deliberately KEPT, keyed only by the salted address hash, so an erased address that bounced or complained can never be mailed again, and an address-scoped erased suppression event is recorded so the erased address stays suppressed org-wide for every purpose, even if it is imported again (nothing lifts it). Requires confirm: true. Event properties sent by callers are not rewritten.

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.