upsert_account
Create or update a customer organization by external ID, merging attributes and optionally adding members so segments and emails can reference organization data.
Instructions
Create or update a customer organization (Subscribers > Organizations in the dashboard) by external ID. Attributes merge into the stored attributes (a null value deletes a key; set replaceAttributes to replace them all). Optional members are added in the same call. Use this to model companies, workspaces or teams so segments can filter on organization.plan and emails can use {{organization.name}} (account.* still works). The first organization turns Organizations on for the workspace; it fails with a 409 error when contacts already use a custom attribute named account or account.*, which must be renamed first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"externalId": "<externalId>"
},
"name": "upsert_account"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name, e.g. Acme. | |
| domain | No | Primary domain, e.g. acme.com. | |
| members | No | Contacts to add as members in the same call. | |
| companyId | No | Company ID. If not provided, uses the currently selected company. | |
| attributes | No | Account attributes such as plan, seats, mrr or trialEndsAt (max 100 keys). Nested objects flatten to dotted names. | |
| externalId | Yes | Customer-owned account (organization/workspace) ID, e.g. the org id in your app. | |
| replaceAttributes | No | Replace all stored attributes instead of merging. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Additional context about the result. | |
| items | No | Fallback array wrapper used only when a tool returns a bare array. | |
| value | No | Fallback object wrapper used only when a tool returns a non-object value. | |
| account | No | The account record returned by Sequenzy. | |
| created | No | True when the account was created. | |
| members | No | Members added in this call, when provided. | |
| message | No | Human-readable status, confirmation, or next-step message. | |
| success | No | Whether the Sequenzy operation succeeded. | |
| warnings | No | Non-fatal cautions about content, permissions, or follow-up actions. |