Emails
5 min
the emails endpoint http post https //www regpack com/reg/api2/emails/ the emails endpoint is used to build a project's email content the categories that templates are grouped under, and the templates themselves (subject and html body) basic structure each call to the api requires action and a group id name type required description action string true for emails, the only actions are create category and create template group id integer true this designates which project the change should be applied to api id in the header must be part of the organization that owns the group doc json true this contains the parameters you would like to include in the request, formatted as json actions action descriptio n create category create an email category—the folder templates are grouped under create template create an email template under a category (created with create category ) and push its subject and html body you can let the system generate the template id, or supply your own example call this call creates a category see the action pages for the full parameter sets curl x post "https //www regpack com/reg/api2/emails/" \\ h "content type application/json" \\ h "accept application/json" \\ h "api id 15263" \\ h "api user api admin\@regpacks com" \\ h "api token cd2e514f 7gab 3cde 62fg 51abcd4e7362" \\ d '{ "action" "create category", "group id" 100909072, "doc" { "cat name" "registration emails" } }' example response json { "success" true, "cat id" "112481", "existed" false }