---
title: "Add a block entry"
method: POST
path: "/v1/email/blocks"
tags: ["Email"]
---

# Add a block entry

`POST /v1/email/blocks`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/email/blocks`
- Auth: API key in header `x-api-key`

Blocks an email address or domain from inbound receiving and returns the created block entry. Responds with 201.

## Request body

- object
  - `blockType` 'email' | 'domain', required
  - `blockValue` string, required
  - `reason` string, required
  - `notes` string, nullable
  - `expiresAt` string, nullable

## Response `201`

Success

- object
  - `id` string, required
  - `blockType` 'email' | 'domain', required
  - `blockValue` string, required
  - `reason` string, required
  - `notes` string, nullable, required
  - `isActive` boolean, required
  - `expiresAt` string, nullable, required
  - `createdAt` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `409`: ConflictError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
