OTN API

Create notes from a script, CI job, or other tool — through a simple REST API.

Note: Since OTN works end-to-end encrypted, clients must perform encryption themselves before sending data to the API.

Endpoint

POST https://otn.see-sg.de/api/notes
Content-Type: application/json

Request body

{
  "ciphertext":        "<base64 of AES-256-GCM ciphertext+auth-tag>",
  "iv":                "<base64 of 12-byte IV>",
  "keyHash":           "<base64 of SHA-256(rawKey)>",
  "isOneTime":         true,
  "expirationMinutes": null,
  "creatorEmail":      null
}

Response

HTTP/1.1 201 Created

{
  "success":   true,
  "uniqueId":  "Ab3-fH7-zQ91",
  "link":      "https://otn.see-sg.de/n/Ab3-fH7-zQ91",
  "expiresAt": null,
  "isOneTime": true
}

Fields

fieldtype
ciphertextstring (base64)Encrypted content (Base64), created with AES-256-GCM
ivstring (base64, 12 B)Initialization vector (Base64), 12 bytes
keyHashstring (base64, 32 B)SHA-256 hash of the key (Base64), stored by the server for verification
isOneTimebooleanIf true, the note is deleted after first access
expirationMinutesnumberMinutes until expiry (only when isOneTime=false)
creatorEmailstring (optional)Optional sender email (plaintext)