Skip to main content
POST
/
blocklist
/
domains
Block email domains
curl --request POST \
  --url https://api.open.cx/blocklist/domains \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domains": "<string>",
  "reason": "<string>"
}
'
{
  "blocked": [
    {
      "id": "<string>",
      "domain": "<string>",
      "reason": "<string>",
      "created_at": "2023-11-07T05:31:56Z"
    }
  ],
  "skipped": [
    "<string>"
  ],
  "summary": {
    "total": 123,
    "blocked": 123,
    "skipped": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
domains
string
required

Domain(s) to block — comma-separated for multiple (e.g. "spam.com, junk.org")

Minimum string length: 1
reason
string

Why these domains are being blocked

Response

Default Response

blocked
object[]
required

Domains that were successfully blocked

skipped
string[]
required

Domains that were already blocked

summary
object
required