In order to successfully use this endpoint the logged in user must be a Mimecast administrator with at least the Gateway | Managed Senders | Edit permission.
URI
To use this endpoint you send a POST request to:
/api/managedsender/permit-or-block-sender
Request Headers
The following request headers must be included in your request:
Field
Description
Authorization
Please see the Authorization guide for more information on building the Authorization header.
x-mc-req-id
A randomly generated GUID, for example,
8578FCFC-A305-4D9A-99CB-F4D5ECEFE297
x-mc-app-id
The Application ID provided with your Registered API Application.
x-mc-date
The current date and time in the following format, for example,
Tue, 24 Nov 2015 12:50:11 UTC
Request Body
{
"data": [
{
"action": "String",
"to": "String",
"sender": "String"
}
]
}
data
Field
Type
Required
Description
sender
String
Required
The email address of sender to permit or block.
to
String
Required
The email address of recipient to permit or block.
action
String
Required
Choose to either "permit" (to bypass spam checks) or "block" (to reject the email).
Response
{
"fail": [],
"meta": {
"status": 200
},
"data": [
{
"to": "String",
"type": "String",
"id": "String",
"sender": "String"
}
]
}
meta object
Field
Type
Description
status
Number
The function level status of the request.
data
Field
Type
Description
to
String
The email address of the internal recipient.
type
String
The Managed Sender type - "Permit" (to bypass spam checks) or "Block" (to reject the email).
id
String
The Mimecast secure ID of the managed sender object.
sender
String
The email address of the external sender.
Sample Code
Sample code is provided to demonstrate how to use the API and is not representative of a production application. To use the sample code; complete the required variables as described, populate the desired values in the request body, and execute in your favorite IDE. Please see the Global Base URL's page to find the correct base URL to use for your account.
POST {base_url}/api/managedsender/permit-or-block-sender
Authorization: MC {accesskKey}:{Base64 encoded signed Data To Sign}