# Edit Contact — SlickText

> Updates personal details of an existing contact. See the documentation

- Key: `slicktext-edit-contact`
- Type: Action (Write)
- Version: 0.0.2
- App: SlickText (`slicktext`) — https://pipedream.com/apps/slicktext.md
- This page (HTML): https://pipedream.com/apps/slicktext/actions/edit-contact
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/slicktext/actions/edit-contact/edit-contact.mjs

## Description

Updates personal details of an existing contact. [See the documentation](https://api.slicktext.com/docs/v1/contacts#6)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `contactId` | `string` | Yes | The ID of the contact to be updated Options are loaded from the connected account. |
| `mobileNumber` | `string` | No | The US phone number of the contact. Must be at least 10 digits. It will be normalized to digits-only, preceded by a + |
| `firstName` | `string` | No | The first name of contact |
| `lastName` | `string` | No | The last name of contact |
| `email` | `string` | No | The email address of the contact |
| `birthdate` | `string` | No | The birthday of the contact formatted as: YYYY-MM-DD |
| `address` | `string` | No | The street address of the contact |
| `city` | `string` | No | The city of the contact |
| `state` | `string` | No | The state of the contact |
| `zip` | `string` | No | The zip code of the contact |
| `country` | `string` | No | The country of the contact |
| `timezone` | `string` | No | The time zone of contact |
| `language` | `string` | No | The primary language of contact (“en”) |
| `optInStatus` | `string` | No | The opt-in status of contact (Default is not subscribed) |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
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 accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "slicktext",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "slicktext-edit-contact",
  arguments: {
    contactId: "Contact ID",
    mobileNumber: "Mobile Number",
  },
})
```

**TypeScript**

```ts
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: "slicktext-edit-contact",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    slicktext: { authProvisionId: "apn_xxxxxxx" },
    contactId: "Contact ID",
    mobileNumber: "Mobile Number",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "slicktext-edit-contact",
    "configured_props": {
      "slicktext": { "authProvisionId": "apn_xxxxxxx" },
      "contactId": "Contact ID",
      "mobileNumber": "Mobile Number"
    }
  }'
```

---

- App: https://pipedream.com/apps/slicktext.md · All apps: https://pipedream.com/apps
