# Publish multiple messages to a topic

`POST /v1.0-alpha1/publish/bulk/{pubsubName}/{topic}`

This endpoint lets you publish multiple messages to consumers who are listening on a topic.

## Request

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `pubsubName` | string | Yes | Pattern: `^[a-zA-Z0-9_-]+$`. |
| `topic` | string | Yes | Pattern: `^[a-zA-Z0-9_-]+$`. |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `metadata` | object | No | Query parameters for metadata as described below. |

### Request body

Required.

`application/json`

- `entryId` (string) — A unique identifier for the entry within the bulk request.
- `event` (object)
- `contentType` (string) — One of: `application/json`.

Example:

```json
[
  {
    "entryId": "entry-1",
    "event": {
      "message": "Hello, World!"
    },
    "contentType": "application/json"
  },
  {
    "entryId": "entry-2",
    "event": {
      "message": "Hello, World!"
    },
    "contentType": "application/json"
  }
]
```

## Responses

### 204 — All messages delivered.

### 400 — Pub/sub does not exist.

### 403 — Forbidden by access controls.

### 500 — At least one message failed to be delivered.

`application/json`

- `failedEntries` (object[])
  - `entryId` (string)
  - `error` (string)
- `errorCode` (string)
