curl --request POST \
--url https://bud.noetive.io/v1/message.update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "message_01j9x2v8k3e0080000000000",
"changes": {
"read": true,
"labels": [
"<string>"
],
"folder": "receipts"
},
"idempotency_key": "<string>"
}
'import requests
url = "https://bud.noetive.io/v1/message.update"
payload = {
"id": "message_01j9x2v8k3e0080000000000",
"changes": {
"read": True,
"labels": ["<string>"],
"folder": "receipts"
},
"idempotency_key": "<string>"
}
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({
id: 'message_01j9x2v8k3e0080000000000',
changes: {read: true, labels: ['<string>'], folder: 'receipts'},
idempotency_key: '<string>'
})
};
fetch('https://bud.noetive.io/v1/message.update', 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://bud.noetive.io/v1/message.update",
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([
'id' => 'message_01j9x2v8k3e0080000000000',
'changes' => [
'read' => true,
'labels' => [
'<string>'
],
'folder' => 'receipts'
],
'idempotency_key' => '<string>'
]),
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://bud.noetive.io/v1/message.update"
payload := strings.NewReader("{\n \"id\": \"message_01j9x2v8k3e0080000000000\",\n \"changes\": {\n \"read\": true,\n \"labels\": [\n \"<string>\"\n ],\n \"folder\": \"receipts\"\n },\n \"idempotency_key\": \"<string>\"\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://bud.noetive.io/v1/message.update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"message_01j9x2v8k3e0080000000000\",\n \"changes\": {\n \"read\": true,\n \"labels\": [\n \"<string>\"\n ],\n \"folder\": \"receipts\"\n },\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://bud.noetive.io/v1/message.update")
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 \"id\": \"message_01j9x2v8k3e0080000000000\",\n \"changes\": {\n \"read\": true,\n \"labels\": [\n \"<string>\"\n ],\n \"folder\": \"receipts\"\n },\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ref": "<string>",
"created": true,
"effects": [
{
"kind": "mail.read",
"count": 123,
"ref": "<string>"
}
],
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
}
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}Mark, label or move a message
Mark a message read, replace its labels, or move it to another folder
of its mailbox. effects in the result says what changed; a change
that was already true reports nothing.
A move takes received mail between inbox, quarantine and the
folders made with folder.create. Sent mail stays in sent. Moving a
message out of quarantine files it elsewhere and does not change how
it was authenticated: the provenance it is shown with is the same, and
replying to it is refused as before.
The changes in one request apply in order — read, then labels, then
folder — and are not one transaction: a refused move leaves a read or
label change from the same request applied. A move is journalled as
mail.moved once it is complete, which may be just after this
response. If the request fails after the move was recorded, repeating
it finishes the move and its event, and reports no effect because
the message is already where it was asked to go.
A 409 means other label writes kept landing first. A read change in
the same request may already have been applied; the request is safe to
repeat as it is.
curl --request POST \
--url https://bud.noetive.io/v1/message.update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "message_01j9x2v8k3e0080000000000",
"changes": {
"read": true,
"labels": [
"<string>"
],
"folder": "receipts"
},
"idempotency_key": "<string>"
}
'import requests
url = "https://bud.noetive.io/v1/message.update"
payload = {
"id": "message_01j9x2v8k3e0080000000000",
"changes": {
"read": True,
"labels": ["<string>"],
"folder": "receipts"
},
"idempotency_key": "<string>"
}
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({
id: 'message_01j9x2v8k3e0080000000000',
changes: {read: true, labels: ['<string>'], folder: 'receipts'},
idempotency_key: '<string>'
})
};
fetch('https://bud.noetive.io/v1/message.update', 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://bud.noetive.io/v1/message.update",
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([
'id' => 'message_01j9x2v8k3e0080000000000',
'changes' => [
'read' => true,
'labels' => [
'<string>'
],
'folder' => 'receipts'
],
'idempotency_key' => '<string>'
]),
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://bud.noetive.io/v1/message.update"
payload := strings.NewReader("{\n \"id\": \"message_01j9x2v8k3e0080000000000\",\n \"changes\": {\n \"read\": true,\n \"labels\": [\n \"<string>\"\n ],\n \"folder\": \"receipts\"\n },\n \"idempotency_key\": \"<string>\"\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://bud.noetive.io/v1/message.update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"message_01j9x2v8k3e0080000000000\",\n \"changes\": {\n \"read\": true,\n \"labels\": [\n \"<string>\"\n ],\n \"folder\": \"receipts\"\n },\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://bud.noetive.io/v1/message.update")
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 \"id\": \"message_01j9x2v8k3e0080000000000\",\n \"changes\": {\n \"read\": true,\n \"labels\": [\n \"<string>\"\n ],\n \"folder\": \"receipts\"\n },\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ref": "<string>",
"created": true,
"effects": [
{
"kind": "mail.read",
"count": 123,
"ref": "<string>"
}
],
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
}
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}{
"error": {
"code": "invalid",
"message": "<string>",
"hint": "<string>",
"field": "/id",
"guard": "<string>",
"counter": "<string>",
"request_id": "<string>",
"retry_after_ms": 123
},
"ref": "<string>",
"kind": "<string>"
}Authorizations
Bearer credential for one agent: an API key or an access
token (a JWT). Pass as Authorization: Bearer <credential>.
A key is shown once when it is issued and is not recoverable afterwards; an access token lives five minutes and is fetched with the agent's own client key from the access service. Treat both as secrets: they reach one agent's mail, and anything a delegation has extended to it. An access token's scope is a ceiling on what the agent may do with it.
Body
Was this page helpful?

