---
title: "POST /v1/admin/{+parent}/topics"
method: POST
path: "/v1/admin/{+parent}/topics"
tags: ["admin"]
---

# POST /v1/admin/{+parent}/topics

`POST /v1/admin/{+parent}/topics`

Creates a new topic.

## Path parameters

- `parent` string, required

## Query parameters

- `topicId` string

## Request body

- Topic — Metadata about a topic resource.
  - `name` string — The name of the topic. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}
  - `partitionConfig` PartitionConfig — The settings for a topic's partitions.
    - `scale` integer — DEPRECATED: Use capacity instead which can express a superset of configurations. Every partition in the topic is allocated throughput equivalent to `scale` times the standard partition throughput (4 MiB/s). This is also reflected in the cost of this topic; a topic with `scale` of 2 and count of 10 is charged for 20 partitions. This value must be in the range [1,4].
    - `count` string, int64 — The number of partitions in the topic. Must be at least 1. Once a topic has been created the number of partitions can be increased but not decreased. Message ordering is not guaranteed across a topic resize. For more information see https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity
    - `capacity` Capacity — The throughput capacity configuration for each partition.
      - `publishMibPerSec` integer — Publish throughput capacity per partition in MiB/s. Must be >= 4 and <= 16.
      - `subscribeMibPerSec` integer — Subscribe throughput capacity per partition in MiB/s. Must be >= 4 and <= 32.
  - `reservationConfig` ReservationConfig — The settings for this topic's Reservation usage.
    - `throughputReservation` string — The Reservation to use for this topic's throughput capacity. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}
  - `retentionConfig` RetentionConfig — The settings for a topic's message retention.
    - `perPartitionBytes` string, int64 — The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of `period`.
    - `period` string, google-duration — How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below `per_partition_bytes`.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/pubsublite.md) · [All operations](https://skmtc.net/google/apis/pubsublite/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/pubsublite/versions/d973df9a0149/schema)
