# Mimecast

> Track email through Mimecast, release or reject held messages, block senders, review link, attachment and impersonation threats, search the archive, manage profile groups and read audit events.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/mimecast

## Actions

### Add to a group

Add an email address or a whole domain to a profile group.

**Inputs**

- Group (`group_id`, text, required): The profile group. Pick one, or give a group's ID from an earlier step.
- Address or domain (`member`, text, required): An email address (clerk@city.gov) or a whole domain (city.gov).
- Note (`note`, text): A note kept with the member, such as why it was added.

**Outputs**

- `added` (true/false): Whether it was added
- `group_id` (text): The group's ID
- `member` (text): The address or domain added
- `results` (list): Mimecast's result

**Example output**

```json
{
  "added": true,
  "group_id": "eNo1jjsOwjAQRO-yNUi2E5DiEgoaJCQ",
  "member": "clerk@city.gov",
  "results": [
    {
      "member": "clerk@city.gov",
      "success": true
    }
  ]
}
```

### Create a group

Make a new profile group, at the top level or inside another group.

**Inputs**

- Name (`name`, text, required): The new group's name.
- Inside group (`parent_group_id`, text): Make it inside this group. Leave empty for the top level.

**Outputs**

- `id` (text): The new group's ID
- `name` (text): Its name
- `parent_id` (text): The group it is inside, if any

**Example output**

```json
{
  "id": "eNo1jjsOwjAQRO-yNUi2E5DiEgoaJCQ",
  "name": "Records Office",
  "parent_id": null
}
```

### Decode a protected link

