Add a block entry
Blocks an email address or domain from inbound receiving and returns the created block entry. Responds with 201.
POST
Blocks an email address or domain from inbound receiving and returns the created block entry. Responds with 201.
apiKeyheader
x-api-key<token>application/json- body
blockType*stringValue in
"email""domain"blockValue*stringreason*stringnotes?string|nullexpiresAt?string|nullSuccess
application/json- response
id*BlockedEmailIdMatch
^blk_[0-9a-hjkmnp-tv-z]{16,24}$blockType*stringValue in
"email""domain"blockValue*stringreason*stringnotes*string|nullisActive*booleanexpiresAt*string|nullcreatedAt*stringimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.email.addBlock({ "blockType": "email", "blockValue": "example", "reason": "example"});Example Response
{ "id": "string", "blockType": "email", "blockValue": "string", "reason": "string", "notes": "string", "isActive": true, "expiresAt": "string", "createdAt": "string"}