Register a Message Queue
Just confirm/register this endpoint and let others know it exists.
curl -X POST --data '{ CRYPT_AND_SIGN }' https://openthc.pub/SERVICE_PUBLIC_KEY
Craete Message to Queue
Just POST the encrypted message to the recipients public key. The body is saved AS-IS and the indicated content-type is trusted.
curl -X POST --data '{ "@origin": "ORIGIN_PUBLIC_KEY", "@secret-message": "BASE64URL_ENCODED_CRYPTED_DATA", "@signature": "..." }' https://openthc.pub/TARGET_PUBLIC_KEY
Check Messages
Simply call a `GET` request to your endpoint for a list of messages.
curl https://openthc.pub/YOUR_PUBLIC_KEY
Read Message
curl https://openthc.pub/YOUR_PUBLIC_KEY/MESSAGE_ID