> ## 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).

## Basic Parameters

| 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. |

## Advanced Parameters

| Parameter | Description |
| - | - |
| Search Field | The field to be searched. |
| Search Value | The value on which the search will be applied. |

## 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"
			}
		}
	]
}
```
