# Create audience

> POST /audiences — create a new contact list.

`POST /audiences`

Create a new audience. The only field is a `name`. Returns the new audience object with a generated `id`.

**Body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | A name for the audience. Required and must be non-empty. |

**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'
```

**Response (201)**

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

Omitting `name` returns `422 missing_required_field`. See [Errors](https://www.sendping.co/docs/api/errors).
