Send Contact Message
The Hub's contact form. Emails the message to the workspace's
reply-to address, with the visitor as Reply-To. Always answers
{"sent": true} — including when the message is dropped as spam.
Rate limited to 5 requests per minute per IP, and 10 per 10 minutes
for the same email address.
curl -X POST "https://app.nashra.ai/api/v1/tenants/example_string/contact" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "user@example.com",
"message": "example_string",
"website": "example_string"
}'
import requests
import json
url = "https://app.nashra.ai/api/v1/tenants/example_string/contact"
headers = {
"Content-Type": "application/json"
}
data = {
"name": "John Doe",
"email": "user@example.com",
"message": "example_string",
"website": "example_string"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.nashra.ai/api/v1/tenants/example_string/contact", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "John Doe",
"email": "user@example.com",
"message": "example_string",
"website": "example_string"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "John Doe",
"email": "user@example.com",
"message": "example_string",
"website": "example_string"
}`)
req, err := http.NewRequest("POST", "https://app.nashra.ai/api/v1/tenants/example_string/contact", 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://app.nashra.ai/api/v1/tenants/example_string/contact')
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 = '{
"name": "John Doe",
"email": "user@example.com",
"message": "example_string",
"website": "example_string"
}'
response = http.request(request)
puts response.body
{
"sent": true
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
POST
/tenants/{slug}/contactPOST
Base URLstring
Target server for requests. Edit to use your own host.
path
slugstring
RequiredTenant's subdomain slug, or its verified custom domain
Content-Typestring
RequiredThe media type of the request body
Options: application/json
namestring
RequiredMax length: 120
emailstring
RequiredFormat: email
messagestring
RequiredMax length: 4000
websitestring
Spam trap — leave it out or empty
Request Preview
Response
Response will appear here after sending the request
Path Parameters
slugstring
RequiredTenant's subdomain slug, or its verified custom domain
Body
application/json
websitestring
Spam trap — leave it out or empty
Responses
sentboolean
Was this page helpful?