Skip to content
Start here

List Request Messages

client.cloudforceOne.requests.message.get(stringrequestId, MessageGetParams { account_id, page, per_page, 4 more } params, RequestOptionsoptions?): SinglePage<Message { id, author, content, 3 more } >
POST/accounts/{account_id}/cloudforce-one/requests/{request_id}/message

Lists messages in a Cloudforce One intelligence request conversation.

Security

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)
Cloudforce One Write
ParametersExpand Collapse
requestId: string

UUID.

maxLength36
params: MessageGetParams { account_id, page, per_page, 4 more }
account_id: string

Path param: Identifier.

maxLength32
page: number

Body param: Page number of results.

per_page: number

Body param: Number of results per page.

after?: string

Body param: Retrieve mes ges created after this time.

formatdate-time
before?: string

Body param: Retrieve messages created before this time.

formatdate-time
sort_by?: string

Body param: Field to sort results by.

sort_order?: "asc" | "desc"

Body param: Sort order (asc or desc).

One of the following:
"asc"
"desc"
ReturnsExpand Collapse
Message { id, author, content, 3 more }
id: number

Message ID.

author: string

Author of message.

content: string

Content of message.

is_follow_on_request: boolean

Whether the message is a follow-on request.

updated: string

Defines the message last updated time.

formatdate-time
created?: string

Defines the message creation time.

formatdate-time

List Request Messages

import Cloudflare from 'cloudflare';

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

// Automatically fetches more pages as needed.
for await (const message of client.cloudforceOne.requests.message.get(
  'f174e90a-fafe-4643-bbbc-4a0ed4fc8415',
  {
    account_id: '023e105f4ecef8ad9ca31a8372d0c353',
    page: 0,
    per_page: 10,
  },
)) {
  console.log(message.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"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": 0,
      "author": "user@domain.com",
      "content": "Can you elaborate on the type of DoS that occurred?",
      "is_follow_on_request": true,
      "updated": "2022-01-01T00:00:00Z",
      "created": "2022-01-01T00:00:00Z"
    }
  ]
}
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"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "id": 0,
      "author": "user@domain.com",
      "content": "Can you elaborate on the type of DoS that occurred?",
      "is_follow_on_request": true,
      "updated": "2022-01-01T00:00:00Z",
      "created": "2022-01-01T00:00:00Z"
    }
  ]
}