string
curl -X POST https://api.notvis.com/v1/emails/messages \
-H "Authorization: Bearer nc_live_your_api_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"from": {
"email": "hello@yourdomain.com",
"name": "Your App"
},
"to": [
{ "email": "user@example.com", "name": "John Doe" }
],
"subject": "Welcome to Our App",
"body_html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
"body_text": "Welcome! Thanks for signing up.",
"callback_url": "https://example.com/webhooks/email",
"tags": ["welcome", "onboarding"],
"metadata": { "user_id": "usr_123" }
}'
const response = await fetch('https://api.notvis.com/v1/emails/messages', {
method: 'POST',
headers: {
'Authorization': 'Bearer nc_live_your_api_key',
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
from: { email: 'hello@yourdomain.com', name: 'Your App' },
to: [{ email: 'user@example.com', name: 'John Doe' }],
subject: 'Welcome to Our App',
body_html: '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
}),
});
const data = await response.json();
console.log(data.message_id);
import requests
import uuid
response = requests.post(
'https://api.notvis.com/v1/emails/messages',
headers={
'Authorization': 'Bearer nc_live_your_api_key',
'Idempotency-Key': str(uuid.uuid4()),
},
json={
'from': {'email': 'hello@yourdomain.com', 'name': 'Your App'},
'to': [{'email': 'user@example.com', 'name': 'John Doe'}],
'subject': 'Welcome to Our App',
'body_html': '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
},
)
print(response.json()['message_id'])
package main
import (
"bytes"
"encoding/json"
"net/http"
"github.com/google/uuid"
)
func main() {
payload := map[string]interface{}{
"from": map[string]string{"email": "hello@yourdomain.com", "name": "Your App"},
"to": []map[string]string{{"email": "user@example.com", "name": "John Doe"}},
"subject": "Welcome to Our App",
"body_html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.notvis.com/v1/emails/messages", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer nc_live_your_api_key")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", uuid.NewString())
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}
{
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"created_at": "2026-07-12T10:00:00Z"
}
{
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "scheduled",
"created_at": "2026-07-12T10:00:00Z"
}
{
"code": 400,
"message": "validation failed",
"details": {
"from.email": "required",
"subject": "required"
}
}
{
"code": 401,
"message": "invalid or missing API key"
}
Email
Send Email
Send a transactional email to one or more recipients.
POST
/
v1
/
emails
/
messages
curl -X POST https://api.notvis.com/v1/emails/messages \
-H "Authorization: Bearer nc_live_your_api_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"from": {
"email": "hello@yourdomain.com",
"name": "Your App"
},
"to": [
{ "email": "user@example.com", "name": "John Doe" }
],
"subject": "Welcome to Our App",
"body_html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
"body_text": "Welcome! Thanks for signing up.",
"callback_url": "https://example.com/webhooks/email",
"tags": ["welcome", "onboarding"],
"metadata": { "user_id": "usr_123" }
}'
const response = await fetch('https://api.notvis.com/v1/emails/messages', {
method: 'POST',
headers: {
'Authorization': 'Bearer nc_live_your_api_key',
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
from: { email: 'hello@yourdomain.com', name: 'Your App' },
to: [{ email: 'user@example.com', name: 'John Doe' }],
subject: 'Welcome to Our App',
body_html: '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
}),
});
const data = await response.json();
console.log(data.message_id);
import requests
import uuid
response = requests.post(
'https://api.notvis.com/v1/emails/messages',
headers={
'Authorization': 'Bearer nc_live_your_api_key',
'Idempotency-Key': str(uuid.uuid4()),
},
json={
'from': {'email': 'hello@yourdomain.com', 'name': 'Your App'},
'to': [{'email': 'user@example.com', 'name': 'John Doe'}],
'subject': 'Welcome to Our App',
'body_html': '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
},
)
print(response.json()['message_id'])
package main
import (
"bytes"
"encoding/json"
"net/http"
"github.com/google/uuid"
)
func main() {
payload := map[string]interface{}{
"from": map[string]string{"email": "hello@yourdomain.com", "name": "Your App"},
"to": []map[string]string{{"email": "user@example.com", "name": "John Doe"}},
"subject": "Welcome to Our App",
"body_html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.notvis.com/v1/emails/messages", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer nc_live_your_api_key")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", uuid.NewString())
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}
{
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"created_at": "2026-07-12T10:00:00Z"
}
{
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "scheduled",
"created_at": "2026-07-12T10:00:00Z"
}
{
"code": 400,
"message": "validation failed",
"details": {
"from.email": "required",
"subject": "required"
}
}
{
"code": 401,
"message": "invalid or missing API key"
}
Also available at
POST /v1/emails/send for backward compatibility.Request Headers
string
required
Bearer token. Format:
Bearer nc_live_your_api_keystring
Unique key to prevent duplicate sends. See Idempotency.
Request Body
object
required
array
required
array
array
string
required
Email subject line. Maximum 998 characters.
string
HTML content of the email. At least one of
body_html or body_text is required.Plain text content of the email. At least one of
body_html or body_text is required.string
Reply-to email address. Must be a valid email if provided.
object
Custom email headers as key-value pairs.
string
HTTPS URL to receive delivery status webhooks for this email. Must start with
https://.string
ISO 8601 timestamp to schedule the email for future delivery. Must be in the future, maximum 7 days ahead.
string[]
Tags for categorization. Maximum 10 tags.
object
Custom metadata as key-value pairs. Useful for tracking and webhooks.
Total recipients across
to, cc, and bcc cannot exceed 50.Response
string
Unique identifier for the queued email.
string
"queued" for immediate sends, "scheduled" for future sends.string
ISO 8601 timestamp of when the message was created.
curl -X POST https://api.notvis.com/v1/emails/messages \
-H "Authorization: Bearer nc_live_your_api_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"from": {
"email": "hello@yourdomain.com",
"name": "Your App"
},
"to": [
{ "email": "user@example.com", "name": "John Doe" }
],
"subject": "Welcome to Our App",
"body_html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
"body_text": "Welcome! Thanks for signing up.",
"callback_url": "https://example.com/webhooks/email",
"tags": ["welcome", "onboarding"],
"metadata": { "user_id": "usr_123" }
}'
const response = await fetch('https://api.notvis.com/v1/emails/messages', {
method: 'POST',
headers: {
'Authorization': 'Bearer nc_live_your_api_key',
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
from: { email: 'hello@yourdomain.com', name: 'Your App' },
to: [{ email: 'user@example.com', name: 'John Doe' }],
subject: 'Welcome to Our App',
body_html: '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
}),
});
const data = await response.json();
console.log(data.message_id);
import requests
import uuid
response = requests.post(
'https://api.notvis.com/v1/emails/messages',
headers={
'Authorization': 'Bearer nc_live_your_api_key',
'Idempotency-Key': str(uuid.uuid4()),
},
json={
'from': {'email': 'hello@yourdomain.com', 'name': 'Your App'},
'to': [{'email': 'user@example.com', 'name': 'John Doe'}],
'subject': 'Welcome to Our App',
'body_html': '<h1>Welcome!</h1><p>Thanks for signing up.</p>',
},
)
print(response.json()['message_id'])
package main
import (
"bytes"
"encoding/json"
"net/http"
"github.com/google/uuid"
)
func main() {
payload := map[string]interface{}{
"from": map[string]string{"email": "hello@yourdomain.com", "name": "Your App"},
"to": []map[string]string{{"email": "user@example.com", "name": "John Doe"}},
"subject": "Welcome to Our App",
"body_html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
}
body, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.notvis.com/v1/emails/messages", bytes.NewBuffer(body))
req.Header.Set("Authorization", "Bearer nc_live_your_api_key")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", uuid.NewString())
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}
{
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"created_at": "2026-07-12T10:00:00Z"
}
{
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "scheduled",
"created_at": "2026-07-12T10:00:00Z"
}
{
"code": 400,
"message": "validation failed",
"details": {
"from.email": "required",
"subject": "required"
}
}
{
"code": 401,
"message": "invalid or missing API key"
}