Calls
User
add_email
4min
this adds a presentation of emails to the list of emails which have been previously sent to a user, and the system will not send any emails to your users you can use this to keep track of emails not sent out through regpack basic parameters name type required description action string true add email clogin id integer true this is a central login id which identifies a single user between any projects within your organization group id integer true this designates which project the action should be applied towards doc array true doc should contain email list email list array true this should be json array which describes the emails you'd like to add to the users email list see below for more email list parameters name type required description from string true the from address to string true the to address for multiple email addresses use a comma separated email string subject string true the subject, can be html or plain text body string true this should be a string of html that defines the body, although you can use plain text if desired cc string false the cc address for multiple email addresses use a comma separated email string bcc string false the bcc address for multiple email addresses use a comma separated email string admin id numeric false allows you to specify which admin sent out the email the system will validate the admin's level and their access to that project to ensure only authorized admins can be set as the sender example curl x post "https //www regpack com/reg/api2/users/" \\ 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" "add email", "group id" 100909072, "clogin id" 102670540, "doc" { "email list" { "from" "concert venue\@regpacks com", "to" "miles davis\@regpacks com", "subject" "booking confirmed", "body" "the miles davis quintet is confirmed for friday night at 8 00!" } } }import requests import json users endpoint = https //www regpack com/reg/api2/users/ headers = { "content type" "application/json", "accept" "application/json", "api id" "15263", "api user" "api admin\@regpacks com", "api token" "cd2e514f 7gab 3cde 62fg 51abcd4e7362", } payload = { "action" "add email", "group id" 100909072, "clogin id" 102670540, "doc" { "email list" { "from" "concert venue\@regpacks com", "to" "miles davis\@regpacks com", "subject" "booking confirmed", "body" "the miles davis quintet is confirmed for friday night at 8 00!" } } } add email json = json dumps(payload) add email response = requests post(url=users endpoint, data=add email json, headers=headers, timeout=10) response { "msg" "emails added successfully", "success" true, "user info" { "clogin id" "102670540", "group id" "100909072", "connected to" "102670540" }, "meta info" { "u name" "miles davis", "total forms" "2", "completed forms" "0", "total user forms" "2", "total completed user forms" "0", "total user mandatory forms" "2", "total completed user mandatory forms" "0", "total order" "0 00", "total paid" "0 00", "total balance" "0 00", "status id" "0", "status name" null, "status color" null, "application date" "dec 8th 2021 17 20", "application date raw" "2021 12 08 17 20 08", "u comments" "0", "group id" "100909072", "uid" "4085258", "clogin id" "102670540", "excluded" "0", "connected to" "102670540", "total user tags" "0", "user tag ids" null, "total non excluded children" "1", "star" "0", "admin initials" null, "admin color" null, "assigned admin id" null } }