v1.DomainService
Remove a domain.
Remove a domain.
POST
/
v1.DomainService
/
DeleteDomain
Remove a domain.
const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({id: '<string>'})
};
fetch('https://api.simpleemailapi.dev/v1.DomainService/DeleteDomain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.simpleemailapi.dev/v1.DomainService/DeleteDomain \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>"
}
'import requests
url = "https://api.simpleemailapi.dev/v1.DomainService/DeleteDomain"
payload = { "id": "<string>" }
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.simpleemailapi.dev/v1.DomainService/DeleteDomain"
payload := strings.NewReader("{\n \"id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "<string>"
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Authorizations
API key authentication. Get your API key from the SimpleEmailAPI dashboard and include it in the Authorization header as: Bearer sea_live_xxxxx
Headers
Define the version of the Connect protocol
Available options:
1 Define the timeout, in ms
Body
application/json
Response
Success
Was this page helpful?
⌘I
Remove a domain.
const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({id: '<string>'})
};
fetch('https://api.simpleemailapi.dev/v1.DomainService/DeleteDomain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.simpleemailapi.dev/v1.DomainService/DeleteDomain \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>"
}
'import requests
url = "https://api.simpleemailapi.dev/v1.DomainService/DeleteDomain"
payload = { "id": "<string>" }
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.simpleemailapi.dev/v1.DomainService/DeleteDomain"
payload := strings.NewReader("{\n \"id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "<string>"
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}