# Retrieve Poll Results

> GET /polls/:emailId — the aggregated answer breakdown for one email.

`GET /polls/:emailId`

Retrieve the aggregated poll results for a single email: a tally per answer (most-voted first, with each answer's share of all responses), the total number of responses, and the number of distinct respondents.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `email_id` | string | Yes | The id of the email the poll was sent on. |

**Node.js**

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

const mb = new SendPing('mb_xxxxxxxxx');

const { data, error } = await mb.polls.get('8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d');
console.log({ data, error });
```

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

SendPing::Polls.get("8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d")
```

**PHP**

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

use SendPing\SendPing;

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

$sendping->polls->get('8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d');
```

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

sendping.Polls.get("8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d")
```

**Go**

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

client := sendping.NewClient("mb_xxxxxxxxx")

poll, err := client.Polls.Get("8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d")
```

**Rust**

```rust
use sendping::SendPing;

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

let _poll = mb.polls.get("8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d").await?;
```

**Java**

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

SendPing sendping = new SendPing("mb_xxxxxxxxx");

SendPingResponse response = sendping.polls().get("8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d");
```

**.NET**

```csharp
using SendPing;

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

var resp = await sendping.PollRetrieveAsync("8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d");
```

**cURL**

```bash
curl -X GET 'https://www.sendping.co/api/polls/8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
sendping polls get 8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d
```

### Response

```json
{
  "object": "poll_result",
  "email_id": "8f2e4a3b-dfbc-4e9a-8b2c-5f3a1d6e7c8d",
  "total": 128,
  "unique_respondents": 121,
  "answers": [
    { "answer": "Great", "count": 74, "pct": 57.8 },
    { "answer": "Okay", "count": 39, "pct": 30.5 },
    { "answer": "Poor", "count": 15, "pct": 11.7 }
  ]
}
```

A vote also emits a `poll.responded` [automation](https://www.sendping.co/docs/automations/trigger) event, so you can trigger a workflow (or branch on `event.answer`) when a contact responds.
