-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.yml
105 lines (105 loc) · 2.6 KB
/
api.yml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
openapi: 3.0.1
info:
title: email-integration-service
description: RESTful API for sending emails using multiple email clients
version: 1.0.0
servers:
- url: /v1
tags:
- name: Mails
description: Sending Emails endpoint
- name: Specification
description: The swagger API specification
paths:
/mails:
post:
tags:
- Mails
description: Returns status of the email (sent/queued/failed)
parameters: []
responses:
'200':
description: Email will be sent.
'400':
description: Email will not be sent.
'500':
description: Internal Service Error.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MailBody'
/spec:
get:
tags:
- Specification
responses:
200:
description: Return the API specification
content: {}
components:
schemas:
MailBody:
title: Mail
required:
- to
- from
- subject
- text
type: object
properties:
to:
type: array
minLength: 1
description: The name and email address of recpient(s).
items:
type: object
properties:
email:
type: string
format: email
name:
type: string
cc:
type: array
description: The name and email address of recpients.
items:
type: object
properties:
email:
type: string
format: email
name:
type: string
bcc:
type: array
description: The name and email address of recpients.
items:
type: object
properties:
email:
type: string
format: email
name:
type: string
from:
type: object
description: The name and email address of sender.
properties:
email:
type: string
format: email
name:
type: string
subject:
description: The subject of the email.
type: string
text:
description: The body of the email in text string only.
type: string
service_names:
description: This is optional param, but if supplied, this will only use the services indicated.
type: array
items:
type: string
enum: [SendGrid, MailGun]