post/channels/messages/bulk

List messages from multiple channels

Fetches bounded message windows from multiple channels in one request. Each entry uses the same pagination semantics as the single-channel message list endpoint.

bulk_list_channel_messages

Request body

application/json

json
{
  "type": "object",
  "properties": {
    "requests": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "channel_id": {
            "$ref": "#/components/schemas/SnowflakeType"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 25,
            "format": "int32",
            "description": "Number of messages to return for this channel (1-25)"
          },
          "before": {
            "$ref": "#/components/schemas/SnowflakeType"
          },
          "after": {
            "$ref": "#/components/schemas/SnowflakeType"
          },
          "around": {
            "$ref": "#/components/schemas/SnowflakeType"
          }
        },
        "required": [
          "channel_id",
          "limit"
        ]
      },
      "minItems": 1,
      "maxItems": 25,
      "description": "Per-channel message windows to fetch in one request"
    }
  },
  "required": [
    "requests"
  ]
}

Responses

200

Success

json
{
  "type": "object",
  "properties": {
    "channels": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)$",
            "description": "The ID of the channel whose messages were fetched"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageResponseSchema"
            },
            "description": "Messages fetched for this channel"
          }
        },
        "required": [
          "channel_id",
          "messages"
        ]
      }
    }
  },
  "required": [
    "channels"
  ]
}
400

Bad Request - The request was malformed or contained invalid data

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
401

Unauthorized - Authentication is required or the token is invalid

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
403

Forbidden - You do not have permission to perform this action

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
429

Too Many Requests - You are being rate limited

json
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "enum": [
        "RATE_LIMITED"
      ]
    },
    "message": {
      "type": "string"
    },
    "retry_after": {
      "type": "number",
      "description": "Seconds to wait before retrying"
    },
    "global": {
      "type": "boolean",
      "description": "Whether this is a global rate limit"
    }
  },
  "required": [
    "code",
    "message",
    "retry_after"
  ]
}
500

Internal Server Error - An unexpected error occurred

json
{
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/components/schemas/APIErrorCode"
    },
    "message": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "errors": {
      "type": "array",
      "description": "Field-specific validation errors",
      "items": {
        "$ref": "#/components/schemas/ValidationErrorItem"
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}