Update a block entry
Updates a block entry's reason, notes, active state, or expiry. Use this endpoint to update a block entry through the Samva email API.
PATCH
Updates a block entry's reason, notes, active state, or expiry.
apiKeyheader
x-api-key<token>id*stringMatch
^blk_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
reason?string|nullnotes?string|nullisActive?boolean|nullexpiresAt?string|null|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|nullupdatedAt*stringimport { 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"}