Prerequisites
Before you begin, you need:- A Railmail project with a project-scoped API key (format
rm_live_...orrm_test_...). Create one in the dashboard. - A tool to make HTTP requests —
curl, Postman, or your language’s HTTP client.
Add a subscriber to a topic
Set your API key
Store your key in an environment variable so you don’t paste it into every request.
Discover your topic keys
List the topics in your project and note the
topicKey you want to subscribe users to.Create a subscriber and subscribe them
Create the subscriber and subscribe them to the topic in a single call by passing If the topic uses double opt-in, the consent is created
topicKeys and consent.PENDING_CONFIRMATION and the user must confirm via the email they receive before they count as subscribed.Next steps
Explore all endpoints
Browse subscribers, campaigns, segments, automations and more.
Authentication & scopes
Understand what each key can do and how to keep it secure.