Integrate secure messages into any application
curl -X POST https://cryptnote.pro/api/v1/create.php \
-H 'Content-Type: application/json' \
-d '{"content":"Hello API","max_views":1}'
const res = await fetch('/api/v1/create.php', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({content: 'Hello', max_views: 1})
});
The API has request limits to ensure availability for all users.
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum limit (60) |
X-RateLimit-Remaining | Remaining requests in current window |
X-RateLimit-Reset | Unix timestamp of reset |
{
"success": false,
"error": "rate_limit_exceeded",
"message": "Too many requests. Please try again later.",
"retry_after": 45
}
Create encrypted content
| Field | Type | Description |
|---|---|---|
content | string* | Content (max. 50000) |
max_views | int | Views (1-20, default: 1) |
password | string | Password (4-100 chars) |
expire_minutes | int | Expiration (1-10080 min) |
is_markdown | bool | Markdown format |
is_html | bool | HTML format |
{
"success": true,
"share_url": "https://cryptnote.pro/view.php?token=...",
"token": "abc123..."
}
Read/Decrypt content
This endpoint consumes one view when successful.
token | string* | Content token |
password | string | Password (if protected) |
{
"success": true,
"content": "... plaintext ...",
"is_markdown": false,
"remaining_views": 0
}
Check token status (does not consume view)
token | string* | Content token |
{
"success": true,
"status": "active|expired|not_found",
"requires_password": false,
"max_views": 1,
"remaining_views": 1
}
rate_limit_exceeded — Request limit exceeded (wait retry_after seconds)content_required — Empty contentinvalid_max_views — Out of 1-20 rangeinvalid_expire_minutes — Out of 1-10080 rangepassword_required — Password requirednot_found_or_expired — Token not found or expired