Skip to content
Start here

List bulk action jobs

client.emailSecurity.investigate.bulk.list(BulkListParams { account_id, action_type, page, 2 more } params, RequestOptionsoptions?): V4PagePaginationArray<BulkListResponse { action_params, action_type, created_at, 11 more } >
GET/accounts/{account_id}/email-security/investigate/bulk

List bulk action jobs

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Cloud Email Security: WriteCloud Email Security: Read
ParametersExpand Collapse
params: BulkListParams { account_id, action_type, page, 2 more }
account_id: string

Path param: Identifier.

maxLength32
action_type?: "MOVE" | "RELEASE"

Query param

One of the following:
"MOVE"
"RELEASE"
page?: number

Query param: Current page within paginated list of results.

minimum1
per_page?: number

Query param: The number of results per page. Maximum value is 1000.

maximum1000
minimum1
status?: "PENDING" | "DISCOVERING" | "PROCESSING" | 4 more

Query param

One of the following:
"PENDING"
"DISCOVERING"
"PROCESSING"
"COMPLETED"
"FAILED"
"CANCELLED"
"SKIPPED"
ReturnsExpand Collapse
BulkListResponse { action_params, action_type, created_at, 11 more }
action_params: Move { destination, type, expected_disposition } | Release { type }
One of the following:
Move { destination, type, expected_disposition }
destination: "Inbox" | "JunkEmail" | "DeletedItems" | 2 more
One of the following:
"Inbox"
"JunkEmail"
"DeletedItems"
"RecoverableItemsDeletions"
"RecoverableItemsPurges"
type: "MOVE"
expected_disposition?: "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | 7 more
One of the following:
"MALICIOUS"
"MALICIOUS-BEC"
"SUSPICIOUS"
"SPOOF"
"SPAM"
"BULK"
"ENCRYPTED"
"EXTERNAL"
"UNKNOWN"
"NONE"
Release { type }
type: "RELEASE"
action_type: "MOVE" | "RELEASE"
One of the following:
"MOVE"
"RELEASE"
created_at: string
formatdate-time
job_id: string
formatuuid
messages_failed: number
messages_pending: number
messages_successful: number
search_params: SearchParams { action_log, alert_id, delivery_status, 14 more }
Deprecatedaction_log?: boolean

Deprecated, use GET /investigate/{investigate_id}/action_log instead. End of life: November 1, 2026.

alert_id?: string | null
delivery_status?: "delivered" | "moved" | "quarantined" | 4 more

Delivery status of the message.

One of the following:
"delivered"
"moved"
"quarantined"
"rejected"
"deferred"
"bounced"
"queued"
detections_only?: boolean
domain?: string | null
end?: string

End of search date range

formatdate-time
exact_subject?: string | null
final_disposition?: "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | 7 more
One of the following:
"MALICIOUS"
"MALICIOUS-BEC"
"SUSPICIOUS"
"SPOOF"
"SPAM"
"BULK"
"ENCRYPTED"
"EXTERNAL"
"UNKNOWN"
"NONE"
message_action?: "PREVIEW" | "QUARANTINE_RELEASED" | "MOVED" | null
One of the following:
"PREVIEW"
"QUARANTINE_RELEASED"
"MOVED"
message_id?: string | null
metric?: string | null
query?: string | null
recipient?: string | null
sender?: string | null
start?: string

Beginning of search date range

formatdate-time
subject?: string | null
submissions?: boolean
status: "PENDING" | "DISCOVERING" | "PROCESSING" | 4 more
One of the following:
"PENDING"
"DISCOVERING"
"PROCESSING"
"COMPLETED"
"FAILED"
"CANCELLED"
"SKIPPED"
total_messages_discovered: number
comment?: string | null
completed_at?: string | null
formatdate-time
started_at?: string | null
formatdate-time
status_message?: string | null

List bulk action jobs

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const bulkListResponse of client.emailSecurity.investigate.bulk.list({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
})) {
  console.log(bulkListResponse.job_id);
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "action_params": {
        "destination": "Inbox",
        "type": "MOVE",
        "expected_disposition": "MALICIOUS"
      },
      "action_type": "MOVE",
      "created_at": "2019-12-27T18:11:19.117Z",
      "job_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "messages_failed": 0,
      "messages_pending": 0,
      "messages_successful": 0,
      "search_params": {
        "action_log": true,
        "alert_id": "alert_id",
        "delivery_status": "delivered",
        "detections_only": true,
        "domain": "domain",
        "end": "2022-07-25T14:30:00Z",
        "exact_subject": "exact_subject",
        "final_disposition": "MALICIOUS",
        "message_action": "PREVIEW",
        "message_id": "message_id",
        "metric": "metric",
        "query": "query",
        "recipient": "recipient",
        "sender": "sender",
        "start": "2022-06-25T14:30:00Z",
        "subject": "subject",
        "submissions": true
      },
      "status": "PENDING",
      "total_messages_discovered": 0,
      "comment": "comment",
      "completed_at": "2019-12-27T18:11:19.117Z",
      "started_at": "2019-12-27T18:11:19.117Z",
      "status_message": "status_message"
    }
  ],
  "result_info": {
    "count": 0,
    "per_page": 0,
    "total_count": 0,
    "next": "next",
    "page": 0,
    "previous": "previous"
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "action_params": {
        "destination": "Inbox",
        "type": "MOVE",
        "expected_disposition": "MALICIOUS"
      },
      "action_type": "MOVE",
      "created_at": "2019-12-27T18:11:19.117Z",
      "job_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "messages_failed": 0,
      "messages_pending": 0,
      "messages_successful": 0,
      "search_params": {
        "action_log": true,
        "alert_id": "alert_id",
        "delivery_status": "delivered",
        "detections_only": true,
        "domain": "domain",
        "end": "2022-07-25T14:30:00Z",
        "exact_subject": "exact_subject",
        "final_disposition": "MALICIOUS",
        "message_action": "PREVIEW",
        "message_id": "message_id",
        "metric": "metric",
        "query": "query",
        "recipient": "recipient",
        "sender": "sender",
        "start": "2022-06-25T14:30:00Z",
        "subject": "subject",
        "submissions": true
      },
      "status": "PENDING",
      "total_messages_discovered": 0,
      "comment": "comment",
      "completed_at": "2019-12-27T18:11:19.117Z",
      "started_at": "2019-12-27T18:11:19.117Z",
      "status_message": "status_message"
    }
  ],
  "result_info": {
    "count": 0,
    "per_page": 0,
    "total_count": 0,
    "next": "next",
    "page": 0,
    "previous": "previous"
  },
  "success": true
}