Blocked Sender
  • 16 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Blocked Sender

  • Dark
    Light

Article summary

Blocked Sender

Block sender,reject or mark as junk message.

Blocked Sender JSON Format

Blocked Sender is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of blocked sender.
emailOrDomainstringBlocked email or domain.
blockLevelstringHow to block a message. Allowed values are "markFutureMessagesAsJunk", "rejectAllFutureMessages".

Get the list of Blocked Senders

GET ticketing/blockedSenders

  • Parameters:

NameTypeinRequiredDescription
emailOrDomainstringquerynoFilter by email or domain.
  • Response:

An array of Blocked Sender

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/blockedSenders \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "blockedSenders": [
      {
          "id": "6251ff43-4fcf-44fd-875f-a8dbeff95513",
          "emailOrDomain": "comm100.com",
          "blockLevel": "rejectAllFutureMessages"
      }
  ],
  "nextPage": null,
  "previousPage": null,
  "total": 1
} 

Get a single Blocked Sender

GET ticketing/blockedSenders/{id}

  • Parameters:

No Parameters

  • Response:

Blocked Sender

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/blockedSenders/6251ff43-4fcf-44fd-875f-a8dbeff95513 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "id": "6251ff43-4fcf-44fd-875f-a8dbeff95513",
  "emailOrDomain": "comm100.com",
  "blockLevel": "rejectAllFutureMessages"
} 

Create a new Blocked Sender

POST ticketing/blockedSenders

  • Parameters:

NameTypeinRequiredDescription
emailOrDomainstringbodyyesBlocked email or domain.
blockLevelstringbodynoHow to block a message. Allowed values are "markFutureMessagesAsJunk", "rejectAllFutureMessages".
  • Response:

Blocked Sender

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/blockedSenders \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"emailOrDomain":"comm100.com","blockLevel":"rejectAllFutureMessages"}' 

Response:

HTTP/1.1 201 Created

{
  "id": "6251ff43-4fcf-44fd-875f-a8dbeff95513",
  "emailOrDomain": "comm100.com",
  "blockLevel": "rejectAllFutureMessages"
} 

Update the Blocked Sender

PUT ticketing/blockedSenders/{id}

  • Parameters:

NameTypeinRequiredDescription
emailOrDomainstringbodyyesBlocked email or domain.
blockLevelstringbodynoHow to block a message. Allowed values are "markFutureMessagesAsJunk", "rejectAllFutureMessages".
  • Response:

Blocked Sender

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/blockedSenders/6251ff43-4fcf-44fd-875f-a8dbeff95513 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"emailOrDomain":"comm100.com","blockLevel":"rejectAllFutureMessages"}' 

Response:

HTTP/1.1 200 OK

{
  "id": "6251ff43-4fcf-44fd-875f-a8dbeff95513",
  "emailOrDomain": "comm100.com",
  "blockLevel": "rejectAllFutureMessages"
} 

Remove the Blocked Sender

DELETE ticketing/blockedSenders/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/blockedSenders/6251ff43-4fcf-44fd-875f-a8dbeff95513 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?