AlmondTill/G3N API

On this page

mailByRef

query · in the family Your own session

What it does

Look up one email the platform sent you by the reference on its last line (ref M-XXXX-XXXX-XXXX) — what fired it, when, and where the request came from.

Requires authentication.

What happens

A single read of your own mail ledger. A mistyped reference is refused before any read; a reference that belongs to another account reads as not found.

Who may call it

Capability area: Your own session — What every signed-in person may do for themselves — their session, their profile and their own work.

Arguments

NameTypeRequiredNotes
refString String!yesNo further notes.

Returns

MailLedgerEntry MailLedgerEntry! — One email the platform sent to YOUR account. The words derive at read time from the kind + origin.

Example request

query ExampleMailByRef($ref: String!) {
  mailByRef(ref: $ref) {
    ref
    kind
    kindWords
    origin
    originWords
    footerSentence
    subjectId
    eventId
    eventAt
    sentAt
    providerMessageId
    recipientHash
  }
}

Variables:

{
  "ref": "<ref>"
}

Example response

{
  "data": {
    "mailByRef": {
      "ref": "01900000-0000-7000-8000-42f484020000",
      "kind": "verification",
      "kindWords": "<kind words>",
      "origin": "office",
      "originWords": "<origin words>",
      "footerSentence": "<footer sentence>",
      "subjectId": "01900000-0000-7000-8000-91fe7ba20000",
      "eventId": "<event id>",
      "eventAt": "2027-01-31T00:00:00.000Z",
      "sentAt": "2027-01-31T00:00:00.000Z",
      "providerMessageId": "<provider message id>",
      "recipientHash": "<recipient hash>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer