Skip to content

Commit 613ec52

Browse files
authored
Merge pull request #46 from encryption4all/docs/cryptify-notify-recipients
docs(cryptify): document notifyRecipients on /fileupload/init
2 parents 50922fd + cd04328 commit 613ec52

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

docs/repos/cryptify.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,25 @@ When a request would push the sender over the per-upload or the rolling-window l
6969

7070
Cryptify exposes a file upload/download API. An OpenAPI 3.0 specification is available in `api-description.yaml` in the repository root. The main endpoints:
7171

72-
- `POST /fileupload/init`: Initialize a multipart file upload (takes sender email, recipient email, file size, mail content, and language).
72+
- `POST /fileupload/init`: Initialize a multipart file upload. The JSON body takes `recipient`, `mailContent`, `mailLang`, `confirm`, and the optional `notifyRecipients`.
7373
- `PUT /fileupload/{uuid}`: Upload a file chunk (use `Content-Range` header for chunked uploads).
74-
- `POST /fileupload/finalize/{uuid}`: Finalize the upload and send the notification email.
74+
- `POST /fileupload/finalize/{uuid}`: Finalize the upload (sends the recipient notification email if `notifyRecipients` was `true` on init).
7575
- `GET /filedownload/{uuid}`: Download a file.
7676

77+
### `POST /fileupload/init` request body
78+
79+
| Field | Type | Required | Description |
80+
|---|---|---|---|
81+
| `recipient` | string (email) | yes | Recipient email address. |
82+
| `mailContent` | string | yes | Body text included in the recipient and confirmation emails. |
83+
| `mailLang` | string | yes | Email language. `EN` or `NL`. |
84+
| `confirm` | boolean | yes | Send a confirmation email to the sender. |
85+
| `notifyRecipients` | boolean | no | Email each recipient with a download link. Defaults to `true` when omitted, for backward compatibility. Set to `false` to upload silently when the encrypted payload reaches the recipient through another channel. |
86+
87+
The `notifyRecipients` field was added in cryptify 0.9 (see [encryption4all/cryptify#135](https://github.com/encryption4all/cryptify/pull/135)). Direct API callers that omit it keep the original notify-on-finalize behaviour. SDK callers (`@e4a/pg-js` 1.2.0+, `E4A.PostGuard` 0.3.0+) send `false` explicitly so the silent-by-default semantics hold regardless of the cryptify version on the other end.
88+
89+
<small>[Source: api-description.yaml#L33-L72](https://github.com/encryption4all/cryptify/blob/723c8db10420180e50a5d97bb852794683c9544d/api-description.yaml#L33-L72)</small>
90+
7791
## Development
7892

7993
### Docker (recommended)

0 commit comments

Comments
 (0)