Find where a link Mimecast rewrote (one starting with https://protect-...mimecast.com) really goes.

**Inputs**

- Link (`url`, text, required): The rewritten link, copied from the email.

**Outputs**

- `decoded_url` (text): Where it really goes, if Mimecast could decode it
- `message` (text): Why it couldn't be decoded
- `success` (true/false): Whether it was decoded
- `url` (text): The link given

**Example output**

```json
{
  "decoded_url": "https://www.city.gov/agenda",
  "message": null,
  "success": true,
  "url": "https://protect-us.mimecast.com/s/abc123"
}
```

### Delete a group

Delete a profile group. It must have no members or groups inside it.

**Inputs**

- Group (`group_id`, text, required): The profile group. Pick one, or give a group's ID from an earlier step.

**Outputs**

- `deleted` (true/false): Whether it was deleted
- `id` (text): The group's ID
- `status` (text): Mimecast's answer

**Example output**

```json
{
  "deleted": true,
  "id": "eNo1jjsOwjAQRO-yNUi2E5DiEgoaJCQ",
  "status": "success"
}
```

### Get archived message

Get an archived message's sender, recipients, headers, attachments and a preview of its text.

**Inputs**

- Message (`message_id`, text, required): The archived message's ID, from 'Search the archive'.

**Outputs**

- `attachments` (list): Its attachments
- `cc` (list): Who was copied
- `from` (text): The sender
- `id` (text): The message's ID
- `message` (object): Everything Mimecast returned, including headers
- `preview` (text): The start of its text
- `received` (text): When it was received
- `status` (text): ACTIVE or ARCHIVED
- `subject` (text): The subject
- `to` (list): The recipients

**Example output**

```json
{
  "attachments": [
    {
      "contentType": "application/pdf",
      "extension": "pdf",
      "filename": "request-form.pdf",
      "sha256": "4f6b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b",
      "size": 81234,
      "verdict": "clean"
    }
  ],
  "cc": [],
  "from": "pat.lee@example.com",
  "id": "eNoARCHIVED1",
  "message": {
    "headers": [],
    "id": "eNoARCHIVED1"
  },
  "preview": "Under the public records act, I request copies of...",
  "received": "2026-11-02T14:05:11+0000",
  "status": "ARCHIVED",
  "subject": "Public records request #2026-118",
  "to": [
    "clerk@city.gov"
  ]
}
```

### Get message details

Get a tracked message's delivery, spam check and retention details: its attachments, when it will be purged, and any litigation holds and smart tags.

**Inputs**

- Message (`message_id`, text, required): The message's Mimecast ID, from 'Search messages'.

**Outputs**

- `attachments` (list): Its attachments
- `current_purge_date` (text): When Mimecast will purge it from the archive
- `details` (object): Everything Mimecast returned about the message
- `from_envelope` (text): The envelope sender
- `from_header` (text): The sender in the From header
- `id` (text): The message's Mimecast ID
- `litigation_holds` (list): Litigation holds on it
- `original_purge_date` (text): When it was first due to be purged
- `processed` (text): When Mimecast processed it
- `sent` (text): When it was sent
- `smart_tags` (list): Smart tags it is in
- `spam_score` (number): Its spam score
- `status` (text): The message's status
- `subject` (text): The subject

**Example output**

```json
{
  "attachments": [
    {
      "contentType": "application/pdf",
      "extension": "pdf",
      "filename": "request-form.pdf",
      "sha256": "4f6b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b",
      "size": 81234,
      "verdict": "clean"
    }
  ],
  "current_purge_date": "2033-11-02T14:05:12+0000",
  "details": {
    "id": "eNo1jr0OgjAYRd-lc0kMoClrRmNwMDF2Vj4oZvQPg",
    "status": "delivered"
  },
  "from_envelope": "pat.lee@example.com",
  "from_header": "pat.lee@example.com",
  "id": "eNo1jr0OgjAYRd-lc0kMoClrRmNwMDF2Vj4oZvQPg",
  "litigation_holds": [
    {
      "expiryDate": "2028-01-01T00:00:00+0000",
      "id": "eNoHOLD",
      "legalHoldDescription": "Smith v. City 2026"
    }
  ],
  "original_purge_date": "2033-11-02T14:05:12+0000",
  "processed": "2026-11-02T14:05:12+0000",
  "sent": "2026-11-02T14:05:13+0000",
  "smart_tags": [
    {
      "description": "Records requests",
      "id": "eNoTAG",
      "parentId": null,
      "source": "cloud"
    }
  ],
  "spam_score": 0,
  "status": "delivered",
  "subject": "Public records request #2026-118"
}
```

### List attachment scans

List attachments Mimecast's Attachment Protect opened in its sandbox, with what it found.

**Inputs**

- Result (`result`, text): Only attachments with this result. Leave empty for all. One of: `malicious`, `unsafe`, `safe`, `timeout` (Timed out), `error`.
- Direction (`route`, text): Only attachments in mail going this way. Leave empty for all. One of: `inbound`, `outbound`, `internal`.
- From (`start`, date and time): The earliest time to include. Defaults to 24 hours before 'To'.
- To (`end`, date and time): The latest time to include. Defaults to now.
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `attachments` (list): The attachments
- `count` (number): How many were returned
- `has_more` (true/false): Whether there are more than were returned

**Example output**

```json
{
  "attachments": [
    {
      "actionTriggered": "Attachment quarantined",
      "date": "2026-11-02T13:42:02+0000",
      "definition": "Default Attachment Protect Definition",
      "details": "Malicious macro detected",
      "fileHash": "8d2f4c1e9b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e",
      "fileName": "invoice.docm",
      "fileType": "application/vnd.ms-word.document.macroEnabled.12",
      "messageId": "<CAF1234@mail.examp1e.com>",
      "recipientAddress": "clerk@city.gov",
      "result": "malicious",
      "route": "inbound",
      "senderAddress": "billing@examp1e.com",
      "subject": "Invoice overdue - action required"
    }
  ],
  "count": 1,
  "has_more": false
}
```

### List audit events

List what administrators and users did in Mimecast, such as releasing held mail, searching the archive or changing a policy. Mimecast keeps 60 days.

**Inputs**

- Categories (`categories`, list): Only events in these categories. Leave empty for all.
- Containing (`search_text`, text): Only events that mention this text.
- From (`start`, date and time): The earliest time to include. Defaults to 24 hours before 'To'.
- To (`end`, date and time): The latest time to include. Defaults to now.
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many were returned
- `events` (list): The audit events
- `has_more` (true/false): Whether there are more than were returned

**Example output**

```json
{
  "count": 1,
  "events": [
    {
      "auditType": "Held Message Released",
      "category": "held_messages",
      "eventInfo": "Released held message 'Invoice overdue' for clerk@city.gov, by admin@city.gov",
      "eventTime": "2026-11-02T14:10:00+0000",
      "id": "eNoVzrEOgjAQgOF3uRkSSzFRNkddDDHqAUDIT"
    }
  ],
  "has_more": false
}
```

### List blocked sender policies

List the account's blocked senders policies: who is blocked, for whom, and whether each is on.

**Inputs**

- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): Whether there are more than were returned
- `policies` (list): The policies

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "policies": [
    {
      "bidirectional": false,
      "description": "Block known phishing domain",
      "enabled": true,
      "enforced": false,
      "from": {
        "domain": "examp1e.com",
        "emailAddress": null,
        "group": null,
        "type": "email_domain"
      },
      "fromDateTime": null,
      "fromEternal": true,
      "fromPart": "both",
      "hostnames": [],
      "id": "eNoPOLICY",
      "option": "block_sender",
      "override": false,
      "sourceIPs": [],
      "to": {
        "domain": null,
        "emailAddress": null,
        "group": null,
        "type": "everyone"
      },
      "toDateTime": null,
      "toEternal": true
    }
  ]
}
```

### List gateway events

Read one page of the email gateway's event log (mail received, processed and delivered, spam, viruses and threat protection), for sending on to a security log. Mimecast keeps 24 hours. Needs Enhanced Logging turned on in Mimecast.

**Inputs**

- Event type (`event_type`, text): Only events of this type. Leave empty for all. One of: `receipt` (Receipt (mail received)), `process` (Process (policies applied)), `delivery` (Delivery (mail delivered)), `av` (Antivirus), `spam`, `url protect` (URL protection), `attachment protect` (Attachment protection), `impersonation protect` (Impersonation protection), `internal email protect` (Internal email protection), `journal`.
- From (`start`, date and time): The earliest time to include, within the last 24 hours.
- To (`end`, date and time): The latest time to include.
- Page size (`page_size`, number): How many events to return, 1 to 100. Defaults to 100. From 1 to 100.
- Next page (`next_page`, text): To read on: 'next_page' from an earlier step. 'From' and 'To' are then ignored.

**Outputs**

- `count` (number): How many were returned
- `events` (list): The events
- `is_caught_up` (true/false): Whether this reached the newest events
- `next_page` (text): Pass to 'Next page' to read on; empty when there's no more

**Example output**

```json
{
  "count": 1,
  "events": [
    {
      "aggregateId": "agg-7f3a",
      "direction": "Inbound",
      "eventType": "receipt",
      "messageId": "<abc123@mail.example.com>",
      "processingId": "proc-91c2",
      "recipients": "clerk@city.gov",
      "senderEnvelope": "pat.lee@example.com",
      "senderHeader": "pat.lee@example.com",
      "senderIp": "203.0.113.24",
      "subType": "Allow",
      "subject": "Public records request #2026-118",
      "timestamp": 1793628311000
    }
  ],
  "is_caught_up": false,
  "next_page": "b2Zmc2V0PTQ7bGluZT0yNg=="
}
```

### List group members

List the addresses and domains in a profile group.

**Inputs**

- Group (`group_id`, text, required): The profile group. Pick one, or give a group's ID from an earlier step.
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many were returned
- `group_id` (text): The group's ID
- `has_more` (true/false): Whether there are more than were returned
- `members` (list): The members

**Example output**

```json
{
  "count": 1,
  "group_id": "eNo1jjsOwjAQRO-yNUi2E5DiEgoaJCQ",
  "has_more": false,
  "members": [
    {
      "domain": "city.gov",
      "emailAddress": "clerk@city.gov",
      "internal": true,
      "name": "City Clerk",
      "note": "Added by onboarding workflow",
      "type": "created_by_ldap_sync"
    }
  ]
}
```

### List groups

List Mimecast's profile groups, which policies and permissions apply to.

**Inputs**

- Name contains (`name_contains`, text): Only groups whose name has this text.
- Source (`source`, text): Only groups made in Mimecast, or only those synced from your directory. One of: `cloud` (Made in Mimecast), `ldap` (Synced from your directory).
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many were returned
- `groups` (list): The groups
- `has_more` (true/false): Whether there are more than were returned

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "description": "Records Office",
      "id": "eNo1jjsOwjAQRO-yNUi2E5DiEgoaJCQ",
      "parentId": "eNo1jjsOwjAQRO-yNUi2E5DiROOT",
      "source": "cloud"
    }
  ],
  "has_more": false
}
```

