APIs
< How it works | Advanced use
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
'locals': Object (keys to be interpolated with values in the related template), | 'locals': Object (keys to be interpolated with values in the related template), | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | |||
+ | ==sendcode== | ||
+ | The following endpoint sends a pin code | ||
+ | at the indicated email address | ||
+ | |||
+ | endpoint | ||
+ | |||
+ | <syntaxhighlight> | ||
+ | https://culturaitaliana.org/api/sendcode | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | json request | ||
+ | |||
+ | <syntaxhighlight> | ||
+ | { | ||
+ | 'email': String (email), | ||
+ | 'property': String (semantic property holding the value) | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 15:39, 18 June 2020
sendemail
The following endpoint allows to send an email message, using one of the templates available on the site, to arbitrary lists of recipients including groups of the related mediawiki.
endpoint
https://culturaitaliana.org/api/sendemail
json request
{
'path': String (url of related wiki),
'username': String (username of bot or admin account),
'password': String (password of bot or admin account),
'template': String (name of used "pug" template),
'to' or Array: String (list of recipients, can include one or more wiki groups),
'cc': String or Array (list of recipients, can include one or more wiki groups),
'bcc': String or Array (list of recipients, can include one or more wiki groups),
'locals': Object (keys to be interpolated with values in the related template),
}
sendcode
The following endpoint sends a pin code at the indicated email address
endpoint
https://culturaitaliana.org/api/sendcode
json request
{
'email': String (email),
'property': String (semantic property holding the value)
}