---
ref: tool:resend/add-contact-to-segment
name: Add a contact to a segment
company: company:resend
workflows: []
access: [mcp, cli, api]
tags: [capability:build-audience, category:email, has:api, has:cli, has:mcp]
docs: https://resend.com/docs/api-reference/contacts/add-contact-to-segment
updated: 2026-09-27
---

# Add a contact to a segment

Adds an existing contact, found by ID or email address, to a segment that broadcasts can target.

Note: The contact must already exist; to put a new contact in segments, pass `segments` when you create it.

## 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": { "resend": { "url": "https://mcp.resend.com/mcp" } } }
```

Call the MCP tool `add-contact-to-segment`.

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

### CLI (official)

Install the command, then confirm it runs.

```sh
npm install -g resend-cli
resend --version
```

Run `resend contacts add-segment`.

Set `$RESEND_API_KEY` in your environment first (get a key: https://resend.com/api-keys).

### API (official)

- Base URL: https://api.resend.com
- Endpoint: `POST /contacts/{contact_id}/segments/{segment_id}`
- Auth: send the header `Authorization: Bearer $RESEND_API_KEY`
- Get a key: https://resend.com/api-keys
- Docs: https://resend.com/docs/api-reference/introduction

Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
