> For the complete documentation index, see [llms.txt](https://docs.sirdata.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sirdata.net/notification-api/audience.md).

# Audience

## Get audience list

<mark style="color:blue;">`GET`</mark> `https://partner-api.sddan.com/api/v1/public/event-notify/audience`

Get token

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | token       |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
[
  {
    "id": "xxxxxxx-e8ad-4f53-9234-2fca87fe9d86",
    "id_partner": 12345,
    "name": "My Audience",
    "type": "EMAIL_HASH",
    "status": "UPLOADING",
    "last_update": "2019-07-29 12:50:38"
  }
]
```

{% endtab %}
{% endtabs %}

## Get audience

<mark style="color:blue;">`GET`</mark> `https://partner-api.sddan.com/api/v1/public/event-notify/audience/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | string | audience id |

#### Headers

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| Authorization | string | token       |

{% tabs %}
{% tab title="200 " %}

```
  {
    "id": "xxxxxxx-e8ad-4f53-9234-2fca87fe9d86",
    "id_partner": 12345,
    "name": "My Audience",
    "type": "EMAIL_HASH",
    "status": "UPLOADING",
    "last_update": "2019-07-29 12:50:38"
  }
```

{% endtab %}

{% tab title="404 audience id not found" %}

```
```

{% endtab %}
{% endtabs %}

## Create audience

<mark style="color:green;">`POST`</mark> `https://partner-api.sddan.com/api/v1/public/event-notify/audience`

Post csv (comma separator) with 3 columns :\
\- hash type : hd\_m (md5) or hd\_s256 (sha 256)\
\- hash value\
\- reference id

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| name          | string | audience name |
| Authorization | string | token         |

{% tabs %}
{% tab title="200 " %}

```
  {
    "id": "xxxxxxx-e8ad-4f53-9234-2fca87fe9d86",
    "id_partner": 12345,
    "name": "My Audience",
    "type": "EMAIL_HASH",
    "status": "UPLOADING",
    "last_update": "2019-07-29 12:50:38"
  }
```

{% endtab %}

{% tab title="400 " %}

```
```

{% endtab %}
{% endtabs %}
