post_domain_bulletin

The post_domain_bulletin method sends a specified bulletin to all users in a domain.

📘

Note:

To get a list of all current bulletins, use the get_domain method.

Syntax

{
    <credentials object>, 
    "domain": <domain_name>, 
    "bulletin": <bulletin_name>,
    "type": auto | manual, 
    "test_email": <email_address> 
    },
}

Request fields for post_domain_bulletin

The following fields can be used in the post_domain_bulletin method:

Field nameObligationDefinition/Value
bulletinRequiredThe name of the bulletin you want to view.
domainRequiredThe name of the domain.
test_emailOptionalSend the bulletin to only the specified email address. If not specified, the bulletin is sent to all mailboxes in the domain.
typeRequiredThe bulletin type. Allowed values are:

auto — The bulletin is automatically sent to new users when their accounts are created.

manual — The bulletin is sent only when the post_domain_bulletin method is run.

Response fields for post_domain_bulletin

The following fields may be returned in response to the post_domain_bulletin method:

Field nameObligationDescription/Value
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.

Examples for post_domain_bulletin

Example 1

Sends a bulletin to just [email protected].

Request

{
   "credentials": {
     "user": "[email protected]",
     "password": "sw0rdfish"
   },
   "domain": "example.com",
   "bulletin": "Welcome Message", 
   "type": "autol"
   "test_email": "[email protected]"
}

Response

{
  "success": true
}

Example 2

Sends a bulletin to all users in the domain example.com.

Request

{
  credentials": {
    user": "[email protected]",
    password": "pencil75"
  },
  "domain": "example.com",
  "bulletin": "Welcome Message",
  "type": "auto"
}

Response

{
  "success": true
}