---
title: "POST /b/{bucket}/notificationConfigs"
method: POST
path: "/b/{bucket}/notificationConfigs"
tags: ["notifications"]
---

# POST /b/{bucket}/notificationConfigs

`POST /b/{bucket}/notificationConfigs`

Creates a notification subscription for a given bucket.

## Path parameters

- `bucket` string, required

## Query parameters

- `userProject` string

## Request body

- Notification — A subscription to receive Google PubSub notifications.
  - `custom_attributes` object — An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
  - `etag` string — HTTP 1.1 Entity tag for this subscription notification.
  - `event_types` string[] — If present, only send notifications about listed event types. If empty, sent notifications for all event types.
  - `id` string — The ID of the notification.
  - `kind` string — The kind of item this is. For notifications, this is always storage#notification.
  - `object_name_prefix` string — If present, only apply this notification configuration to object names that begin with this prefix.
  - `payload_format` string — The desired content of the Payload.
  - `selfLink` string — The canonical URL of this notification.
  - `topic` string — The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/storage.md) · [All operations](https://skmtc.dev/google/apis/storage/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/storage/revisions/4623cd2c71cf/schema)