### List held messages

List messages Mimecast is holding for review across the whole account, with why each was held.

**Inputs**

- Held for (`held_group`, text): Only messages waiting for this kind of review. Leave empty for all. One of: `administrator` (Held for an administrator), `moderator` (Held for a moderator), `user` (Held for the recipient), `cluster` (Held by a cluster policy).
- Direction (`route`, text): Only messages going this way. Leave empty for all. One of: `inbound`, `outbound`, `internal`, `external`.
- Containing (`search_text`, text): Only rows that mention this text anywhere: an address, a subject or a reason.
- From (`start`, date and time): The earliest time to include. Defaults to 30 days before 'To'.
- To (`end`, date and time): The latest time to include. Defaults to now.
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): Whether there are more than were returned
- `messages` (list): The held messages

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "messages": [
    {
      "attachments": false,
      "detectionLevel": null,
      "fromEnv": {
        "displayableName": "",
        "emailAddress": "billing@examp1e.com"
      },
      "fromHdr": {
        "displayableName": "Accounts",
        "emailAddress": "billing@examp1e.com"
      },
      "heldGroup": "administrator",
      "heldReason": "Impersonation Protect",
      "heldSince": "2026-11-02T13:41:09+0000",
      "id": "eNoVzr0OgjAYheF7-WaJgJiEbDhooinBH6I2HQ",
      "messageInfo": null,
      "policyInfo": "Default Impersonation Definition",
      "received": "2026-11-02T13:41:07+0000",
      "route": "INBOUND",
      "senderIP": "198.51.100.7",
      "sent": null,
      "size": 48211,
      "spamScore": 12,
      "spamVerdict": null,
      "status": "Hold",
      "subject": "Invoice overdue - action required",
      "to": [
        {
          "displayableName": "City Clerk",
          "emailAddress": "clerk@city.gov"
        }
      ]
    }
  ]
}
```

### List impersonation attempts

List messages Mimecast's Impersonation Protect flagged as posing as someone, such as a lookalike domain or a staff member's name.

**Inputs**

- What was done (`actions_taken`, list): Only messages that were held, bounced or let through. Leave empty for all. One or more of: `hold` (Held), `bounce` (Bounced), `none` (Delivered (no action)).
- Only tagged malicious (`tagged_malicious`, true/false): Only messages Mimecast tagged as malicious. Default: `false`.
- Containing (`search_text`, text): Only messages that mention this text.
- Look in (`search_field`, text): Where to look for 'Containing'. Defaults to all of them. One of: `all` (Any of these), `senderAddress` (Sender), `recipientAddress` (Recipient), `subject`, `definition` (Policy definition).
- From (`start`, date and time): The earliest time to include. Defaults to 24 hours before 'To'.
- To (`end`, date and time): The latest time to include. Defaults to now.
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `attempts` (list): The flagged messages
- `count` (number): How many were returned
- `has_more` (true/false): Whether there are more than were returned

**Example output**

```json
{
  "attempts": [
    {
      "action": "hold",
      "definition": "Default Impersonation Definition",
      "eventTime": "2026-11-02T13:41:08+0000",
      "hits": 2,
      "id": "eNoVjrsOgjAYRd_lnzW8yEI6uBhxcDGd",
      "identifiers": [
        "similar_internal_domain",
        "internal_user_name"
      ],
      "messageId": "<20261102134107.1@city-gov.co>",
      "recipientAddress": "clerk@city.gov",
      "senderAddress": "mayor.office@city-gov.co",
      "senderIpAddress": "198.51.100.7",
      "subject": "Urgent wire transfer",
      "taggedExternal": true,
      "taggedMalicious": true
    }
  ],
  "count": 1,
  "has_more": false
}
```

### List link clicks

List the links people clicked in email that Mimecast's URL Protect checked, with what it found and did.

**Inputs**

- Result (`scan_result`, text): Only clicks with this result. Leave empty for all. One of: `malicious`, `suspicious`, `clean`.
- Direction (`route`, text): Only links in mail going this way. Leave empty for all. One of: `inbound`, `outbound`, `internal`.
- From (`start`, date and time): The earliest time to include. Defaults to 24 hours before 'To'.
- To (`end`, date and time): The latest time to include. Defaults to now.
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `clicks` (list): The clicks
- `count` (number): How many were returned
- `has_more` (true/false): Whether there are more than were returned

**Example output**

```json
{
  "clicks": [
    {
      "action": "block",
      "adminOverride": "N/A",
      "category": "Phishing & Fraud",
      "creationMethod": "User Click",
      "date": "2026-11-02T13:55:40+0000",
      "fromUserEmailAddress": "billing@examp1e.com",
      "messageId": "<CAF1234@mail.examp1e.com>",
      "route": "inbound",
      "scanResult": "malicious",
      "sendingIp": null,
      "subject": "Invoice overdue - action required",
      "ttpDefinition": "Default URL Protect Definition",
      "url": "https://examp1e.com/login",
      "userAwarenessAction": null,
      "userEmailAddress": "clerk@city.gov",
      "userOverride": "None"
    }
  ],
  "count": 1,
  "has_more": false
}
```

### List released and rejected messages

List held messages that were released or rejected, with who did it and when.

**Inputs**

- Outcome (`status`, text): Only released or only rejected messages. Leave empty for both. One of: `released`, `rejected`.
- Direction (`route`, text): Only messages going this way. Leave empty for all. One of: `inbound`, `outbound`, `internal`, `external`.
- Containing (`search_text`, text): Only rows that mention this text anywhere: an address, a subject or a reason.
- From (`start`, date and time): The earliest time to include. Defaults to 30 days before 'To'.
- To (`end`, date and time): The latest time to include. Defaults to now.
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): Whether there are more than were returned
- `logs` (list): The released or rejected messages

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "logs": [
    {
      "attachments": false,
      "detectionLevel": null,
      "fromEnv": {
        "displayableName": "",
        "emailAddress": "billing@examp1e.com"
      },
      "fromHdr": {
        "displayableName": "Accounts",
        "emailAddress": "billing@examp1e.com"
      },
      "heldGroup": null,
      "heldReason": "Impersonation Protect",
      "id": "eNoRELEASE",
      "messageInfo": null,
      "operator": {
        "displayableName": "IT Admin",
        "emailAddress": "admin@city.gov"
      },
      "policy": "Default Impersonation Definition",
      "rejectReason": "MESSAGE GOES AGAINST EMAIL POLICIES",
      "released": "2026-11-02T14:10:00+0000",
      "route": "inbound",
      "size": 48211,
      "spamScore": null,
      "status": "rejected",
      "subject": "Invoice overdue - action required",
      "to": [
        {
          "displayableName": "City Clerk",
          "emailAddress": "clerk@city.gov"
        }
      ]
    }
  ]
}
```

