This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 60
/
openapi.json
348 lines (348 loc) · 9.35 KB
/
openapi.json
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
{
"openapi": "3.0.0",
"info": {
"title": "Reacher",
"version": "0.3.*",
"description": "### What is Reacher?\n\nReacher is a powerful, free and open-source email verification API service. It is provided both as a SaaS and as a self-host solution.",
"license": {
"name": "AGPL-3.0 OR Commercial",
"url": "https://github.com/reacherhq/backend/blob/master/LICENSE.md"
},
"contact": {
"name": "Reacher",
"url": "https://reacher.email",
"email": "[email protected]"
},
"termsOfService": "https://github.com/reacherhq/policies/blob/master/terms/index.fr.md"
},
"servers": [
{
"url": "https://api.reacher.email/v0",
"description": "Reacher Production"
}
],
"paths": {
"/check_email": {
"post": {
"summary": "/check_email",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CheckEmailOutput"
},
"examples": {
"Example with [email protected]": {
"value": {
"input": "[email protected]",
"is_reachable": "invalid",
"misc": {
"is_disposable": false,
"is_role_account": true
},
"mx": {
"accepts_mail": true,
"records": [
"alt4.gmail-smtp-in.l.google.com.",
"alt2.gmail-smtp-in.l.google.com.",
"alt3.gmail-smtp-in.l.google.com.",
"gmail-smtp-in.l.google.com.",
"alt1.gmail-smtp-in.l.google.com."
]
},
"smtp": {
"can_connect_smtp": true,
"has_full_inbox": false,
"is_catch_all": false,
"is_deliverable": false,
"is_disabled": false
},
"syntax": {
"domain": "gmail.com",
"is_valid_syntax": true,
"username": "test"
}
}
}
}
}
}
}
},
"operationId": "post-check-email",
"description": "Perform a full verification of an email address.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CheckEmailInput"
}
}
},
"description": "Input containing all parameters necessary for an email verification."
},
"parameters": [
{
"schema": {
"type": "string"
},
"in": "header",
"name": "Authorization",
"description": "Your personal Reacher API key",
"required": true
}
]
},
"parameters": []
}
},
"components": {
"schemas": {
"CheckEmailOutput": {
"title": "CheckEmailOutput",
"type": "object",
"x-examples": {
"Example with [email protected]": {
"input": "[email protected]",
"is_reachable": "invalid",
"misc": {
"is_disposable": false,
"is_role_account": true
},
"mx": {
"accepts_mail": true,
"records": [
"alt4.gmail-smtp-in.l.google.com.",
"alt2.gmail-smtp-in.l.google.com.",
"alt3.gmail-smtp-in.l.google.com.",
"gmail-smtp-in.l.google.com.",
"alt1.gmail-smtp-in.l.google.com."
]
},
"smtp": {
"can_connect_smtp": true,
"has_full_inbox": false,
"is_catch_all": false,
"is_deliverable": false,
"is_disabled": false
},
"syntax": {
"domain": "gmail.com",
"is_valid_syntax": true,
"username": "test"
}
}
},
"description": "The verification result of an email.",
"properties": {
"input": {
"type": "string",
"format": "email",
"description": "The input email address."
},
"is_reachable": {
"$ref": "#/components/schemas/Reachable"
},
"misc": {
"oneOf": [
{
"$ref": "#/components/schemas/MiscDetails"
},
{
"$ref": "#/components/schemas/Error"
}
],
"description": "Miscellaneous information about the email account."
},
"mx": {
"oneOf": [
{
"$ref": "#/components/schemas/MxDetails"
},
{
"$ref": "#/components/schemas/Error"
}
],
"description": "Information gathered from querying the MX records of the mail server."
},
"smtp": {
"oneOf": [
{
"$ref": "#/components/schemas/SmtpDetails"
},
{
"$ref": "#/components/schemas/Error"
}
],
"description": "Verifications performed by connecting to the mail server via SMTP."
},
"syntax": {
"$ref": "#/components/schemas/SyntaxDetails"
}
},
"required": ["input", "misc", "mx", "smtp", "syntax", "is_reachable"]
},
"Error": {
"title": "Error",
"type": "object",
"description": "Object describing an error happening during the misc, MX, or SMTP verifications.",
"properties": {
"type": {
"type": "string",
"description": "An error type."
},
"message": {
"type": "string",
"description": "A human-readable description of the error."
}
},
"required": ["type", "message"]
},
"MiscDetails": {
"title": "MiscDetails",
"type": "object",
"description": "Miscellaneous information about the email account.",
"properties": {
"is_disposable": {
"type": "boolean",
"description": "Is the address provided by a known disposable email address provider?"
},
"is_role_account": {
"type": "boolean",
"description": "Is this email a role-based account?"
}
},
"required": ["is_disposable", "is_role_account"]
},
"MxDetails": {
"title": "MxDetails",
"type": "object",
"properties": {
"accepts_mail": {
"type": "boolean",
"description": "Does the server accept mails?"
},
"records": {
"type": "array",
"description": "The list of FQDN (Fully Qualified Domain Names) of the mail server.",
"items": {
"type": "string"
}
}
},
"required": ["accepts_mail", "records"],
"description": "Object holding the MX details of the mail server."
},
"SmtpDetails": {
"title": "SmtpDetails",
"type": "object",
"description": "Verifications performed by connecting to the mail server via SMTP.",
"properties": {
"can_connect_smtp": {
"type": "boolean",
"description": "Can the mail exchanger of the email address domain be contacted successfully?"
},
"has_full_inbox": {
"type": "boolean",
"description": "Is the inbox of this mailbox full?"
},
"is_catch_all": {
"type": "boolean",
"description": "Is this email address a catch-all address?"
},
"is_deliverable": {
"type": "boolean",
"description": "Is an email sent to this address deliverable?"
},
"is_disabled": {
"type": "boolean",
"description": "Has this email address been disabled by the email provider?"
}
},
"required": ["can_connect_smtp", "has_full_inbox", "is_catch_all", "is_deliverable", "is_disabled"]
},
"SyntaxDetails": {
"title": "SyntaxDetails",
"type": "object",
"description": "Syntax validation of an email address.",
"properties": {
"domain": {
"type": "string",
"description": "The domain name of the email, i.e. the part after the \"@\" symbol."
},
"is_valid_syntax": {
"type": "boolean",
"description": "Is the address syntactically valid?"
},
"username": {
"type": "string",
"description": "The username of the email, i.e. the part before the \"@\" symbol."
}
},
"required": ["domain", "is_valid_syntax", "username"]
},
"Reachable": {
"type": "string",
"title": "Reachable",
"enum": ["invalid", "unknown", "safe", "risky"],
"description": "An enum to describe how confident we are that the recipient address is real: `safe`, `risky`, `invalid` and `unknown`. Check our FAQ to know the meanings of the 4 possibilities: https://help.reacher.email/email-attributes-inside-json."
},
"CheckEmailInput": {
"title": "CheckEmailInput",
"type": "object",
"description": "Input containing all parameters necessary for an email verification.",
"properties": {
"from_email": {
"type": "string",
"description": "In the SMTP connection, the FROM email address."
},
"to_email": {
"type": "string",
"description": "The email address to check."
},
"hello_name": {
"type": "string",
"description": "In the SMTP connection, the EHLO hostname."
},
"proxy": {
"$ref": "#/components/schemas/CheckEmailInputProxy"
}
},
"required": ["to_email"]
},
"CheckEmailInputProxy": {
"title": "CheckEmailInputProxy",
"type": "object",
"x-examples": {
"example-1": {
"value": {
"host": "my-proxy.io",
"port": 1080
}
}
},
"properties": {
"host": {
"type": "string",
"description": "The proxy host."
},
"port": {
"type": "integer",
"description": "The proxy port."
}
},
"required": ["host", "port"]
}
},
"securitySchemes": {
"Authorization": {
"name": "Authorization",
"type": "apiKey",
"in": "header",
"description": "A Reacher API key is required for all requests. Sign up on https://reacher.email to get your personal API key."
}
}
}
}