跳到主要内容

sendEditorNotify

AceShortArrayWrapper sendEditorNotify(fileId, MentionMessageRequest)

POST /api/2.0/files/file/{fileId}/sendeditornotify

Notify mentioned users

Emails the people named in emails that they were mentioned in a file, with a link that opens the file at the place the mention sits when actionLink carries the anchor the editor produced. Only addresses that belong to portal accounts are notified: an address that belongs to nobody is skipped, and the note is cut to its first 200 characters in the mail, while a message longer than the field allows is refused with 400. The answer is usually empty: the access list of the file comes back when the file is encrypted, or when one of the addresses belongs to nobody and the caller may share the file - that is then the cue to invite that person with PUT api/2.0/files/file/{id}/share. The caller needs comment rights, which the creator of the file, the manager of its room and a member invited to comment, review or edit have, while a guest or a member without access is refused with 403; a file that does not exist answers with 404 and a file in the trash is refused. The operation is rate-limited and answers 429 once the caller sends too many notifications. A delivery failure is swallowed, so 200 does not prove that the mail left the portal.

Parameters​

NameInTypeDescriptionNotes
fileIdpathInteger (int32)The file the mention was made in. A file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.[required] [example: 10]
MentionMessageRequestbodyMentionMessageRequestThe notification to send.[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The people who currently have access to the file, when the caller still has to invite someone; empty otherwiseAceShortArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The address list is missing, or the message is longer than the field allows--
403The caller may not comment on the file--
404The file does not exist--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

AceShortArrayWrapper

Third-party storage​

For a file or folder in a connected third-party storage the identifier is a string such as sbox-42, and the call differs in these parts only:

NameInTypeDescriptionNotes
fileIdpathStringThe file the mention was made in. A file stored on the portal is numbered, while a file in a connected third-party account is named by an opaque string.[required] [example: sbox-42-L1JlcG9ydC5kb2N4]

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json