# Your audience

> An audience is a named contact list. Build one, fill it with contacts, and send a campaign to everyone on it.

An **audience** is a named list of contacts — the people you send marketing email to. Each audience is a simple container: it has a `name`, a generated `id`, and a `created_at` timestamp. Contacts live **inside** an audience, addressed at `/audiences/:audience_id/contacts`.

You build audiences in the dashboard under **Audiences**, or through the [API](https://www.sendping.co/docs/api/audiences-create). When you send a campaign, you point it at one audience and SendPing delivers a copy to every subscribed contact on the list.

## What an audience holds

An audience brings together everything you need to send marketing email to a group of people:

- **[Contacts](https://www.sendping.co/docs/audiences/contacts)** — the individual email addresses on the list. Each contact is associated with a single email address, can carry custom properties, can belong to zero or more [segments](https://www.sendping.co/docs/segments/overview), and can be opted in or out of individual [topics](https://www.sendping.co/docs/topics/overview).
- **[Properties](https://www.sendping.co/docs/audiences/properties)** — the fields stored on each contact. Every contact has the default properties `email`, `first_name`, `last_name`, and `unsubscribed`; you can also add custom properties to store extra data and personalize campaigns.
- **[Segments](https://www.sendping.co/docs/segments/overview)** — saved filters that resolve to a subset of the audience, so you can send to a specific group rather than the whole list.
- **[Topics](https://www.sendping.co/docs/topics/overview)** — subscription categories within the audience that let a contact opt out of one kind of email without unsubscribing from everything.

> **Note:** Each contact keeps a history of its marketing interactions (sends, opens, clicks, unsubscribes), so you can see how a person has engaged with your campaigns over time.

## Importing contacts in bulk

Upload CSV files up to **5 MB** in the dashboard (the super-admin has no product file-size cap). Stored contacts are **unlimited on every plan**. The source is archived privately in S3, fully validated, and previewed with the first 20 contacts before confirmation. Non-email columns become built-in fields or custom properties for campaign merge tags.

## The audience object

```json
{
  "object": "audience",
  "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "name": "Registered Users",
  "created_at": "2026-06-23T17:22:43.000Z"
}
```

## Creating an audience

Give the audience a `name` — that is the only field. The response is the new audience object, including the `id` you use to add contacts and send campaigns.

**Node.js**

```js
import { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

const { data, error } = await mb.audiences.create({ "name": "Registered Users" });
console.log({ data, error });
```

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

SendPing::Audiences.create({
  "name": "Registered Users"
})
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

$sendping->audiences->create([
  'name' => "Registered Users"
]);
```

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

sendping.Audiences.create({
  "name": "Registered Users"
})
```

**Go**

```go
import "github.com/shekhu10/sendping-sdks/sendping-go"

client := sendping.NewClient("mb_xxxxxxxxx")

audience, err := client.Audiences.Create(&sendping.CreateAudienceRequest{
    Name: "Registered Users",
})
```

**Rust**

```rust
use sendping::SendPing;

let mb = SendPing::new("mb_xxxxxxxxx");

let _audience = mb.audiences.create("Registered Users").await?;
```

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

SendPingResponse response = sendping.audiences().create("Registered Users");
```

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

var resp = await sendping.AudienceCreateAsync("Registered Users");
```

**cURL**

```bash
curl -X POST 'https://www.sendping.co/api/audiences' \
  -H 'Authorization: Bearer mb_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "Registered Users" }'
```

**CLI**

```bash
sendping audiences create \
  --name 'Registered Users'
```

## How campaigns use an audience

- A campaign targets exactly **one audience** — every contact on the list receives a copy.
- Contacts marked **`unsubscribed`** are skipped, so opted-out recipients never get the send. See [Managing unsubscribed contacts](https://www.sendping.co/docs/audiences/unsubscribed).
- Each recipient gets a personal unsubscribe link; clicking it flips that contact to `unsubscribed` for future campaigns.

> **Note:** Deleting an audience is blocked while a campaign still references it — delete the campaign(s) first. See [Delete audience](https://www.sendping.co/docs/api/audiences-delete).

## Next steps

- [Manage contacts](https://www.sendping.co/docs/audiences/contacts) — add people to an audience and edit their details.
- [Manage unsubscribed contacts](https://www.sendping.co/docs/audiences/unsubscribed) — how opt-outs work.
- [Create an audience via the API](https://www.sendping.co/docs/api/audiences-create).
