/
postmark.suma
55 lines (46 loc) · 1.03 KB
/
postmark.suma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// API Reference: https://postmarkapp.com/developer/api/overview
profile = "communication/send-email@2.0"
provider = "postmark"
map SendEmail {
http POST "/email" {
security "server_token"
request "application/json" {
body {
From = input.from
To = input.to
Subject= input.subject
TextBody = input.text
HtmlBody = input.html
}
}
response 200 "application/json" {
map result {
messageId = body.MessageID
}
}
response 422 "application/json" {
map error {
title = "Invalid inputs"
detail = body.Message
}
}
response 401 "application/json" {
map error {
title = "Unauthorized"
detail = body.Message
}
}
response 403 "application/json" {
map error {
title = "Forbidden"
detail = body.Message
}
}
response 500 "application/json" {
map error {
title = "Internal server Error"
detail = body.Message
}
}
}
}