# Overview

### Connect to the API

The Maildrop API is located at `https://api.maildrop.cc/graphql` and only allows secured connections.

All requests must be valid GraphQL queries or mutations; any other query will fail with an error message.

#### See Also

* [Maildrop Quickstart](https://docs.maildrop.cc/quickstart)
* [GraphQL](https://docs.maildrop.cc/api-reference/graphql-api-schema)

### Authentication and Request Requirements

The Maildrop API currently requires no authentication. At some point in the future, there may be a requirement of a bearer token to perform queries if rate limiting is insufficient to stop high-volume query batches.

The only requirement is that every request must have the **Content-Type** header set to **application/json**. Without this header, the request will fail with an error message.

As with other GraphQL APIs, every request to the Maildrop API must be an HTTP **POST**.

### Request Formatting

Other than the formatting for GraphQL, there are no specific requirements for formatting a request to the API. Valid user agent strings, correct Accept headers for compression, and any header that you would set for a "normal" API request should all be set when accessing the Maildrop API.

Cache-Control headers will be ignored by the API - caching is done within the Maildrop architecture and trying to evict caches with the Cache-Control header will not work.

### Reference: List of API Methods

| API Method                                                                              | Sample Query                                                                                     | Parameters                             |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------------- |
| Echo Resolver                                                                           | ping(message: "Hello, world!")                                                                   | $message: String                       |
| [Get a Mailbox Listing](https://docs.maildrop.cc/api-reference/get-a-mailbox-listing)   | inbox(mailbox: "testing")                                                                        | $mailbox: String                       |
| [Get a Specific Message](https://docs.maildrop.cc/api-reference/get-a-specific-message) | message(mailbox: "testing", id: "abc123")                                                        | <p>$mailbox: String<br>$id: String</p> |
| [Delete a Message](https://docs.maildrop.cc/api-reference/delete-a-message)             | <p>delete(mailbox: "testing", id: "abc123")<br><br><strong>Note</strong>: this is a mutation</p> | <p>$mailbox: String<br>$id: String</p> |
| [Get a Mailbox Alias](https://docs.maildrop.cc/api-reference/get-a-mailbox-alias)       | altinbox(mailbox: "testing")                                                                     | $mailbox: String                       |
| [Maildrop Statistics](https://docs.maildrop.cc/api-reference/maildrop-statistics)       | statistics                                                                                       |                                        |
| [Service Status](https://docs.maildrop.cc/api-reference/service-status)                 | status                                                                                           |                                        |

#### See Also

* [GraphQL API Schema](https://docs.maildrop.cc/graphql-api-schema#the-full-graphql-schema-for-maildrop)
