One message, in full
const url = 'https://api.facteur.eu/v1/messages/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.facteur.eu/v1/messages/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The message identifier.
Responses
Section titled “Responses”The message.
Read status first. A message accepted over SMTP exists before it is
parsed, and a refused one carries no derived fields at all — an absent
otp pushes a client to read status rather than assert on a plausible
null.
object
The inbox this arrived in.
How long the message took to reach us.
received — accepted and stored, not parsed yet. Everything derived
from the body is still empty; look again.
parsed — everything below is populated.
quota_exceeded — refused for want of plan. Nothing was stored or
parsed, and the derived fields are absent rather than null.
object
object
object
The one-time code found in the message, when there is one. This is the field most suites assert on.
object
object
object
One property per extractor saved on this inbox, keyed by the extractor’s key.
object
Present instead of the derived fields when the message was not processed.
object
Example
{ "status": "received", "error": { "code": "PLAN_QUOTA_EXCEEDED" }}No usable credential. UNAUTHENTICATED when none was presented,
KEY_UNKNOWN, KEY_REVOKED or KEY_EXPIRED when a key was — kept
distinct on purpose, because “mint a new one” and “somebody took this
away from you” are different facts to whoever is reading a red pipeline.
Every failure has this shape. Branch on error.code; error.message is
written for a human and is in French today.
object
object
The stable, machine-readable reason.
A sentence for whoever is reading the failure. Not part of the contract.
Example
{ "error": { "code": "SCOPE_INSUFFICIENT" }}SCOPE_INSUFFICIENT (the message names the scope this request wanted and
the ones the key holds), KEY_CANNOT_REACH (no scope opens this route to
a key at all), FORBIDDEN, or one of the stated refusals listed under
x-api-key-refusals.
Every failure has this shape. Branch on error.code; error.message is
written for a human and is in French today.
object
object
The stable, machine-readable reason.
A sentence for whoever is reading the failure. Not part of the contract.
Example
{ "error": { "code": "SCOPE_INSUFFICIENT" }}MESSAGE_NOT_FOUND. A message in a workspace the key does not reach answers the same way as one that does not exist.
Every failure has this shape. Branch on error.code; error.message is
written for a human and is in French today.
object
object
The stable, machine-readable reason.
A sentence for whoever is reading the failure. Not part of the contract.
Example
{ "error": { "code": "SCOPE_INSUFFICIENT" }}