Skip to content
Start here

List messages for a bulk action job

client.EmailSecurity.Investigate.Bulk.Messages.List(ctx, jobID, params) (*V4PagePaginationArray[InvestigateBulkMessageListResponse], error)
GET/accounts/{account_id}/email-security/investigate/bulk/{job_id}/messages

List messages for a bulk action job

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
jobID string
formatuuid
params InvestigateBulkMessageListParams
AccountID param.Field[string]

Path param: Identifier.

maxLength32
Page param.Field[int64]Optional

Query param: Current page within paginated list of results.

minimum1
PerPage param.Field[int64]Optional

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

maximum1000
minimum1
Status param.Field[InvestigateBulkMessageListParamsStatus]Optional

Query param

const InvestigateBulkMessageListParamsStatusPending InvestigateBulkMessageListParamsStatus = "PENDING"
const InvestigateBulkMessageListParamsStatusDiscovering InvestigateBulkMessageListParamsStatus = "DISCOVERING"
const InvestigateBulkMessageListParamsStatusProcessing InvestigateBulkMessageListParamsStatus = "PROCESSING"
const InvestigateBulkMessageListParamsStatusCompleted InvestigateBulkMessageListParamsStatus = "COMPLETED"
const InvestigateBulkMessageListParamsStatusFailed InvestigateBulkMessageListParamsStatus = "FAILED"
const InvestigateBulkMessageListParamsStatusCancelled InvestigateBulkMessageListParamsStatus = "CANCELLED"
const InvestigateBulkMessageListParamsStatusSkipped InvestigateBulkMessageListParamsStatus = "SKIPPED"
ReturnsExpand Collapse
type InvestigateBulkMessageListResponse struct{…}
ActionParams InvestigateBulkMessageListResponseActionParams
One of the following:
type InvestigateBulkMessageListResponseActionParamsMove struct{…}
ClientRecipient string
Destination InvestigateBulkMessageListResponseActionParamsMoveDestination
One of the following:
const InvestigateBulkMessageListResponseActionParamsMoveDestinationInbox InvestigateBulkMessageListResponseActionParamsMoveDestination = "Inbox"
const InvestigateBulkMessageListResponseActionParamsMoveDestinationJunkEmail InvestigateBulkMessageListResponseActionParamsMoveDestination = "JunkEmail"
const InvestigateBulkMessageListResponseActionParamsMoveDestinationDeletedItems InvestigateBulkMessageListResponseActionParamsMoveDestination = "DeletedItems"
const InvestigateBulkMessageListResponseActionParamsMoveDestinationRecoverableItemsDeletions InvestigateBulkMessageListResponseActionParamsMoveDestination = "RecoverableItemsDeletions"
const InvestigateBulkMessageListResponseActionParamsMoveDestinationRecoverableItemsPurges InvestigateBulkMessageListResponseActionParamsMoveDestination = "RecoverableItemsPurges"
Type InvestigateBulkMessageListResponseActionParamsMoveType
ExpectedDisposition InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionOptional
One of the following:
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionMalicious InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "MALICIOUS"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionMaliciousBec InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "MALICIOUS-BEC"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionSuspicious InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "SUSPICIOUS"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionSpoof InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "SPOOF"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionSpam InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "SPAM"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionBulk InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "BULK"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionEncrypted InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "ENCRYPTED"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionExternal InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "EXTERNAL"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionUnknown InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "UNKNOWN"
const InvestigateBulkMessageListResponseActionParamsMoveExpectedDispositionNone InvestigateBulkMessageListResponseActionParamsMoveExpectedDisposition = "NONE"
type InvestigateBulkMessageListResponseActionParamsRelease struct{…}
ClientRecipient string
Type InvestigateBulkMessageListResponseActionParamsReleaseType
ActionType InvestigateBulkMessageListResponseActionType
One of the following:
const InvestigateBulkMessageListResponseActionTypeMove InvestigateBulkMessageListResponseActionType = "MOVE"
const InvestigateBulkMessageListResponseActionTypeRelease InvestigateBulkMessageListResponseActionType = "RELEASE"
CreatedAt Time
formatdate-time
MessageID string
formatuuid
PostfixID string
RetryCount int64
Status InvestigateBulkMessageListResponseStatus
One of the following:
const InvestigateBulkMessageListResponseStatusPending InvestigateBulkMessageListResponseStatus = "PENDING"
const InvestigateBulkMessageListResponseStatusDiscovering InvestigateBulkMessageListResponseStatus = "DISCOVERING"
const InvestigateBulkMessageListResponseStatusProcessing InvestigateBulkMessageListResponseStatus = "PROCESSING"
const InvestigateBulkMessageListResponseStatusCompleted InvestigateBulkMessageListResponseStatus = "COMPLETED"
const InvestigateBulkMessageListResponseStatusFailed InvestigateBulkMessageListResponseStatus = "FAILED"
const InvestigateBulkMessageListResponseStatusCancelled InvestigateBulkMessageListResponseStatus = "CANCELLED"
const InvestigateBulkMessageListResponseStatusSkipped InvestigateBulkMessageListResponseStatus = "SKIPPED"
AlertID stringOptional
EmailMessageID stringOptional
ProcessedAt TimeOptional
formatdate-time
RetryAfter TimeOptional

When to retry the action if it failed

formatdate-time
StatusMessage stringOptional

List messages for a bulk action job

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/email_security"
  "github.com/stainless-sdks/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.EmailSecurity.Investigate.Bulk.Messages.List(
    context.TODO(),
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    email_security.InvestigateBulkMessageListParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "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": {
        "client_recipient": "client_recipient",
        "destination": "Inbox",
        "type": "MOVE",
        "expected_disposition": "MALICIOUS"
      },
      "action_type": "MOVE",
      "created_at": "2019-12-27T18:11:19.117Z",
      "message_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "postfix_id": "postfix_id",
      "retry_count": 0,
      "status": "PENDING",
      "alert_id": "alert_id",
      "email_message_id": "email_message_id",
      "processed_at": "2019-12-27T18:11:19.117Z",
      "retry_after": "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": {
        "client_recipient": "client_recipient",
        "destination": "Inbox",
        "type": "MOVE",
        "expected_disposition": "MALICIOUS"
      },
      "action_type": "MOVE",
      "created_at": "2019-12-27T18:11:19.117Z",
      "message_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "postfix_id": "postfix_id",
      "retry_count": 0,
      "status": "PENDING",
      "alert_id": "alert_id",
      "email_message_id": "email_message_id",
      "processed_at": "2019-12-27T18:11:19.117Z",
      "retry_after": "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
}