---
title: "Receive SES bounce and complaint notifications"
description: "SNS."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/webhooks/receive-ses-bounce-and-complaint-notifications"
---
# Receive SES bounce and complaint notifications

> SNS.

<api-operation method="POST" path="/v1/email_webhooks/ses">
<template v-slot:docs="">

UNAUTHENTICATED by design — AWS SNS cannot present an API key, so authenticity comes from the SNS signature instead, verified before anything is read. SNS posts `text/plain`, and the raw bytes are kept because the signature is computed over them. A `SubscriptionConfirmation` is confirmed automatically, but only AFTER the signature verifies, since the callback URL is attacker-supplied otherwise. Always answers 200 for a verified message — including one it ignores — because a non-2xx makes SNS retry a notification that was understood.

## Headers

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Idempotency-Key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Safely retry writes — repeats return the original response. If a write FAILED after it had already taken effect, that failure is what repeats: the key is spent, and a new attempt needs a new key.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        received
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Always true; the event was received. One of <code>
        true
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        confirmed
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Present on a SubscriptionConfirmation.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ignored
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Present when the message carried no actionable feedback.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Verified and handled
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        400
      </code>
    </td>
    
    <td>
      Body is not JSON
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        403
      </code>
    </td>
    
    <td>
      SNS signature rejected
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        409
      </code>
    </td>
    
    <td>
      Idempotency-Key conflict — the key is already in flight, or was reused with a different request payload.
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl -X POST "$TMBILLING_URL/v1/email_webhooks/ses" \
  -H "Authorization: Bearer $TMBILLING_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "received": true,
  "confirmed": false,
  "ignored": false
}
```

```json [400 Bad Request]
{
  "error": {
    "type": "invalid_request_error",
    "message": "Body is not JSON"
  }
}
```

```json [403 Forbidden]
{
  "error": {
    "type": "permission_error",
    "message": "SNS signature rejected"
  }
}
```

```json [409 Conflict]
{
  "error": {
    "type": "idempotency_error",
    "message": "Idempotency-Key conflict — the key is already in flight, or was reused with a different request payload."
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
