Method: projects.topics.create

Creates the given topic with the given name.

HTTP request

PUT https://pubsub.googleapis.com/v1/{name}

Path parameters

Parameters
name

string

Name of the topic. Format is projects/{project}/topics/{topic}.

Request body

The request body must be empty.

Response body

If successful, the response body contains a newly created instance of Topic.

Authorization

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/pubsub
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

Try it!

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Pub/Sub