-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathapiary.apib
205 lines (149 loc) · 5.93 KB
/
apiary.apib
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
FORMAT: 1A
HOST: https://torm.xyz/api/
# MailCare API Documentation
MailCare is an open source disposable email address service.
The domain **torm.xyz** is used as a demo, it can be changed at any time.
#### Versions
By default, all requests receive the last version of the REST API.
We encourage you to explicitly request this version via the Accept header if you're building an application and care about the stability of the API.
```
Accept: application/vnd.mailcare.v1+json
```
# Data Structures
## Links (object)
+ first: `https://torm.xyz/api/emails?page=1` (string)
+ last: `https://torm.xyz/api/emails?page=12` (string)
+ prev: `https://torm.xyz/api/emails?page=6` (string)
+ next: `https://torm.xyz/api/emails?page=8` (string)
## Meta (object)
+ current_page: 7 (number)
+ from: 1 (number)
+ last_page: 12 (number)
+ path: `https://torm.xyz/api/emails` (string)
+ per_page: 25 (number)
+ to: 12 (number)
+ total: 300 (number)
## Email (object)
+ id: `9bf63f3b-4e4e-46a0-8c7d-2d6d32576a1d` (string)
+ sender (Sender) - sender of the email
+ inbox (Inbox) - inbox of the email
+ subject: `Welcome to mailcare.io` (string)
+ created_at: `2018-01-19T12:23:27+00:00` (string)
+ read: `2018-01-19T12:23:27+00:00` (string)
+ favorite: false (boolean)
+ has_html: true (boolean)
+ has_text: true (boolean)
+ size_in_bytes: 40240 (number)
+ attachments (array[Attachment])
## Sender (object)
+ id: `9bf63f3b-4e4e-46a0-8c7d-2d6d32576a1d` (string)
+ display_name: Louis (string)
+ email: [email protected] (string)
+ created_at: `2018-01-19T12:23:27+00:00` (string)
+ updated_at: `2018-01-19T12:23:27+00:00` (string)
## Inbox (object)
+ id: `9bf63f3b-4e4e-46a0-8c7d-2d6d32576a1d` (string)
+ display_name: Claire (string)
+ email: [email protected] (string)
+ created_at: `2018-01-19T12:23:27+00:00` (string)
+ updated_at: `2018-01-19T12:23:27+00:00` (string)
## Attachment (object)
+ id: `238515b6-9a2f-4797-aed6-e7d36a7df430` (string)
+ email_id: `7dfc9fea-c496-4623-8784-de53706dad7f` (string)
+ headers_hashed: `b84bcb9dfc8d0a17a089073c0355ad58` (string)
+ file_name: `signature.jpg` (string)
+ content_type: `image/jpg` (string)
+ size_in_bytes: 33996 (number)
+ created_at: `2018-01-19 12:23:27` (string)
+ updated_at: `2018-01-19 12:23:27` (string)
+ size_for_human: `34.00kB` (string)
## Statistic (object)
+ created_at: `2018-01-19` (string)
+ emails_received: 10 (number)
+ inboxes_created: 3 (number)
+ storage_used: 33996 (number)
## MetaStatistic (object)
+ emails_received: 786 (number)
+ inboxes_created: 68 (number)
+ storage_used_for_human: `48.08MB` (string)
+ storage_used: 48083603 (number)
## Emails Resource [/emails]
### List of emails [GET /emails{?limit}{?inbox}{?sender}{?search}{?unread}{?favorite}]
+ Parameters
+ page: `2` (number, optional) - Page requested
+ Default: `1`
+ limit: `100` (number, optional) - Maximum number of emails to retrieve
+ Default: `25`
+ inbox: `[email protected]` (string, optional) - Filter by inbox
+ sender: `[email protected]` (string, optional) - Filter by sender
+ search: `matching` (string, optional) - Search by inbox or sender or subject
+ unread: `true` (boolean, optional) - Filter only by unread
+ favorite: `true` (boolean, optional) - Filter only by favorite
+ Request (application/vnd.mailcare.v1+json)
+ Response 200 (application/vnd.mailcare.v1+json)
+ Attributes
+ data (array[Email])
+ links (Links)
+ meta (Meta)
## Email Resource [/emails/{id}]
+ Parameters
+ id: `9bf63f3b-4e4e-46a0-8c7d-2d6d32576a1d` (string, required) - ID of the email
### Get an email [GET]
+ Request (application/vnd.mailcare.v1+json)
+ Response 200 (application/vnd.mailcare.v1+json)
+ Attributes
+ data (Email)
+ Request (text/plain)
+ Response 200 (text/plain)
Welcome to mailcare.io
Follow this link to continue: https://mailcare.io
+ Request (text/html)
+ Response 200 (text/html)
<div>
<h1>Welcome to mailcare.io</h1>
<p>
Follow this link to continue <a href="https://mailcare.io">mailcare.io</a>
</p>
</div>
+ Request (message/rfc2822)
+ Response 200 (message/rfc2822)
From [email protected] Sun Jun 16 17:50:14 2013
MIME-Version: 1.0
Date: Sun, 16 Jun 2013 17:50:12 +0200
Subject: =?ISO-8859-1?Q?Mail_avec_fichier_attach=E9_de_1ko?=
From: Name <[email protected]>
Content-Type: multipart/mixed; boundary=047d7b1635f77236f404df476f85
--047d7b1635f77236f404df476f85
Content-Type: multipart/alternative; boundary=047d7b1635f77236f004df476f83
--047d7b1635f77236f004df476f83
Content-Type: text/plain; charset=ISO-8859-1
this is text part
--047d7b1635f77236f004df476f83
Content-Type: text/html; charset=ISO-8859-1
<div>this is html part</div>
--047d7b1635f77236f004df476f83--
--047d7b1635f77236f404df476f85
Content-Type: application/octet-stream; name=attach01
Content-Disposition: attachment; filename=attach01
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hi0eudw60
YQo=
--047d7b1635f77236f404df476f85--
+ Response 404 (application/vnd.mailcare.v1+json)
{
"message": "No query results for model [App\\Email] 9f0de6bf-ede4-4d8b-886f-1de5a8cb857d"
}
### Favorite an email [POST /emails/{id}/favorites]
+ Request (application/vnd.mailcare.v1+json)
+ Response 200 (application/vnd.mailcare.v1+json)
### Unfavorite an email [DELETE /emails/{id}/favorites]
+ Request (application/vnd.mailcare.v1+json)
+ Response 200 (application/vnd.mailcare.v1+json)
## Statistics Resource [/statistics]
### List of statistics [GET]
+ Request (application/vnd.mailcare.v1+json)
+ Response 200 (application/vnd.mailcare.v1+json)
+ Attributes
+ data (array[Statistic])
+ meta (MetaStatistic)