API Documentation

You can perform the following actions with the API:

List new messages

This will show a list of new messages in your inbox.

Request:

torsocks curl -s "https://sonarmsniko2lvfu.tor2web.io:8443/api/?a=list" --data "api_key=your-api-key"

Result:

The result is a json object with the new messages. A message is considered new until it is opened for the first time.

Here is a sample output with two new messages:

{
  "1": {
    "from": "userName1",
    "date": "2020-02-02"
  },
  "2": {
    "from": "userName2",
    "date": "2020-02-01"
  }
}
	
Send messages

You can use the following command to send new messages:

torsocks curl -s "https://sonarmsniko2lvfu.tor2web.io:8443/api/?a=send" --data "to=test&subject=some-subject&message=some-message&api_key=your-api-key"

On success you will get the following message:

[1,"The message has been successfully sent."]

On error, the first parameter will be 0 and the second will be the error message:

[0,"The message can not be empty."]

Encryption

All messages sent with the API are encrypted in the same way as the messages sent using the web interface (server side encryption).

It is recommended to encrypt the message with PGP when you send sensitive information. This will protect your message against more types of attacks.

Security

If somebody gets access to your API key, they will be able to:

Even if somebody has access to your key, they won't be able to:

Limits

In order to avoid spam and other attacks, the following limits apply:

If you need to raise the limits, contact us.

Questions

If you have any question, do not hesitate to contact us using our contact form.



The private PGP key is stored encrypted so even if the server gets hacked the hacker gets no keys.
For higher security, you can manually encrypt the messages with PGP.


PGP key · FAQ · Contact Us · Donate · API · Sonar-cli

Sonar is listed on
Dark Eye · Raptor