### List users

List the people and addresses at your agency that Mimecast knows.

**Inputs**

- Domain (`domain`, text): Only addresses in this domain, such as city.gov.
- Email address (`email_address`, text): Only this address, to look one person up.
- Include aliases (`include_aliases`, true/false): Also list alias addresses. Default: `false`.
- Most to return (`limit`, number): The most rows to return, 1 to 1000. Defaults to 100. From 1 to 1000.

**Outputs**

- `count` (number): How many were returned
- `has_more` (true/false): Whether there are more than were returned
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "users": [
    {
      "addressType": "created_by_ldap_sync",
      "aliasFor": null,
      "domain": "city.gov",
      "emailAddress": "clerk@city.gov",
      "id": "eNoVzrEOgjAQgOF3uRkSSzFRNkddDDHq",
      "isAlias": false,
      "name": "City Clerk",
      "source": "ldap"
    }
  ]
}
```

### Permit or block a sender

Block a sender for one person at your agency, or permit them so their mail skips spam checks for that person.

**Inputs**

- Sender (`sender`, text, required): The sender's email address, or a whole domain such as example.com.
- Person (`recipient`, text, required): The email address of the person at your agency it applies to.
- Block or permit (`decision`, text, required): Whether to block the sender or permit them. One of: `block` (Block the sender), `permit` (Permit the sender (skip spam checks)).

**Outputs**

- `id` (text): Mimecast's ID for the entry
- `recipient` (text): The person it applies to
- `sender` (text): The sender
- `type` (text): Block or Permit

**Example output**

```json
{
  "id": "eNoMANAGED",
  "recipient": "clerk@city.gov",
  "sender": "newsletter@example.com",
  "type": "Block"
}
```

### Reject held messages

Reject held messages so they're never delivered, optionally telling the sender.

**Inputs**

- Held messages (`message_ids`, list, required): The held messages. Pick them, or give their IDs from 'List held messages' or the 'When a message is held' trigger.
- Reason (`reason`, text): Why they're rejected, kept with the record. One of: `MESSAGE CONTAINS UNDESIRABLE CONTENT` (It contains undesirable content), `MESSAGE CONTAINS CONFIDENTIAL INFORMATION` (It contains confidential information), `REVIEWER DISAPPROVES OF CONTENT` (The reviewer disapproves of its content), `INAPPROPRIATE COMMUNICATION` (It is an inappropriate communication), `MESSAGE GOES AGAINST EMAIL POLICIES` (It goes against email policies).
- Note to sender (`note_to_sender`, text): A message for the sender, sent only if 'Tell the sender' is on.
- Tell the sender (`notify_sender`, true/false): Send the sender a notice that the message was rejected. Default: `false`.

**Outputs**

- `rejected_count` (number): How many were rejected
- `results` (list): One result per message

**Example output**

```json
{
  "rejected_count": 1,
  "results": [
    {
      "id": "eNoVzr0OgjAYheF7-WaJgJiEbDhooinBH6I2HQ",
      "rejected": true
    }
  ]
}
```

### Release held messages

Release held messages so they're delivered to their recipients. Up to 25 at a time.

**Inputs**

- Held messages (`message_ids`, list, required): The held messages. Pick them, or give their IDs from 'List held messages' or the 'When a message is held' trigger.

**Outputs**

- `released_count` (number): How many were released
- `results` (list): One result per message

**Example output**

```json
{
  "released_count": 1,
  "results": [
    {
      "id": "eNoVzr0OgjAYheF7-WaJgJiEbDhooinBH6I2HQ",
      "released": true
    }
  ]
}
```

### Remove a permitted or blocked sender

Take a sender off one person's permitted or blocked senders, as 'Permit or block a sender' added them.

**Inputs**

- Sender (`sender`, text, required): The sender's email address, or a whole domain such as example.com.
- Person (`recipient`, text, required): The email address of the person at your agency it applies to.

**Outputs**

- `recipient` (text): The person
- `removed` (true/false): Whether it was removed
- `sender` (text): The sender

**Example output**

```json
{
  "recipient": "clerk@city.gov",
  "removed": true,
  "sender": "newsletter@example.com"
}
```

### Remove from a group

Remove an email address or domain from a profile group.

**Inputs**

- Group (`group_id`, text, required): The profile group. Pick one, or give a group's ID from an earlier step.
- Address or domain (`member`, text, required): An email address (clerk@city.gov) or a whole domain (city.gov).

**Outputs**

- `group_id` (text): The group's ID
- `member` (text): The address or domain removed
- `removed` (true/false): Whether it was removed
- `results` (list): Mimecast's result

**Example output**

```json
{
  "group_id": "eNo1jjsOwjAQRO-yNUi2E5DiEgoaJCQ",
  "member": "clerk@city.gov",
  "removed": true,
  "results": [
    {
      "member": "clerk@city.gov",
      "success": true
    }
  ]
}
```

### Search messages

Track email through Mimecast by sender, recipient, subject, sender IP or message ID, to see whether it was delivered, held, bounced or rejected. Give at least one of these.

**Inputs**

- From (`sender`, text): The sender's email address or domain.
- To (`recipient`, text): The recipient's email address or domain.
- Subject (`subject`, text): Words in the subject.
- Sender IP (`sender_ip`, text): The sending server's IP address.
- Message ID (`message_id`, text): The message's Message-ID header, such as <abc123@mail.example.com>.
- Directions (`routes`, list): Only messages going these ways. Leave empty for all. One or more of: `inbound`, `outbound`, `internal`, `external`.
- Statuses (`statuses`, list): Only messages in these states. Leave empty for all. One or more of: `accepted`, `processing`, `delivery` (Being delivered), `held`, `bounced`, `deferred`, `rejected`, `archived`.
- From (`start`, date and time): The earliest time to include. Defaults to 24 hours before 'To'.
- To (`end`, date and time): The latest time to include. Defaults to now.
- Reason for searching (`search_reason`, text): Why you're looking, kept in Mimecast's audit log. Needed if your account asks for a reason.

**Outputs**

- `count` (number): How many were returned
- `messages` (list): The messages found

**Example output**

```json
{
  "count": 1,
  "messages": [
    {
      "attachments": true,
      "detectionLevel": "moderate",
      "fromEnv": {
        "displayableName": "Pat Lee",
        "emailAddress": "pat.lee@example.com"
      },
      "fromHdr": {
        "displayableName": "Pat Lee",
        "emailAddress": "pat.lee@example.com"
      },
      "id": "eNo1jr0OgjAYRd-lc0kMoClrRmNwMDF2Vj4oZvQPg",
      "info": "Delivered",
      "received": "2026-11-02T14:05:11+0000",
      "route": "inbound",
      "senderIP": "203.0.113.24",
      "sent": "2026-11-02T14:05:13+0000",
      "spamScore": 0,
      "spamVerdict": "allowed",
      "status": "delivery",
      "subject": "Public records request #2026-118",
      "to": [
        {
          "displayableName": "City Clerk",
          "emailAddress": "clerk@city.gov"
        }
      ]
    }
  ]
}
```

### Search the archive

Search archived email by words, mailbox, sender or recipient, attachments and dates, across the whole archive or one mailbox. Returns up to 100 messages.

**Inputs**

- Words (`words`, text): Words to find in the subject, body, addresses or headers. Use subject: or body: before a word to look only there.
- Mailbox (`mailbox`, text): Search only this person's mailbox. Leave empty to search the whole archive.
- From (`sender`, text): Only mail from this address or domain.
- To (`recipient`, text): Only mail to this address or domain.
- Attachments (`attachments`, text): Only mail with this kind of attachment. Leave empty for any mail. One of: `any` (Any attachment), `documents` (Documents (Word, PDF and similar)), `spreadsheets`, `presentations`, `images`, `zips` (Compressed files (zip and similar)), `none` (No attachments).
- From (`start`, date and time): The earliest time to include. Defaults to 30 days before 'To'.
- To (`end`, date and time): The latest time to include. Defaults to now.
- Most to return (`limit`, number): The most messages to return, 1 to 100. Defaults to 100. From 1 to 100.

**Outputs**

- `count` (number): How many were returned
- `messages` (list): The archived messages found

**Example output**

```json
{
  "count": 1,
  "messages": [
    {
      "attachmentcount": 1,
      "displayfrom": "Pat Lee",
      "displayfromaddress": "pat.lee@example.com",
      "displayto": "City Clerk",
      "displaytoaddresslist": [
        "clerk@city.gov"
      ],
      "id": "eNoARCHIVED1",
      "receiveddate": "2026-11-02T14:05:11+0000",
      "size": 98211,
      "smash": "c2f1e0",
      "status": "ARCHIVED",
      "subject": "Public records request #2026-118"
    }
  ]
}
```
