curl --request PUT \
--url https://api.parser-app.com/v1/emails/{email_id}/tags \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"tags": [
"client:acme"
]
}
'import requests
url = "https://api.parser-app.com/v1/emails/{email_id}/tags"
payload = { "tags": ["client:acme"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tags: ['client:acme']})
};
fetch('https://api.parser-app.com/v1/emails/{email_id}/tags', 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.parser-app.com/v1/emails/{email_id}/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tags' => [
'client:acme'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.parser-app.com/v1/emails/{email_id}/tags"
payload := strings.NewReader("{\n \"tags\": [\n \"client:acme\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.put("https://api.parser-app.com/v1/emails/{email_id}/tags")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tags\": [\n \"client:acme\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parser-app.com/v1/emails/{email_id}/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tags\": [\n \"client:acme\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"email_id": "<string>",
"thread_id": "<string>",
"mailbox_id": "<string>",
"provider_message_id": "<string>",
"message_id": "<string>",
"in_reply_to": "<string>",
"references": [
"<string>"
],
"from": "<string>",
"to": [
"<string>"
],
"cc": [
"<string>"
],
"subject": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"size_bytes": 123,
"attachments": [
{
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"sha256": "<string>"
}
],
"outcome": "<string>",
"job_id": "<string>",
"routing": {
"intent": "new_submission",
"confidence": 123,
"model": "<string>",
"served_model": "<string>"
},
"tags": [
"<string>"
],
"raw_stored": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Replace an email's tags
Tags are trimmed and lowercased, then 1-64 of a-z 0-9 _ : -; at most 20. Audited.
curl --request PUT \
--url https://api.parser-app.com/v1/emails/{email_id}/tags \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"tags": [
"client:acme"
]
}
'import requests
url = "https://api.parser-app.com/v1/emails/{email_id}/tags"
payload = { "tags": ["client:acme"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tags: ['client:acme']})
};
fetch('https://api.parser-app.com/v1/emails/{email_id}/tags', 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.parser-app.com/v1/emails/{email_id}/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tags' => [
'client:acme'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.parser-app.com/v1/emails/{email_id}/tags"
payload := strings.NewReader("{\n \"tags\": [\n \"client:acme\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.put("https://api.parser-app.com/v1/emails/{email_id}/tags")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tags\": [\n \"client:acme\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parser-app.com/v1/emails/{email_id}/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tags\": [\n \"client:acme\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"email_id": "<string>",
"thread_id": "<string>",
"mailbox_id": "<string>",
"provider_message_id": "<string>",
"message_id": "<string>",
"in_reply_to": "<string>",
"references": [
"<string>"
],
"from": "<string>",
"to": [
"<string>"
],
"cc": [
"<string>"
],
"subject": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"size_bytes": 123,
"attachments": [
{
"filename": "<string>",
"content_type": "<string>",
"size_bytes": 123,
"sha256": "<string>"
}
],
"outcome": "<string>",
"job_id": "<string>",
"routing": {
"intent": "new_submission",
"confidence": 123,
"model": "<string>",
"served_model": "<string>"
},
"tags": [
"<string>"
],
"raw_stored": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API key
Path Parameters
Body
Each trimmed and lowercased, then 1-64 of a-z 0-9 _ : -; at most 20 on an email
20Trimmed and lowercased, then 1-64 of a-z 0-9 _ : -
Response
Successful Response
A tracked inbound email: its envelope and what became of it, never its body.
Stable: a redelivery of the same message is the same email
Its thread: the mailbox and the thread's root Message-ID
Null when posted to /v1/intake/email with an API key
Its Message-ID, or the provider's id for it
The Message-ID header, without its angle brackets
The References header's message ids, oldest first
The raw message's size
Every attachment, processable or not
Show child attributes
Show child attributes
job, merged, ignored: or refused
The job it started or belongs to: its thread's job when it was handled
The router's verdict; null when not routed
Show child attributes
Show child attributes
Its raw .eml is kept: GET /v1/emails/{email_id}/raw