codeAPI Reference

REST API Reference

Build custom workflows and integrate RokMail into your existing tools.

Base URL
https://api.rokmail.in/api
Authentication
Authorization: Bearer <token>
lock
All endpoints except /auth/login and /auth/signup require a Bearer token obtained from the login endpoint. Pass it as an Authorization header on every request.

Authentication

POST/auth/signupCreate a new accountexpand_more
POST/auth/loginSign in to existing accountexpand_more

Aliases

GET/aliasesList all aliases for the organisationexpand_more
POST/aliasesCreate a new aliasexpand_more
PUT/aliases/:idUpdate an aliasexpand_more
DELETE/aliases/:idDelete an aliasexpand_more

Emails

GET/emailsList emails (paginated)expand_more
GET/emails/:idGet full email contentexpand_more
POST/emails/sendSend an outbound email via SMTPexpand_more

Team

GET/teamList all team membersexpand_more
POST/team/inviteInvite a new team memberexpand_more
DELETE/team/:idRemove a team memberexpand_more

Routing Rules

GET/rulesList all routing rulesexpand_more
POST/rulesCreate a routing ruleexpand_more
PUT/rules/:idUpdate a rule or toggle active stateexpand_more
DELETE/rules/:idDelete a routing ruleexpand_more

Templates

GET/templatesList email templates (shared + own private)expand_more
GET/templates/:idGet a single templateexpand_more
POST/templatesCreate a new templateexpand_more
PUT/templates/:idUpdate a templateexpand_more
DELETE/templates/:idDelete a templateexpand_more

Contact Groups

GET/contact-groupsList all contact groups with member countexpand_more
GET/contact-groups/:idGet group with populated contactsexpand_more
POST/contact-groupsCreate a new contact groupexpand_more
PUT/contact-groups/:id/addAdd contacts to a groupexpand_more
PUT/contact-groups/:id/removeRemove contacts from a groupexpand_more
POST/contact-groups/:id/sendSend bulk email to all group membersexpand_more
DELETE/contact-groups/:idDelete a contact groupexpand_more

Calendar Events

GET/calendarList events in a date rangeexpand_more
GET/calendar/upcomingGet next 10 upcoming eventsexpand_more
POST/calendarCreate a new eventexpand_more
PUT/calendar/:idUpdate an eventexpand_more
DELETE/calendar/:idDelete an eventexpand_more

Reports & Exports

GET/reports/emailsDownload emails as CSVexpand_more
GET/reports/contactsDownload contacts as CSVexpand_more
GET/reports/tasksDownload tasks as CSVexpand_more
GET/reports/summaryGet aggregate analytics summaryexpand_more

Billing & Add-Ons

GET/payments/plansGet all plans with pricing (monthly + annual)expand_more
POST/payments/create-orderCreate a Razorpay order for plan upgradeexpand_more
POST/payments/purchase-addonPurchase a usage add-onexpand_more