---
ref: tool:klaviyo/upsert-profile
name: Create or update a profile
company: company:klaviyo
workflows: []
access: [mcp, cli, api]
tags: [capability:build-audience, category:email, has:api, has:cli, has:mcp]
docs: https://developers.klaviyo.com/en/reference/create_or_update_profile
updated: 2026-09-27
---

# Create or update a profile

Creates a profile or updates the one that matches, with contact details, location and custom properties.

Returns 201 for a new profile and 200 for an updated one. A field set to
`null` is cleared, and a field left out keeps its value. To give a profile
consent to receive marketing, subscribe it with Bulk Subscribe Profiles.

## Set up

Use the first option your agent supports.

### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "klaviyo": { "url": "https://mcp.klaviyo.com/mcp" } } }
```

Call the MCP tool `create_or_update_profile`.

Server URL: https://mcp.klaviyo.com/mcp

### CLI (official)

Install the command, then confirm it runs.

```sh
go install github.com/klaviyo/klaviyo-cli/cmd/klaviyo@latest
klaviyo --version
```

Run `klaviyo profiles create-or-update-profile`.

Set `$KLAVIYO_API_KEY` in your environment first (get a key: https://www.klaviyo.com/create-private-api-key).

### API (official)

- Base URL: https://a.klaviyo.com
- Endpoint: `POST /api/profile-import`
- Auth: send the header `Authorization: Klaviyo-API-Key $KLAVIYO_API_KEY`
- Get a key: https://www.klaviyo.com/create-private-api-key
- Docs: https://developers.klaviyo.com/en/reference/api_overview

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
