> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Rejection Logs

Find rejected messages and the reasons for their rejection.

Required application permissions: `Monitoring | Rejections | Read`.

`Note:` You must provide at least one parameter to execute the action.

<Note>
  External Documentation

  To learn more, visit the [Mimecast documentation](https://developer.services.mimecast.com/docs/auditevents/1/routes/api/gateway/get-rejections/post).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter            | Description                                                                                                                                                                                                                                      |
  | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | Admin                | Indicate whether the request is at the `admin` or `user` level. When selected, the request retrieves messages for **all users**.                                                                                                                 |
  | Search By End Date   | The end date ot results to search by. The default value is the current date.                                                                                                                                                                     |
  | Search By Mailbox    | Retrieve rejections by a given user. If the `Admin` parameter is selected and no mailbox is provided, will retrieve rejections for **all users**. Otherwise, if no mailbox is provided, will retrieve rejections for the **authenticated user**. |
  | Search By Start Date | The start date of results to search by. The default value id the start on the current day.                                                                                                                                                       |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter    | Description                                    |
  | ------------ | ---------------------------------------------- |
  | Search Field | The field to be searched.                      |
  | Search Value | The value on which the search will be applied. |
</div>

## Example Output

```json theme={"dark"}
{
	"data": {
		"rejections": [
			{
				"created": "yyyy-MM-dd'T'HH:mm:ssZ",
				"description": "string",
				"detectionLevel": "not_initiated",
				"fromAddress": "string",
				"id": "string",
				"info": "string",
				"ipAddress": "string",
				"manageRecipient": true,
				"remoteEhlo": "string",
				"remoteName": "string",
				"spamScore": 0,
				"toAddress": "string",
				"toAddressPostCheck": "string",
				"toAddressPreCheck": "string",
				"type": 0
			}
		]
	},
	"fail": [
		{
			"errors": [
				{
					"code": "string",
					"message": "string",
					"retryable": true
				}
			],
			"key": {
				"admin": true,
				"end": "yyyy-MM-dd'T'HH:mm:ssZ",
				"mailbox": "string",
				"searchBy": {
					"field": "string",
					"value": "string"
				},
				"start": "yyyy-MM-dd'T'HH:mm:ssZ"
			}
		}
	]
}
```

## Workflow Library Example

[Get Rejection Logs with Mimecast and Send Results Via Email](https://library.blinkops.com/workflows/get-rejection-logs-with-mimecast-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/get-rejection-logs-with-mimecast-and-send-results-via-email/canvas" />
</div>
