Browse the docs

Tools: Companies and people

upsert_company

Create a company, or update it if one with the same domain already exists. Always prefer this over creating blindly: it deduplicates on the normalized domain (https://www.acme.com/x → acme.com). Only the fields you pass are changed.

GroupCompanies and people
Scopecrm:write
Who can call itAgents and people with this scope.
KindWrite. Recorded in the change history with who made it.
RetriesPass idempotency_key (MCP) or the Idempotency-Key header (REST); a retry with the same key within 24 hours returns the first result.
WidgetIn hosts that support MCP Apps, the result shows where the write landed (the changed record, the pipeline, or the updated list).

Parameters

ParameterTypeRequiredNotes
idid (uuid)noUpdate this existing record, including when its dedupe field is missing.
namestringnoRequired when creating a new company.
domainstringnoWebsite or domain. The dedupe key.
descriptionstringno
customobjectnoValues for this workspace's custom fields, by key (see describe_schema). Checked against each field's type; null clears one.
sourceobject { name, url? }no
source.namestringyesmax 100 characters
source.urlstringno

Call it over MCP

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "upsert_company",
    "arguments": {
      "idempotency_key": "log-call-acme-2026-11-02"
    }
  }
}

Send it to https://api.tandemcrm.app/mcp (streamable HTTP). Most people never write this by hand: their agent picks the tool from its description.

Call it over REST

curl -X POST https://api.tandemcrm.app/v1/ops/upsert_company \
  -H "Authorization: Bearer $TANDEM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: log-call-acme-2026-11-02" \
  -d '{}'

Input schema

The JSON Schema the MCP server advertises for this tool (over MCP it also accepts idempotency_key):

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "description": "Update this existing record, including when its dedupe field is missing.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "name": {
      "description": "Required when creating a new company.",
      "type": "string",
      "minLength": 1
    },
    "domain": {
      "description": "Website or domain. The dedupe key.",
      "type": "string",
      "minLength": 3
    },
    "description": {
      "type": "string"
    },
    "custom": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {},
      "description": "Values for this workspace's custom fields, by key (see describe_schema). Checked against each field's type; null clears one."
    },
    "source": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "url": {
          "type": "string",
          "pattern": "^https?:\\/\\/"
        }
      },
      "required": [
        "name"
      ]
    }
  }
}

This page as Markdown · All docs in one file