Endpoints
Request API key creation email
Accepts email and days in JSON body (recommended) or query string.
curl -X POST "https://mail.haltman.io/api/credentials/create?email=user@example.com&days=42" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"days": 42
}'
import requests
import json
url = "https://mail.haltman.io/api/credentials/create?email=user@example.com&days=42"
headers = {
"Content-Type": "application/json"
}
data = {
"email": "user@example.com",
"days": 42
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mail.haltman.io/api/credentials/create?email=user@example.com&days=42", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"email": "user@example.com",
"days": 42
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"email": "user@example.com",
"days": 42
}`)
req, err := http.NewRequest("POST", "https://mail.haltman.io/api/credentials/create?email=user@example.com&days=42", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mail.haltman.io/api/credentials/create?email=user@example.com&days=42')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
"email": "user@example.com",
"days": 42
}'
response = http.request(request)
puts response.body
{
"ok": true,
"action": "api_credentials_create",
"email": "user@example.com",
"days": 42,
"confirmation": {
"sent": true,
"ttl_minutes": 42,
"reason": "cooldown",
"status": "PENDING",
"expires_at": "2024-12-25T10:00:00Z",
"last_sent_at": "2024-12-25T10:00:00Z",
"next_allowed_send_at": "2024-12-25T10:00:00Z",
"send_count": 10,
"remaining_attempts": 42
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
{
"error": "Service Unavailable",
"message": "The service is temporarily unavailable. Please try again later",
"code": 503
}
POST
/api/credentials/create
POST
query
daysinteger
Min: 1 • Max: 90
Content-Typestring
RequiredThe media type of the request body
Options: application/json
daysinteger
RequiredMin: 1 • Max: 90
Request Preview
Response
Response will appear here after sending the request
Query Parameters
Responses
okboolean
actionstring
Allowed values:
api_credentials_createemailstring
daysinteger
confirmationobject
Was this page helpful?
Built with Documentation.AI
Last updated 1 week ago