View as Markdown
Sperse icon

Sperse ACTION

Add or Update Contact

Creates or updates a contact. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Sperse account once, then configure and run Add or Update Contact from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "sperse-add-or-update-contact",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    sperse: { authProvisionId: "apn_xxxxxxx" },
    contactId: "Contact ID",
    contactGroupId: "Contact Group ID",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Add or Update Contact inputs
Property Type Description
contactId Contact ID string
The ID of the contact to update. Leave empty to create a new contact.
Optional Dynamic
contactGroupId Contact Group ID string
The ID of the contact group
Required Dynamic
firstName First Name string
The first name of the contact
Optional
lastName Last Name string
The last name of the contact
Optional
companyName Company Name string
The company name of the contact
Optional
emailAddresses Email Addresses string[]

An array of email objects.

Example:

[
  {
    "emailAddress": "jane.doe@gmail.com",
    "isActive": true,
    "isConfirmed": true,
    "comment": "Primary work email",
    "usageTypeId": "H"
  }
]
Optional
phoneNumbers Phone Numbers string[]

An array of phone objects.

Example:

[
  {
    "phoneNumber": "+14155552671",
    "phoneExtension": "101",
    "isActive": true,
    "isConfirmed": false,
    "comment": "Direct work line",
    "usageTypeId": "C"
  }
]
Optional
addresses Addresses string[]

Array of address objects.

Example:

[
  {
    "contactId": 12345,
    "startDate": "2026-02-13",
    "endDate": "2026-02-13",
    "isActive": true,
    "isConfirmed": true,
    "usageTypeId": "H",
    "ownershipTypeId": "O",
    "streetAddress": "123 Main St",
    "neighborhood": "Main St",
    "city": "New York",
    "stateId": "NY",
    "stateName": "New York",
    "zip": "10001",
    "countryId": "US",
    "countryName": "United States",
    "comment": "Home address"
  }
]
Optional
note Note string
Additional notes about the contact
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
sperse-add-or-update-contact
Version
0.0.2
App
Sperse
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes