Notify Public Link Via Email
Introduction
The public-files API allows access to public links via WebDAV.
Request Path | Method | Content Type |
---|---|---|
|
|
|
Request Parameters
Attribute | Type | Description |
---|---|---|
|
string |
The format to return the response body in.
The allowed options are |
POST Parameters
Attribute | Type | Description |
---|---|---|
|
array of string |
A list of email addresses to send the notification to. |
|
string |
The public link. |
|
string |
A personal note to send with the email notification. |
Returns
Example Response
If the notification is successful, you will see the response below, along with an HTTP 200 status code — if you specified the format as `json`.
{
"ocs" : {
"meta" : {
"itemsperpage" : "",
"totalitems" : "",
"status" : "ok",
"statuscode" : 100,
"message" : "OK"
},
"data" : []
}
}
If the notification could not be sent to one or more recipients, you will see the response below, along with an HTTP 200 status code — if you specified the format as `json`.
{
"ocs" : {
"data" : [],
"meta" : {
"totalitems" : "",
"statuscode" : 400,
"itemsperpage" : "",
"message" : "Couldn't send mail to following recipient(s): test@email.com",
"status" : "error"
}
}
}
If public link mail notification is not allowed, then the following response will be returned, along with an HTTP 200 status code.
<?xml version="1.0"?>
<ocs>
<meta>
<status>failure</status>
<statuscode>403</statuscode>
<message>Public link mail notification is not allowed</message>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data/>
</ocs>