Settings
Update SMTP settings
PUT
/
api
/
settings
/
smtp
Update SMTP settings
curl --request PUT \
--url https://spitshake.io/api/settings/smtp \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"smtp_address": "<string>",
"smtp_port": "<string>",
"smtp_domain": "<string>",
"smtp_username": "<string>",
"smtp_password": "<string>",
"smtp_from_address": "jsmith@example.com"
}
'import requests
url = "https://spitshake.io/api/settings/smtp"
payload = {
"smtp_address": "<string>",
"smtp_port": "<string>",
"smtp_domain": "<string>",
"smtp_username": "<string>",
"smtp_password": "<string>",
"smtp_from_address": "jsmith@example.com"
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
smtp_address: '<string>',
smtp_port: '<string>',
smtp_domain: '<string>',
smtp_username: '<string>',
smtp_password: '<string>',
smtp_from_address: 'jsmith@example.com'
})
};
fetch('https://spitshake.io/api/settings/smtp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spitshake.io/api/settings/smtp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'smtp_address' => '<string>',
'smtp_port' => '<string>',
'smtp_domain' => '<string>',
'smtp_username' => '<string>',
'smtp_password' => '<string>',
'smtp_from_address' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://spitshake.io/api/settings/smtp"
payload := strings.NewReader("{\n \"smtp_address\": \"<string>\",\n \"smtp_port\": \"<string>\",\n \"smtp_domain\": \"<string>\",\n \"smtp_username\": \"<string>\",\n \"smtp_password\": \"<string>\",\n \"smtp_from_address\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
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))
}HttpResponse<String> response = Unirest.put("https://spitshake.io/api/settings/smtp")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"smtp_address\": \"<string>\",\n \"smtp_port\": \"<string>\",\n \"smtp_domain\": \"<string>\",\n \"smtp_username\": \"<string>\",\n \"smtp_password\": \"<string>\",\n \"smtp_from_address\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/settings/smtp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"smtp_address\": \"<string>\",\n \"smtp_port\": \"<string>\",\n \"smtp_domain\": \"<string>\",\n \"smtp_username\": \"<string>\",\n \"smtp_password\": \"<string>\",\n \"smtp_from_address\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
ApiTokenSessionCookie
API token generated at Settings > API
Body
application/json
Response
200 - application/json
SMTP settings updated
⌘I
Update SMTP settings
curl --request PUT \
--url https://spitshake.io/api/settings/smtp \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"smtp_address": "<string>",
"smtp_port": "<string>",
"smtp_domain": "<string>",
"smtp_username": "<string>",
"smtp_password": "<string>",
"smtp_from_address": "jsmith@example.com"
}
'import requests
url = "https://spitshake.io/api/settings/smtp"
payload = {
"smtp_address": "<string>",
"smtp_port": "<string>",
"smtp_domain": "<string>",
"smtp_username": "<string>",
"smtp_password": "<string>",
"smtp_from_address": "jsmith@example.com"
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
smtp_address: '<string>',
smtp_port: '<string>',
smtp_domain: '<string>',
smtp_username: '<string>',
smtp_password: '<string>',
smtp_from_address: 'jsmith@example.com'
})
};
fetch('https://spitshake.io/api/settings/smtp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://spitshake.io/api/settings/smtp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'smtp_address' => '<string>',
'smtp_port' => '<string>',
'smtp_domain' => '<string>',
'smtp_username' => '<string>',
'smtp_password' => '<string>',
'smtp_from_address' => 'jsmith@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://spitshake.io/api/settings/smtp"
payload := strings.NewReader("{\n \"smtp_address\": \"<string>\",\n \"smtp_port\": \"<string>\",\n \"smtp_domain\": \"<string>\",\n \"smtp_username\": \"<string>\",\n \"smtp_password\": \"<string>\",\n \"smtp_from_address\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
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))
}HttpResponse<String> response = Unirest.put("https://spitshake.io/api/settings/smtp")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"smtp_address\": \"<string>\",\n \"smtp_port\": \"<string>\",\n \"smtp_domain\": \"<string>\",\n \"smtp_username\": \"<string>\",\n \"smtp_password\": \"<string>\",\n \"smtp_from_address\": \"jsmith@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/settings/smtp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"smtp_address\": \"<string>\",\n \"smtp_port\": \"<string>\",\n \"smtp_domain\": \"<string>\",\n \"smtp_username\": \"<string>\",\n \"smtp_password\": \"<string>\",\n \"smtp_from_address\": \"jsmith@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}
