## Push Message Batch `client.queues.messages.bulkPush(stringqueueId, MessageBulkPushParamsparams, RequestOptionsoptions?): MessageBulkPushResponse` **post** `/accounts/{account_id}/queues/{queue_id}/messages/batch` Push a batch of message to a Queue ### Parameters - `queueId: string` A Resource identifier. - `params: MessageBulkPushParams` - `account_id: string` Path param: A Resource identifier. - `delay_seconds?: number` Body param: The number of seconds to wait for attempting to deliver this batch to consumers - `messages?: Array` Body param - `MqQueueMessageText` - `body?: string` - `content_type?: "text"` - `"text"` - `delay_seconds?: number` The number of seconds to wait for attempting to deliver this message to consumers - `MqQueueMessageJson` - `body?: unknown` - `content_type?: "json"` - `"json"` - `delay_seconds?: number` The number of seconds to wait for attempting to deliver this message to consumers ### Returns - `MessageBulkPushResponse` - `metadata?: Metadata` - `metrics?: Metrics` Best-effort metrics for the queue. Values may be approximate due to the distributed nature of queues. - `backlog_bytes: number` The size in bytes of unacknowledged messages in the queue. - `backlog_count: number` The number of unacknowledged messages in the queue. - `oldest_message_timestamp_ms: number` Unix timestamp in milliseconds of the oldest unacknowledged message in the queue. Returns 0 if unknown. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.queues.messages.bulkPush('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(response.metadata); ``` #### Response ```json { "errors": [ { "code": 7003, "message": "No route for the URI", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ "string" ], "result": { "metadata": { "metrics": { "backlog_bytes": 1024, "backlog_count": 5, "oldest_message_timestamp_ms": 1710950954154 } } }, "success": true } ```