¿Cómo utilizar la API del servicio de correo electrónico temporal?

¿Cómo utilizar la API del servicio de correo electrónico temporal?

Los correos electrónicos temporales facilitan la protección de tu privacidad y el bloqueo de correos no deseados. Nuestro servicio te permite crearlos y gestionarlos mediante APIs sencillas. Puedes configurar un correo temporal, recibir mensajes y manejarlos en solo unos pasos.

Esta guía te explica cada API para que puedas empezar rápida y eficientemente.

¿Por qué usar nuestra API?

  • Protección de la privacidad: Mantén tu dirección de correo real privada.

  • Configuración rápida: Crea y recibe correos con solo una línea de código.

  • Uso flexible: Perfecto para registros, pruebas o recibir códigos de un solo uso.

Autenticación de la API

Cada solicitud a la API requiere autenticación segura. Incluye tu clave de API y el token de autorización en los encabezados de la solicitud.

Así es como puedes comenzar:

  1. Listar los dominios disponibles

Endpoint: api/domains/{apiKey}/{type}

Method: GET

Parameters:

  • apiKey - Your API key.
  • type - Type of domains to fetch (free, premium, all).

Example Request:

GET api/domains/your-api-key/all

Example Response:

{
    "status": true,
    "data": {
        "domains": [
            {
                "domain": "free.com",
                "type": "Free"
            },
            {
                "domain": "lobage.com",
                "type": "Free"
            },
            {
                "domain": "premium.com",
                "type": "Premium"
            }
        ]
    }
}

Endpoint: api/emails/{apiKey}

Method: POST

Parameters:

  • apiKey - Your API key.

Example Request:

POST api/emails/your-api-key

Example Response:

{
    "status": true,
    "data": {
        "email": "random@example.com",
        "domain": "example.com",
        "ip": "127.0.0.1",
        "fingerprint": "eef780ab2ec7535e66c1405c0bff1c64",
        "expire_at": "2025-01-01T00:00:00.000000Z",
        "created_at": "2025-01-01T00:00:00.000000Z",
        "id": 1,
        "email_token": "email_token"
    }
}

Endpoint: api/emails/{apiKey}/{email}/{username}/{domain}

Method: POST

Parameters:

  • apiKey - Your API key.
  • email - The current email address.
  • username - The new username.
  • domain - The new domain.

Example Request:

POST api/emails/your-api-key/old@example.com/newuser/newexample.com

Example Response:

{
    "status": true,
    "data": {
        "email": "newuser@newexample.com",
        "domain": "newexample.com",
        "ip": "127.0.0.1",
        "fingerprint": "eef780ab2ec7535e66c1405c0bff1c64",
        "expire_at": "2025-01-01T00:00:00.000000Z",
        "created_at": "2025-01-01T00:00:00.000000Z",
        "id": 2,
        "email_token": "email_token"
    }
}

Endpoint: api/emails/{apiKey}/{email}

Method: POST

Parameters:

  • apiKey - Your API key.
  • email - The email address to delete.

Example Request:

POST api/emails/your-api-key/old@example.com

Example Response:

{
    "status": true,
    "message": "Email has been successfully deleted."
}

Endpoint: api/messages/{apiKey}/{email}

Method: GET

Parameters:

  • apiKey - Your API key.
  • email - The email address to fetch messages for.

Example Request:

GET api/messages/your-api-key/example@example.com

Example Response:

{
    "status": true,
    "mailbox": "example@example.com",
    "messages": [
        {
            "is_seen": true,
            "subject": "Test Subject",
            "from": "John Doe",
            "from_email": "john@example.com",
            "to": "example@example.com",
            "receivedAt": "2025-01-01 00:00:38",
            "id": "ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1",
            "html": true,
            "content": "Test content",
            "attachments": [
                {
                    "name": "file.txt",
                    "extension": "txt",
                    "size": 91,
                    "url": "http://yoursite.com/api/d/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1/file.txt"
                }
            ]
        }
    ]
}

Endpoint: api/messages/{apiKey}/message/{messageId}

Method: GET

Parameters:

  • apiKey - Your API key.
  • messageId - The ID of the message to fetch.

Example Request:

GET api/messages/your-api-key/message/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1

Example Response:

{
    "status": true,
    "data": {
        "is_seen": true,
        "subject": "Test Subject",
        "from": "John Doe",
        "from_email": "john@example.com",
        "to": "example@example.com",
        "receivedAt": "2024-12-28 00:00:38",
        "id": "ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1",
        "html": true,
        "content": "Test content",
        "attachments": [
            {
                "name": "file.txt",
                "extension": "txt",
                "size": 91,
                "url": "http://yoursite.come/api/d/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1/file.txt"
            }
        ]
    }
}

Endpoint: api/messages/{apiKey}/message/{messageId}

Method: POST

Parameters:

  • apiKey - Your API key.
  • messageId - The ID of the message to delete.

Example Request:

POST api/messages/your-api-key/message/ap94AWDg123ELQz07vrVB9dLXlbqZM5NGwYxOJKko8n6m1

Example Response:

{
    "status": true,
    "message": "Message was deleted successfully."
}

Endpoint: api/d/{hash_id}/{file?}

Method: GET

Parameters:

  • hash_id - The hash ID of the message.
  • file - The name of the file to download (optional).

Example Request:

GET api/d/abc123/filename.pdf

Example Response:

The file will be downloaded directly.

Endpoint: /token/{email_token}

Method: GET

Description: Send your visitors to a site with a token to create the same email.

Parameters:

  • email_token - Your email token

Example Response:

The user will be redirected to a page where the email associated with the token is created or displayed.

Étiquettes :
#correo temporal #correo de diez minutos
Commentaires :
Popular Posts
Catégories
Nous utilisons des cookies.

Nous utilisons des cookies pour améliorer votre expérience de navigation. En utilisant ce site, vous consentez à notre politique de cookies.

Refuser