Mark a message read / unread
curl -X PATCH "https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"is_read": true
}'
import requests
import json
url = "https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"is_read": true
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"is_read": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"is_read": true
}`)
req, err := http.NewRequest("PATCH", "https://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
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://api.supasend.io/v1/inbox/messages/507f1f77bcf86cd799439011')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"is_read": true
}'
response = http.request(request)
puts response.body
{
"id": "example_string",
"mailbox_id": "example_string",
"thread_id": "example_string",
"kind": "reply",
"email_job_id": "user@example.com",
"message_id": "example_string",
"in_reply_to": "example_string",
"references": [
"example_string"
],
"from": {
"name": "John Doe",
"email": "user@example.com"
},
"to": [
{
"name": "John Doe",
"email": "user@example.com"
}
],
"cc": [
{
"name": "John Doe",
"email": "user@example.com"
}
],
"reply_to": "example_string",
"subject": "example_string",
"snippet": "example_string",
"body_text": "example_string",
"body_html": "example_string",
"reply_text": "example_string",
"reply_html": "example_string",
"body_truncated": true,
"attachments": [
{
"index": 42,
"filename": "John Doe",
"content_type": "example_string",
"size": 42,
"is_inline": true,
"content_id": "example_string"
}
],
"is_read": true,
"received_at": "2024-12-25T10:00:00Z",
"created_at": "2024-12-25T10:00:00Z"
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
/v1/inbox/messages/{id}Target server for requests. Edit to use your own host.
API key in the format sk_live_<64 hex characters>
sk_live_<64 hex characters>MongoDB ObjectID
The media type of the request body
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. API key in the format sk_live_\<64 hex characters\>
Path Parameters
Body
Responses
reply — a reply to something (a SupaSend send, an earlier
synced message, or mail sent outside SupaSend — anything with
In-Reply-To / References); inbound — a brand-new
conversation from a person; bulk — newsletters / mailing
lists / marketing (List-Id, List-Unsubscribe or Precedence:
bulk); bounce — delivery status notification; auto_reply —
out-of-office / autoresponder.
replyinboundbulkbounceauto_replyThe send this message directly answers (or, for bounces, the send that failed)
First ~200 characters of reply_text
Full text part as received
Full HTML part as received
New content only — quoted history stripped