-
Notifications
You must be signed in to change notification settings - Fork 2
/
API.html
161 lines (136 loc) · 7.27 KB
/
API.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="https://mailtrap.io/wp-content/uploads/2021/04/cropped-favicon-196x196-1-270x270.png">
<!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script> -->
<title>Mailtrack/API</title>
<style>
.row{
display: flex;
/* justify-content: space-between; */
}
.col-4{
/* margin-right: 100px; */
position: fixed;
width: 14%;
}
#simple-list-example{
display: flex;
flex-direction: column;
}
.col-4>input{
border: 0px;
}
#overlay{width: 75%;}
#overlay:hover{
cursor: pointer;
background-color: grey;
}
.col-4>img:hover{
cursor: pointer;
background-color:#00d084;
}
.col-8{
/* margin-left: 100px; */
width: 70%;
}
#simple-list-example>a:hover{
cursor: pointer;
color: green;
}
/* #fixed{
} */
</style>
</head>
<body >
<div class="row">
<div class="col-4">
<div id="overlay"><a href="index.html"><img width="60%" src="images/mailtrap-new-logo.svg" alt="logo"></a></div>
<br>
<br>
<br>
<input type="text" placeholder="🔍 Search">
<br>
<br>
<a href="index.html">Home</a>
<!-- <hr> -->
<hr>
<br>
<div id="simple-list-example" class="d-flex flex-column gap-2 simple-list-example-scrollspy text-center">
<a class="p-1 rounded" href="https://api-docs.mailtrap.io/docs/mailtrap-api-docs">Mailtrap API</a>
<!-- <a class="p-1 rounded" href="#simple-list-item-2">Item 2</a>
<a class="p-1 rounded" href="#simple-list-item-3">Item 3</a>
<a class="p-1 rounded" href="#simple-list-item-4">Item 4</a>
<a class="p-1 rounded" href="#simple-list-item-5">Item 5</a> -->
</div>
</div>
<hr>
<div class="col-8">
<div data-bs-spy="scroll" data-bs-target="#simple-list-example" data-bs-offset="0" data-bs-smooth-scroll="true" class="scrollspy-example" tabindex="0">
<h4 id="simple-list-item-1">Mailtrap API</h4>
<p>
This is documentation for API v2. Please refer here for Sandbox API v1 documentation.
Mailtrap API is based on the REST principles. The following documentation covers core resources that are used to manipulate the main entities. To start using the Mailtrap API, only a Mailtrap account is required. You have to be authenticated and call the simple HTTPS request on the URL specified below. Please read these basic instructions before you start working with the API.
We offer the following SDKs to integrate Mailtrap API in your application:
NodeJS SDK
Ruby SDK
PHP [coming soon]
Python [coming soon].</p>
<h4 id="simple-list-item-2">There are several ways to send authenticated HTTP requests:</h4>
<p>
Send a HTTP header Api-Token: {api_token}, where {api_token} is your API token
Send a HTTP header Authorization: Bearer #{token}, where {api_token} is your API token (more info: Token Access Authentication)
You can manage your API token on the API Tokens page. API token does not have an expiration date, you may reset it manually.</p>
<h4 id="simple-list-item-3">Allowed requests and common responses
Allowed HTTPs requests include:</h4>
<p>
POST - to create a resource
PATCH - to update a resource
PUT - to replace a resource
GET - to get a resource or a list of resources
DELETE - to delete a resource
Here is the description of common server responses:
200 OK - the request was successful (some API calls may return 201 instead).
204 No Content - the request was successful but there is no representation to return (i.e. the response is empty).
401 Unauthorized - authentication failed or user doesn't have permissions for requested operation.
403 Forbidden - access denied.
404 Not Found - resource was not found.
422 Unprocessable Entity - requested data contain invalid values.
All requests must be sent over HTTPS protocol.</p>
<!-- <h4 id="simple-list-item-4">Item 4</h4> -->
<!-- <p> POST - to create a resource
PATCH - to update a resource
PUT - to replace a resource
GET - to get a resource or a list of resources
DELETE - to delete a resource
Here is the description of common server responses:
200 OK - the request was successful (some API calls may return 201 instead).
204 No Content - the request was successful but there is no representation to return (i.e. the response is empty).
401 Unauthorized - authentication failed or user doesn't have permissions for requested operation.
403 Forbidden - access denied.
404 Not Found - resource was not found.
422 Unprocessable Entity - requested data contain invalid values.
All requests must be sent over HTTPS protocol.</p></p>
<h4 id="simple-list-item-5">Item 5</h4>
<p> POST - to create a resource
PATCH - to update a resource
PUT - to replace a resource
GET - to get a resource or a list of resources
DELETE - to delete a resource
Here is the description of common server responses:
200 OK - the request was successful (some API calls may return 201 instead).
204 No Content - the request was successful but there is no representation to return (i.e. the response is empty).
401 Unauthorized - authentication failed or user doesn't have permissions for requested operation.
403 Forbidden - access denied.
404 Not Found - resource was not found.
422 Unprocessable Entity - requested data contain invalid values.
All requests must be sent over HTTPS protocol.</p></p> -->
</div>
</div>
</div>
</body>
</html>