Skip to Content

Update a block entry

Updates a block entry's reason, notes, active state, or expiry. Request: PATCH /v1/email/blocks/{id}. Scope: email:send.

PATCH
/v1/email/blocks/{id}

Updates a block entry's reason, notes, active state, or expiry.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^blk_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
reason?string|null
notes?string|null
isActive?boolean|null
expiresAt?string|null|null

Response Body

Success

application/json
  1. response
id*BlockedEmailId
Match^blk_[0-9a-hjkmnp-tv-z]{16,24}$
blockType*string
Value in"email""domain"
blockValue*string
reason*string
notes*string|null
isActive*boolean
expiresAt*string|null
updatedAt*string
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.email.updateBlock({
  "id": "example"
});
Example Response
{
  "id": "string",
  "blockType": "email",
  "blockValue": "string",
  "reason": "string",
  "notes": "string",
  "isActive": true,
  "expiresAt": "string",
  "updatedAt": "string"
}

Related documentation