This repository has been archived by the owner on Mar 22, 2024. It is now read-only.
generated from jshawl/saas-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,18 +16,38 @@ The HTTP API is how emails are sent from Continuous Integration environments. | |
|to|string|true| | ||
|subject|string|true| | ||
|body|string|false| | ||
|attachments|array|false| | ||
|
||
#### Attachments | ||
|
||
|name|type|required|description| | ||
|---|---|---| | ||
|type|string|true|The content's MIME type| | ||
|content|string|true|The Base64 encoded content of the attachment| | ||
|filename|string|true|The attachment's filename| | ||
|
||
### Example | ||
|
||
#### application/x-www-form-urlencoded | ||
```bash | ||
curl --request POST 'https://www.cinotify.cc/api/notify' \ | ||
-d "[email protected]&subject=building main&body=hello." | ||
-d "[email protected]&subject=building main&body=hello.&attachments[][type]=text/plain&attachments[][content]=aGVsbG8sIHdvcmxkIQ==&attachments[][filename]=hello.txt" | ||
``` | ||
|
||
#### json | ||
```bash | ||
curl -X POST 'https://www.cinotify.cc/api/notify' \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"to":"[email protected]", "subject": "building main", "body":"hello."}' | ||
-d '{ | ||
"to": "[email protected]", | ||
"subject": "building main", | ||
"body": "hello.", | ||
"attachments": [ | ||
{ | ||
"type": "text/plain", | ||
"content": "aGVsbG8sIHdvcmxkIQ==", | ||
"filename": "hello.txt" | ||
} | ||
] | ||
}' | ||
``` |