Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ephraimduncan/disposable-email-api

This API allows you to check if an email address is from a disposable email service.
https://github.com/ephraimduncan/disposable-email-api

api disposable-email disposable-email-domains disposable-emails hono

Last synced: 4 days ago
JSON representation

This API allows you to check if an email address is from a disposable email service.

Awesome Lists containing this project

README

        

## Is-Disposable-Email API

This API allows you to check if an email address is from a disposable email service.

> https://is-disposable-email.ephraimduncan68.workers.dev/

### Development

#### Clone the repository

```
git clone https://github.com/dephraiim/disposable-email-api.git
cd disposable-email-api
pnpm install
pnpm run dev
```

#### Deploy to Cloudflare Workers

```
pnpm run deploy
```

### Usage

#### Endpoints

```
GET /
POST /
```

#### GET /

This endpoint returns information about the API.

**Response:**

```json
{
"name": "is-disposable-email",
"version": "1.0.0"
}
```

#### POST /

This endpoint checks if an email address is disposable.

**Request Body:**

```json
{
"email": "[email protected]"
}
```

**Response:**

```json
{
"email": "[email protected]",
"isDisposable": true|false,
"isAllowedList": true|false,
"status": "success",
"message": "Email is from a disposable email service",
"timestamp": "2023-12-08T20:42:00.000Z"
}
```

**Response Codes:**

- 200: The request was successful.
- 400: The request was invalid.
- 500: An internal server error occurred.

### Example Usage

```bash
curl -X POST -H "Content-Type: application/json" -d '{"email": "[email protected]"}' https://is-disposable-email.ephraimduncan68.workers.dev/
```