curl --request POST \
--url https://api.sapt.ai/emails/contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "John Doe",
"email": "[email protected]",
"subject": "Question about services",
"message": "I would like to learn more about your services...",
"projectId": "proj_abc123",
"recipientEmail": "[email protected]"
}
'import requests
url = "https://api.sapt.ai/emails/contact"
payload = {
"name": "John Doe",
"email": "[email protected]",
"subject": "Question about services",
"message": "I would like to learn more about your services...",
"projectId": "proj_abc123",
"recipientEmail": "[email protected]"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Doe',
email: '[email protected]',
subject: 'Question about services',
message: 'I would like to learn more about your services...',
projectId: 'proj_abc123',
recipientEmail: '[email protected]'
})
};
fetch('https://api.sapt.ai/emails/contact', 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://api.sapt.ai/emails/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Doe',
'email' => '[email protected]',
'subject' => 'Question about services',
'message' => 'I would like to learn more about your services...',
'projectId' => 'proj_abc123',
'recipientEmail' => '[email protected]'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.sapt.ai/emails/contact"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"[email protected]\",\n \"subject\": \"Question about services\",\n \"message\": \"I would like to learn more about your services...\",\n \"projectId\": \"proj_abc123\",\n \"recipientEmail\": \"[email protected]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.sapt.ai/emails/contact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"[email protected]\",\n \"subject\": \"Question about services\",\n \"message\": \"I would like to learn more about your services...\",\n \"projectId\": \"proj_abc123\",\n \"recipientEmail\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sapt.ai/emails/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"[email protected]\",\n \"subject\": \"Question about services\",\n \"message\": \"I would like to learn more about your services...\",\n \"projectId\": \"proj_abc123\",\n \"recipientEmail\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Submit contact form (unauthenticated)
Public endpoint for contact form submissions. No authentication required. Rate limited by IP address (3/hour, 10/day). Email is sent to configured recipient addresses only.
curl --request POST \
--url https://api.sapt.ai/emails/contact \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "John Doe",
"email": "[email protected]",
"subject": "Question about services",
"message": "I would like to learn more about your services...",
"projectId": "proj_abc123",
"recipientEmail": "[email protected]"
}
'import requests
url = "https://api.sapt.ai/emails/contact"
payload = {
"name": "John Doe",
"email": "[email protected]",
"subject": "Question about services",
"message": "I would like to learn more about your services...",
"projectId": "proj_abc123",
"recipientEmail": "[email protected]"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'John Doe',
email: '[email protected]',
subject: 'Question about services',
message: 'I would like to learn more about your services...',
projectId: 'proj_abc123',
recipientEmail: '[email protected]'
})
};
fetch('https://api.sapt.ai/emails/contact', 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://api.sapt.ai/emails/contact",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'John Doe',
'email' => '[email protected]',
'subject' => 'Question about services',
'message' => 'I would like to learn more about your services...',
'projectId' => 'proj_abc123',
'recipientEmail' => '[email protected]'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.sapt.ai/emails/contact"
payload := strings.NewReader("{\n \"name\": \"John Doe\",\n \"email\": \"[email protected]\",\n \"subject\": \"Question about services\",\n \"message\": \"I would like to learn more about your services...\",\n \"projectId\": \"proj_abc123\",\n \"recipientEmail\": \"[email protected]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.sapt.ai/emails/contact")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"John Doe\",\n \"email\": \"[email protected]\",\n \"subject\": \"Question about services\",\n \"message\": \"I would like to learn more about your services...\",\n \"projectId\": \"proj_abc123\",\n \"recipientEmail\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sapt.ai/emails/contact")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"John Doe\",\n \"email\": \"[email protected]\",\n \"subject\": \"Question about services\",\n \"message\": \"I would like to learn more about your services...\",\n \"projectId\": \"proj_abc123\",\n \"recipientEmail\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
JWT token obtained from /api/auth/token endpoint. Token is verified using JWKS and must include a valid user identifier.
Body
Sender name (max 100 characters)
1 - 100"John Doe"
Sender email address (will be used as reply-to)
Subject line (max 200 characters)
1 - 200"Question about services"
Message content (10-5000 characters, plain text only)
10 - 5000"I would like to learn more about your services..."
Optional project ID to route email to specific client (if not provided, uses default)
"proj_abc123"
Optional recipient email address (must be from allowed domain). If not provided, uses CONTACT_FORM_RECIPIENT_EMAIL env variable.