Skip to main content
POST
Create a topic
Create a topic. The default_subscription field is set at creation and cannot be changed later. Requires the audience:write scope and is blocked for sandbox API keys.

Authorizations

Authorization
string
header
required

API key for authentication

Body

application/json
name
string
required
Maximum string length: 255
Example:

"Product updates"

description
string | null
Maximum string length: 1000
default_subscription
enum<string>
default:opt_in

Defaults to opt_in when omitted.

Available options:
opt_in,
opt_out
Example:

"opt_in"

visibility
enum<string>
default:private

Defaults to private when omitted.

Available options:
private,
public
Example:

"public"

Response

Topic created

message
string
required
Example:

"Topic retrieved successfully."

data
object
required