Référence API Développeur

Aperçu & Authentification API

Bienvenue sur l'API développeur de tempmailto.com pour automatiser la création d'adresses jetables et la lecture de messages dans vos tests QA.

URL de base
https://tempmailto.com/api
Authentification

Transmettez votre clé API dans l'en-tête Authorization (recommandé : Authorization: Bearer YOUR_API_KEY) ou X-API-Key pour éviter d'exposer les identifiants dans les URLs. L'authentification par chemin reste prise en charge pour la compatibilité.

Paramètre d'authentification Type Emplacement Exemple
Authorization / X-API-Key string En-tête HTTP (Recommandé) Bearer YOUR_API_KEY
apiKey string Segment d'URL (hérité) YOUR_API_KEY
GET Domaines actifs

Fetch list of all allowed domain names configured on the platform that can be used to generate temporary mailboxes.

GET https://tempmailto.com/api/domains/{apiKey}/{type}
Paramètres de chemin
Paramètre Type Statut Description
apiKey string Requis Your secret API authorization key.
type string Requis Domain filter type. Accepted values: all, free, premium.
curl -X GET "https://tempmailto.com/api/domains/all" -H "Authorization: Bearer YOUR_API_KEY"
Exemple de réponse
{
  "status": true,
  "data": {
    "domains": [
      {
        "domain": "tempmailto.com",
        "type": "Free"
      }
    ]
  }
}
POST Générer un nouvel e-mail

Instantly generate and register a new random temporary email address address.

POST https://tempmailto.com/api/emails/{apiKey}
Paramètres de chemin
Paramètre Type Statut Description
apiKey string Requis Your secret API authorization key.
curl -X POST "https://tempmailto.com/api/emails" -H "Authorization: Bearer YOUR_API_KEY"
Exemple de réponse
{
  "status": true,
  "data": {
    "id": 142,
    "email": "[email protected]",
    "domain": "tempmailto.com",
    "ip": "127.0.0.1",
    "fingerprint": "f38b25...",
    "expire_at": "2026-06-20 13:45:00",
    "created_at": "2026-06-20 13:35:00",
    "email_token": "eyJpdiI..."
  }
}
POST Personnaliser l'adresse e-mail

Transition an existing email to a customized address with a specific username and active domain.

POST https://tempmailto.com/api/emails/{apiKey}/{email}/{username}/{domain}
Paramètres de chemin
Paramètre Type Statut Description
apiKey string Requis Your secret API authorization key.
email string Requis The current temporary email address you want to change.
username string Requis The customized alias/username prefix for the new address.
domain string Requis One of the active domain names fetched from the active domains endpoint.
curl -X POST "https://tempmailto.com/api/emails/[email protected]/john_doe/tempmailto.com" -H "Authorization: Bearer YOUR_API_KEY"
Exemple de réponse
{
  "status": true,
  "data": {
    "id": 143,
    "email": "[email protected]",
    "domain": "tempmailto.com",
    "ip": "127.0.0.1",
    "fingerprint": "f38b25...",
    "expire_at": "2026-06-20 13:45:00",
    "created_at": "2026-06-20 13:35:00"
  }
}
POST Supprimer l'e-mail temporaire

Instantly release and expire a temporary email address to delete all cached inbox data.

POST https://tempmailto.com/api/emails/{apiKey}/{email}
Paramètres de chemin
Paramètre Type Statut Description
apiKey string Requis Your secret API authorization key.
email string Requis The active temporary email address to be removed.
curl -X POST "https://tempmailto.com/api/emails/[email protected]" -H "Authorization: Bearer YOUR_API_KEY"
Exemple de réponse
{
  "status": true,
  "message": "Email has been successfully deleted."
}
GET Messages de la boîte

Retrieve all message metadata and message summaries received inside the inbox of the specified temporary address.

GET https://tempmailto.com/api/messages/{apiKey}/{email}
Paramètres de chemin
Paramètre Type Statut Description
apiKey string Requis Your secret API authorization key.
email string Requis The temporary email address to fetch the messages for.
curl -X GET "https://tempmailto.com/api/messages/[email protected]" -H "Authorization: Bearer YOUR_API_KEY"
Exemple de réponse
{
  "status": true,
  "data": [
    {
      "id": "M2ZkMXQ1",
      "subject": "Verify your Account",
      "from": "Service Provider",
      "from_email": "[email protected]",
      "receivedAt": "2026-06-20 13:40:00",
      "is_seen": false,
      "html": true
    }
  ]
}
GET Détail du message

Retrieve the full HTML/plain text body content, sender fields, headers, and attachments list of a specific message ID.

GET https://tempmailto.com/api/messages/{apiKey}/message/{messageId}
Paramètres de chemin
Paramètre Type Statut Description
apiKey string Requis Your secret API authorization key.
messageId string Requis The unique identifier key of the message.
curl -X GET "https://tempmailto.com/api/messages/message/M2ZkMXQ1" -H "Authorization: Bearer YOUR_API_KEY"
Exemple de réponse
{
  "status": true,
  "data": {
    "id": "M2ZkMXQ1",
    "subject": "Verify your Account",
    "from": "Service Provider",
    "from_email": "[email protected]",
    "to": "[email protected]",
    "receivedAt": "2026-06-20 13:40:00",
    "is_seen": true,
    "html": true,
    "content": "<p>Hi John, your verification code is <b>857102</b></p>",
    "attachments": []
  }
}
POST Supprimer le message

Permanently purge and delete a specific message from the temp inbox storage.

POST https://tempmailto.com/api/messages/{apiKey}/message/{messageId}
Paramètres de chemin
Paramètre Type Statut Description
apiKey string Requis Your secret API authorization key.
messageId string Requis The unique identifier key of the message to be deleted.
curl -X POST "https://tempmailto.com/api/messages/message/M2ZkMXQ1" -H "Authorization: Bearer YOUR_API_KEY"
Exemple de réponse
{
  "status": true,
  "message": "Message has been successfully deleted."
}