Skip to main content
POST
/
api
/
v1
/
topics
Create a topic
curl --request POST \
  --url https://api.railmail.app/api/v1/topics \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "doubleOptInEnabled": true,
  "icon": "<string>"
}
'
{
  "topicKey": "<string>",
  "name": "<string>",
  "description": "<string>",
  "status": "<string>",
  "doubleOptInEnabled": true,
  "subscriberCount": 123,
  "activeSubscriberCount": 123,
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-API-Key
string
header
required

Project-scoped API key, format rm_(live|test)_... . May also be sent as Authorization: Bearer rm_....

Body

application/json
name
string
required
Maximum string length: 200
description
string | null
Maximum string length: 1000
status
enum<string> | null
Available options:
ACTIVE,
INACTIVE,
ARCHIVED
priority
enum<string> | null
Available options:
URGENT,
HIGH,
MEDIUM,
LOW
doubleOptInEnabled
boolean | null
icon
string | null

Response

Topic created

topicKey
string
name
string
description
string | null
status
string
doubleOptInEnabled
boolean
subscriberCount
integer<int64> | null
activeSubscriberCount
integer<int64> | null
createdAt
string<date-time>