---
ref: tool:loops/create-audience-segment
name: Create an audience segment
company: company:loops
workflows: []
access: [mcp, cli, api]
tags: [capability:build-audience, category:email, has:api, has:cli, has:mcp]
docs: https://loops.so/docs/api-reference/create-audience-segment
updated: 2026-09-27
---

# Create an audience segment

Saves a named segment of the contacts that match an audience filter, for targeting campaigns and filtering workflows.

The filter matches `all` or `any` of its conditions, such as a contact
property equal to a value. Target a campaign at the segment with its ID. On
the MCP server, `search`, `describe` and `execute` find, inspect and run this
operation.

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

Call the MCP tool `execute`.

Server URL: https://mcp.loops.so

### CLI (official)

Install the command, then confirm it runs.

```sh
brew install loops-so/tap/loops
loops --version
```

Run `loops audience-segments create`.

Set `$LOOPS_API_KEY` in your environment first (get a key: https://app.loops.so/settings?page=api).

### API (official)

- Base URL: https://app.loops.so/api
- Endpoint: `POST /v1/audience-segments`
- Auth: send the header `Authorization: Bearer $LOOPS_API_KEY`
- Get a key: https://app.loops.so/settings?page=api
- Docs: https://loops.so/docs/api-reference/intro

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.
