transform
POSTALL,INU/inviteUsers/{accountId}
Arguments
- usersToInviteCharacter
email addresses of people to invite
Returns
- resultJSON Object
Returns an object with these properties:
- errorboolean
true if there was an error
- errorTextstring
Description
Invite people to create their own TransForm user accounts. When any of the invitees accept their invitation they are automatically added to the TransForm account associated with the API key.
This method takes a CRLF delimited list of people to invite. Each row in the CRLF delimited list has a format that matches one of the following formats:
emailAddress User Display name (emailAddress) User Display name (emailAddress)|userRoles
The list of userRoles is optional. If no user roles are specified the person will be assigned a role of 'user'. You can also optionally create the User Account without first sending out an invitation by using this format:
User Display name (emailAddress)|userRoles|noinvite|password
CURL
CURL --insecure -H "apikey:Your_api_key" -H "content-type: application/json" -H "accept: application/json" -d "{"""usersToInvite""":value_of_usersToInvite}" "https://transform.alphasoftware.com/transformAPIVersion1.a5svc/inviteUsers/"
Node
var request = require('request') var path = 'https://transform.alphasoftware.com/transformAPIVersion1.a5svc/inviteUsers/'; var data = {"usersToInvite": "value_of_usersToInvite"}; var dataJSON = JSON.stringify(data) request.post( { headers: {apikey: "Your_api_key"}, url: path, form: dataJSON}, function(err,httpResponse,body){ if(err) console.log(err) console.log(body) } )
Xbasic
dim apikey as c = "Your_api_key" dim postdata as c postdata = <<%txt% { "usersToInvite": "value_of_usersToInvite" } %txt% dim url as c = "/inviteUsers/" dim pr as p pr = a5dialogHelper_transformAPIQuery(url,postdata,apikey) if pr.error = .f. then dim result as c result = pr.result else dim errorText as c errorText = pr.errorText end if