# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sirdata.net/notification-api/audience.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
